centos 配置链路聚合

[root@linux-host1 ~]# cd /etc/sysconfig/network-scripts/
[root@linux-host1 network-scripts]# vim ifcfg-bond0
BOOTPROTO=static
NAME=bond0
DEVICE=bond0
ONBOOT=yes
BONDING_MASTER=yes
BONDING_OPTS="mode=1 miimon=100" #指定绑定类型为 1 及链路状态监测间隔时间
IPADDR=192.168.10.21
NETMASK=255.255.255.0
GATEWAY=192.168.10.2
DNS1=202.106.0.20

1.1.9.2 : eth0 0 配置 : [root@linux-host1 network-scripts]# cat ifcfg-eth0 BOOTPROTO=static NAME=eth0 DEVICE=eth0 ONBOOT=yes NM_CONTROLLED=no MASTER=bond0 USERCTL=no SLAVE=yes
1.1.9.31 eth1 配置 : [root@linux-host1 network-scripts]# cat ifcfg-eth1 BOOTPROTO=static NAME=eth1 DEVICE=eth1 ONBOOT=yes NM_CONTROLLED=no MASTER=bond0 USERCTL=no SLAVE=yes
1.1.10:仅主机网络配置:
1.1.10.10 bond0 配置 : [root@linux-host1 network-scripts]# cat ifcfg-bond0 BOOTPROTO=static NAME=bond1 DEVICE=bond1 ONBOOT=yes BONDING_MASTER=yes BONDING_OPTS="mode=1 miimon=100" #指定绑定类型为 1 及链路状态监测间隔时间 IPADDR=192.168.20.21 NETMASK=255.255.255.0

1.1.10.2 : eth2 2 配置 : [root@linux-host1 network-scripts]# cat ifcfg-eth2 BOOTPROTO=static NAME=eth2 DEVICE=eth2 ONBOOT=yes NM_CONTROLLED=no MASTER=bond1 USERCTL=no SLAVE=yes
.
1.. 1. 10.33 eth3 配置 : [root@linux-host1 network-scripts]# cat ifcfg-eth3 BOOTPROTO=static NAME=eth3 DEVICE=eth3 ONBOOT=yes NM_CONTROLLED=no MASTER=bond1 USERCTL=no SLAVE=yes

systemctl disable NetworkManager

 

posted @ 2022-07-23 13:11  不会跳舞的胖子  阅读(380)  评论(0)    收藏  举报