1.系统
[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core)
并且是最小化安装。
网卡信息
2.网卡配置文件
3.配置网卡文件
重名网卡 为 eth0
[root@localhost network-scripts]# mv ifcfg-eno16780032 ifcfg-eth0
编辑配置网卡配置文件 ifcfg-eth0
3.关闭“一致性网络设备命名法”
更改前
[root@localhost ~]# cat /etc/sysconfig/grub
添加net.ifnames=0 biosdevname=0
更改后
[root@localhost ~]# cat /etc/sysconfig/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap net.ifnames=0 biosdevname=0 rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
4.更新GRUB、内核配置
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
5.重启
[root@localhost ~]# reboot
6.验证
发表评论