root@rise-rs-171:/etc/network# mii-tool
eth2: negotiated 1000baseT-FD flow-control, link ok
eth3: autonegotiation restarted, no link網絡
發現網卡綁定在eth2和eth3,以前正常應該是綁定在eth0和eht1 ,詢問同事,原來這臺機器以前維修過換了塊主板,致使MAC地址變了ide
緣由:之前用rulles綁定了MAC地址,形成eth0和eth1被佔用了,只能按順序排下去oop
root@rise-rs-171:/etc/udev/rules.d# cat 70-persistent-net.rules
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e4:11:5b:e4:0f:80", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.1 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e4:11:5b:e4:0f:81", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="80:c1:6e:6d:f8:ba", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"spa
發現新的MAC地址變爲80:c1:6e:6d:f8:ba3d
因而刪除root@rise-rs-171:/etc/udev/rules.d# rm -f 70-persistent-net.rulesrest
從新配置網絡設置,重啓機器reboot便可orm
root@rise-rs-171:/etc/network# cat interfaces
# The loopback network interface
auto lo
iface lo inet loopbackblog
# The primary network interfaceci
auto eth0
iface eth0 inet static
address 58.215.138.171
netmask 255.255.255.192
gateway 58.215.138.129get
auto eth0:1
iface eth0:1 inet static
address 122.193.202.105
netmask 255.255.255.192
auto eth1iface eth1 inet static address 10.20.169.16 netmask 255.255.255.0