[Bug 913858] Re: ifconfig don't show all nics when using alias like eth0:0

Bernd Eckenfels 913858 at bugs.launchpad.net
Wed Jan 11 23:22:50 UTC 2012


*** This bug is a duplicate of bug 876829 ***
    https://bugs.launchpad.net/bugs/876829

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 at 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

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/913858

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

Status in “ifupdown” package in Ubuntu:
  New

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
  -------------------------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/913858/+subscriptions




More information about the foundations-bugs mailing list