标签:ifcfg-eth sys bootproto pre 分享 network rest add work
第一项: 克隆
方法一、
1.注释掉eth0这一行,将第二条配置中的eth1改成eth0
vi /etc/udev/rules.d/70-persistent-net.rules # PCI device 0x8086:0x100f (e1000) #SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:55:c1:c4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" #<==注释该行 # PCI device 0x8086:0x100f (e1000) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:33:c1:47", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" #<==将eth1改为eth0
2.删除vi /etc/sysconfig/network-script/ifcfg-eth0下的HWADDR
vi /etc/sysconfig/network-script/ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
3.shutdown -r now重启生效
方法二:
1.ifconfig -a 查看所有网卡信息
2.更改eth1网卡信息
vi /etc/sysconfig/network-script/ifcfg-eth0 DEVICE=eth1 #<==将eth0改为eth1 TYPE=Ethernet HWADDR=00:0C:29:33:C1:47 #<==更改为eth1的mac地址 ONBOOT=yes BOOTPROTO=dhcp
3.重启网卡生效
service network restart
标签:ifcfg-eth sys bootproto pre 分享 network rest add work
原文地址:https://www.cnblogs.com/blue-tadpole/p/9608268.html