J'utilise suse sp1. J'ai trouvé qu'il y a une différence entre le résultat de la commande "ip" et "ifconfig", comme ceci:
nssh# ip a
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 brd 127.255.255.255 scope host lo
inet 127.0.0.2/8 brd 127.255.255.255 scope host secondary lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:21:28:f7:fc:70 brd ff:ff:ff:ff:ff:ff
inet 10.175.140.214/25 brd 10.175.140.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 00:21:28:f7:fc:71 brd ff:ff:ff:ff:ff:ff
4: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 90:e2:ba:0b:5e:68 brd ff:ff:ff:ff:ff:ff
5: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 00:21:28:f7:fc:72 brd ff:ff:ff:ff:ff:ff
6: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 00:21:28:f7:fc:73 brd ff:ff:ff:ff:ff:ff
7: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 90:e2:ba:0b:5e:69 brd ff:ff:ff:ff:ff:ff
nssh# ifconfig
eth0 Link encap:Ethernet HWaddr 00:21:28:F7:FC:70
inet addr:10.175.140.214 Bcast:10.175.140.255 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:262033 errors:0 dropped:0 overruns:0 frame:0
TX packets:61525 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34290673 (32.7 Mb) TX bytes:22269413 (21.2 Mb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7855586 errors:0 dropped:0 overruns:0 frame:0
TX packets:7855586 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:743730481 (709.2 Mb) TX bytes:743730481 (709.2 Mb)
et dans mon cas, l'ifconfig donne le bon résultat. depuis que j'ai supprimé ifcfg-eth [1,2,3,6,7], sous / etc / sysconfig / network. alors ma question est 1) pourquoi ip a donne-t-il des informations obsolètes? 2) comment vider l'ip en quelque sorte et le laisser donner les informations d'interface à jour?
la source