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

bond建立


只能2块网卡
 nmcli connection show                                                                                                           ###查看存在网卡
 nmcli connection delete eth0                                                                                                    ###删除网卡
 nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.225/24                              ###建立bond0
 nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0                                                      ###添加eth0到bond0
 nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0
 ifconfig eth0 down   或   ifdown eth0                                                                                            ###让网卡失效
 cat /proc/net/bonding/bond0                                                                                                      ###查看bond0的状态

这里写图片描述

这里写图片描述

team建立


恢复实验环境

这里写图片描述

 nmcli connection add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.225/24                       ###team生成
 nmcli connection add con-name eth0 ifname eth0 type team-slave master team0                                                                        ###添加eth0到team0
 nmcli connection add con-name eth1 ifname eth1 type team-slave master team0
 teamdctl team0 state                                                                                                                               ###查看team状态

这里写图片描述

网卡桥接配置


真机中配置IP:172.25.254.56
 vim /etc/sysconfig/network-scripts/ifcfg-br0
 DEVICE=br0
 ONBOOT=yes
 BOOTPROTO=none
 TYPE=Bridge
 IPADDR=172.25.254.56
 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
发出的红包

打赏作者

Wielun

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值