centos7设置固定ip 记录
1.进入 network-scripts文件
2.
bash
1 | cd /etc/sysconfig/network-scripts/ |
2.修改ifcfg-eth0 文件
bash
1 | DEVICE=eth0 |
3.使用service network restart 重启服务
如果重启网络服务之后没有全是ok提示重启网卡提示
Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]:
这是因为克隆的机器没有正确的mac,UUID信息冲突导致
1.首先将 /etc/udev/rules.d/70-persistent-net.rules
文件删除rm -rf
2.然后将网卡配置文件 /etc/sysconfig/network-scripts/ifcfg-eth0的uuid和hwaddr这两行删除dd
3.重启虚拟机 init 6