红帽8.5基于network服务配置bond-vlan

红帽8.5图形界面系统环境
在network和NetworkManager服务都正常启动的情况下配置bond-vlan
仍然用network服务管理ifcfg文件,编辑好文件,直接重启network
注意默认路由可能会有2条,必须只保留一条

所有连接都配上NM_CONTROLLED=no

实测红帽8.5基于network服务无法通过dhcp获取网卡ip地址

管理口:

[root@rhel8 network-scripts]# cat ifcfg-eth0
TYPE=Ethernet
DEVICE=eth0
NAME=eth0
NM_CONTROLLED=no
IPADDR=192.168.18.218
NETMASK=255.255.255.0
GATEWAY=192.168.18.2
DNS1=192.168.18.2
DNS2=223.5.5.5
ONBOOT=yes
BOOTPROTO=static
DEFROUTE=no
######################################
[root@rhel8 network-scripts]# cat ifcfg-eth1
TYPE=Ethernet
DEVICE=eth1
NAME=eth1
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=static
###########################################
[root@rhel8 network-scripts]# cat ifcfg-eth2
TYPE=Ethernet
DEVICE=eth2
NAME=eth2
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=static
#########################################
[root@rhel8 network-scripts]# cat ifcfg-bond0
TYPE=bond
DEVICE=bond0
NAME=bond0
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
MASTER=yes
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
##############################################
[root@rhel8 network-scripts]# cat ifcfg-bond0.358
TYPE=Ethernet
DEVICE=bond0.358
NAME=bond0.358
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
VLAN=yes
IPADDR=192.168.18.122
NETMASK=255.255.255.0
GATEWAY=192.168.18.2
USERCTL=no
DEFROUTE=yes

posted @ 2022-07-09 18:04  笑傲运维  阅读(354)  评论(0编辑  收藏  举报