/etc/default/grub文件的GRUB_CMDLINE_LINUX内容,增加net.ifnames=0
增加后更新内核启动参数(如果装机的时候,选择了/boot/efi,那么这里一定要执行第二句,否则不成功):

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

网卡里面配置vlan:

cd /etc/sysconfig/network-scripts/
cp ifcfg-eno49 ifcfg-eth0
mv ifcfg-eno49 ifcfg-eno49.bak
[root@FNSHD019 network-scripts]# cat ifcfg-eth0
NAME=eth0
DEVICE=eth0
ONBOOT=yes

[root@FNSHD019 network-scripts]# cat ifcfg-eth0.1070 
VLAN=yes
NAME=eth0
DEVICE=eth0.1070
BOOTPROTO=static
DNS1=X.X.X.X
IPADDR=X.X.X.X
GATEWAY=X.X.X.X
NETMASK=X.X.X.X
ONBOOT=yes
Logo

更多推荐