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地址变了
原因:以前用rulles绑定了MAC地址,造成eth0和eth1被占用了,只能按顺序排下去
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"
发现新的MAC地址变为80:c1:6e:6d:f8:ba
于是删除root@rise-rs-171:/etc/udev/rules.d# rm -f 70-persistent-net.rules
重新配置网络设置,重启机器reboot即可
root@rise-rs-171:/etc/network# cat interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 58.215.138.171
netmask 255.255.255.192
gateway 58.215.138.129
auto eth0:1
iface eth0:1 inet static
address 122.193.202.105
netmask 255.255.255.192
auto eth1
iface eth1 inet static
address 10.20.169.16
netmask 255.255.255.0