文章目录
1. 配置grub
/etc/sysconfig/grub
添加 net.ifnames=0 biosdevname=0
$ 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 rhgb quiet net.ifnames=0 biosdevname=0" GRUB_DISABLE_RECOVERY="true"
2. 重载grub
重载grub 配置文件
grub2-mkconfig -o /boot/grub2/grub.cfg
3. 配置网卡
$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eth0 DEVICE=eth0 ONBOOT=yes IPADDR=192.168.211.50 GATEWAY=192.168.211.2 DNS1=192.168.211.2
4. 重启
reboot