ifconfig don't show all nics when using alias like eth0:0

Bug #913858 reported by bjorne jonsen
This bug report is a duplicate of:  Bug #876829: Oneiric's ifupdown breaks ip aliases. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This (bug) i find when i try to use ipalias in /etc/network/interfaces with eth0 and eth0:0 and i don't see eth0:0 in ifconfig when i can see eth0.
and nic eth0:0 are up and running and answer on ping from other computer on the lan.
and don't shows in ifconfig.

This are in Ubuntu 11.10 when Ubuntu 11.04 are function with iplias like this in my interfaces
and when i write ifconfig eth0:0 172.16.1.13 netmask 255.255.255.0 and i see that in ifconfig.
i have put some information i a file that i send with this mess.

Description: Ubuntu 11.10
Release: 11.10

net-tools:
  Installed: 1.60-23ubuntu3
  Candidate: 1.60-23ubuntu3
  Version table:
 *** 1.60-23ubuntu3 0
        500 http://se.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

linux-image-3.0.0-14-server:
  Installed: 3.0.0-14.23
  Candidate: 3.0.0-14.23
  Version table:
 *** 3.0.0-14.23 0
        500 http://se.archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ oneiric-security/main amd64 Packages
        100 /var/lib/dpkg/status

-------------------------------
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.13
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

auto eth0:0
iface eth0:0 inet static
        address 172.16.1.13
        netmask 255.255.255.0
        network 172.16.1.0
        broadcast 172.16.1.255
-------------------------------

Revision history for this message
bjorne jonsen (bjorne-a) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/913858/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
bjorne jonsen (bjorne-a) wrote :

I think this bug are in Ubuntu precise to... i test and get same thing...

affects: ubuntu → ifupdown (Ubuntu)
Revision history for this message
Bernd Eckenfels (net-tools) wrote :

Björne asked net-tools upstream about this bug, I asked him to open an Ubuntu bug. Here is my analysis about this problem, which seems to be a regression if ifupdown:

----
I have looked at your [Blörne's] provided files. The problem we are seeing here is the fact, that ifconfig is not able to list multiple ip addresses added to a single network interface. This is a known problem and will likely not be fixed in ifconfig, since the new tool "ip addr" is supposed to replace it.

However, with named alias interfaces (eth0:0) it is supposed to work. The ifup configuration you have does however not create a named interface but adds two addesses to the primary interface:

From your output files:

Wrong:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    inet 192.168.0.13/24 brd 192.168.0.255 scope global eth0
    inet 172.16.1.13/24 brd 172.16.1.255 scope global eth0

Correct (after using ifconfig):

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    inet 192.168.0.13/24 brd 192.168.0.255 scope global eth0
    inet 172.16.1.13/24 brd 172.16.1.255 scope global eth0:0

ifupdown is using "ip addr" command. However even with the "ip addr" command it is possible to set up a "working" alias interface:

"ip addr add 172.16.1.13 dev eth0:0" creates a wrong configuration (adds second ip address but does not set the correct label)

"ip addr add 172.16.1.13 dev eth0 label eth0:0" (adds correct label to second ip address)

I have tried it on a ubuntu machine, the follwing commands will be used:

# root@ip-10-98-135-84:/etc/network# ifup -n -a -v
# Configuring interface eth0:0=eth0:0 (inet)
# run-parts --verbose /etc/network/if-pre-up.d
# ip addr add 172.16.1.13/255.255.255.0 broadcast 172.16.1.255 dev eth0:0
# ip link set dev eth0:0 up
# run-parts --verbose /etc/network/if-up.d

So it looks like this is a problem in the ifupdown package of ubuntu.

I know there was a network-script used to call "ip" in debian and it had support for $ALIAS. It looks like the latest version on ubuntu does not use that script anymore.

I will copy this text to your ubuntu launchpad report, since it is to be fixed in the ifupdown package of ubuntu.

Gruss
Bernd

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ifupdown (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.