网卡阵列bond和team及网卡桥接配置

bond建立
 

nmcli connection show           ##查看存在的网卡
nmcli connection delete eth0    ##删除网卡
watch -n 1 cat /proc/net/bonding/bond0  ##监控
nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.8.10/24                  ##绑定的是自己机器的IP
nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0
nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0 
nmcli connection show

##测试  用另一台机器ping你绑定的哪个ip ping通之后  执行ifconfig eth0 down 仍然畅通说明成功


在设置好之后先切换到另一台机器去ping  ping通之后在执行ifconfig eth0 down


team建立

watch -n 1 cat teamdctl team0 state   ##开启监控 
nmcli connection add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 172.25.8.10/24
nmcli connection add con-name eth0 ifname eth0 type team-slave master team0 
nmcli connection add con-name eth1 ifname eth1 type team-slave master team0
ping 刚才绑定的IP地址 ping通之后在IP对应的主机上执行ifconfig eth1 down如果还保持畅通表示成功 
ifconfig eth0 down
ifconfig eth0 up


网卡的桥接配置   真机IP: 172.25.8.250

 vim /etc/sysconfig/network-scripts/ifcfg-br0
 DEVICE=br0
 ONBOOT=yes
 BOOTPROTO=none
 TYPE=Bridge
 IPADDR=172.25.8.254
 NETMASK=255.255.255.0

 vim /etc/sysconfig/network-scripts/ifcfg-enp0s25
 DEVICE=enp0s25
 BOOTPROTO=none
 ONBOOT=yes
 BRIDGE=br0
 systemctl restart network

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值