3

When I call ip addr show I get output with all interfaces and their IP addresses (look at eth7):

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1c:42:e9:3d:aa brd ff:ff:ff:ff:ff:ff
    inet 172.11.98.248/16 brd 172.11.255.255 scope global eth1
3: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc cbq state UP qlen 1000
    link/ether 00:1c:42:c6:d0:c4 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.242/19 brd 10.28.127.255 scope global eth2
4: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1c:42:56:14:28 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.249/24 scope global eth4
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1c:42:03:06:77 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.230/19 brd 10.28.127.255 scope global eth3
6: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:1c:42:4d:cb:d7 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.231/24 scope global eth7
    inet 192.168.13.0/18 scope global eth7
7: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:1c:42:81:0a:a4 brd ff:ff:ff:ff:ff:ff
8: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:1c:42:5c:12:40 brd ff:ff:ff:ff:ff:ff
9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether b2:c1:df:b1:29:c7 brd ff:ff:ff:ff:ff:ff
    inet 10.47.130.2/24 brd 10.47.130.255 scope global br0
10: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 52:b4:3a:90:f2:05 brd ff:ff:ff:ff:ff:ff
11: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/void 

But when I call the same command ip addr show up, but for only up-ed interfaces, I get strange results:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1c:42:e9:3d:aa brd ff:ff:ff:ff:ff:ff
    inet 172.11.98.248/16 brd 172.11.255.255 scope global eth1
3: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc cbq state UP qlen 1000
    link/ether 00:1c:42:c6:d0:c4 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.242/19 brd 10.28.127.255 scope global eth2
4: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1c:42:56:14:28 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.249/24 scope global eth4
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1c:42:03:06:77 brd ff:ff:ff:ff:ff:ff
    inet 10.28.98.230/19 brd 10.28.127.255 scope global eth3
    inet 10.28.98.231/24 scope global eth7
    inet 192.168.13.0/18 scope global eth7
9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether b2:c1:df:b1:29:c7 brd ff:ff:ff:ff:ff:ff
    inet 10.47.130.2/24 brd 10.47.130.255 scope global br0
10: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 52:b4:3a:90:f2:05 brd ff:ff:ff:ff:ff:ff
11: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/void 

I'm expecting that down interfaces will just dissapear from output. But, somehow strange for me, I see that not only they dissapear, but also IP addresses 192.168.13.0/18, 10.28.98.231/24 previously assigned to eth7 is currently assigned to eth3.

Is this normal behaviour and why this happen? And why these IP addresses were assigned to eth3 interfaces and not to others?

  • 1
    Sounds like a bug ip ip!!! It's skipping the header information for interfaces that are down but still printing the associated IP addresses, making them look like they're attached to a different interface. – Celada Jan 23 '15 at 9:37
  • 1
    I can reproduce the problem here, by the way, with ip version 3.12.0. – Celada Jan 23 '15 at 9:39
  • 1
    Still wrong in 3.16.0 – wurtel Jan 23 '15 at 9:44
  • 2
    I've reported this as a bug in Debian, #776040 – wurtel Jan 23 '15 at 10:13
  • 1
    @MohsenPahlevanzadeh, read the original post. Problem that IP assigned to down interface appears on another up-ed interface. – likern Jan 23 '15 at 11:00
2

It's a bug. There's a patch already, so you can expect it to be fixed in the next release. Thanks to wurtel for reporting it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.