奇怪的 ip 命令输出

奇怪的 ip 命令输出

当我调用时,ip addr show我会得到包含所有接口及其 IP 地址的输出(请查看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 

但是,当我调用相同的命令ip addr show up,但仅针对 uped 接口时,我得到奇怪的结果:

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 

我预计关闭的接口将从输出中消失。但是,对我来说有点奇怪的是,我发现它们不仅消失了,而且之前分配给的IP 地址192.168.13.0/18也消失了。10.28.98.231/24eth7eth3

这是正常行为吗?为什么会发生这种情况?为什么这些 IP 地址分配给eth3接口而不是其他接口?

答案1

这是一个错误。已经有一个补丁,因此您可以预期它会在下一个版本中修复。谢谢武特尔用于报告它。

相关内容