克隆centos6后配置网络

1.清除原本mac信息

echo "">/etc/udev/rules.d/70-persistent-net.rules

2.重启

reboot

3.获取重新生成的mac信息

cat /etc/udev/rules.d/70-persistent-net.rules

ATTR{address}=="00:0c:29:db:66:5a"

NAME="eth1"

4.修改/etc/sysconfig/network-scripts/ifcfg-eth0

HWADDR=00:0c:29:db:66:5a

5.生成uuid :  uuidgen eht0

c69b4314-0f90-448c-b68e-52ba7bfba95d

6.修改/etc/sysconfig/network-scripts/ifcfg-eth0

UUID=c69b4314-0f90-448c-b68e-52ba7bfba95d

7.修改/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=="eth1"

8.修改/etc/sysconfig/network-scripts/ifcfg-eth0,设置动态ip

BOOTPROTO=dhcp

9.ifconfig 获取当前ip

10.修改/etc/sysconfig/network-scripts/ifcfg-eth0,设置静态获取ip

BOOTPROTO=static

11.修改/etc/sysconfig/network-scripts/ifcfg-eth0,设置静态ip

IPADDR=192.168.xx.xxx

posted @ 2020-09-23 20:01  gzdgz  阅读(115)  评论(0编辑  收藏  举报