主机上查看ip地址,可以发现,仅有eth1网卡
[root@rabbitmq3 桌面]# vim /etc/udev/rules.d/70-persistent-net.rules
内容如下
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:20:b8:37", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4f:1e:f3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
把最下边eth1的部分消除掉,并把系统现有网卡的mac地址卸载eth0那一块
修改后内容如下:
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4f:1e:f3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
把网卡文件的名字和内容也改一下,然后重启电脑