网卡阵列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的状态

网卡阵列bond和team及网卡桥接配置_第1张图片

网卡阵列bond和team及网卡桥接配置_第2张图片

team建立


恢复实验环境

网卡阵列bond和team及网卡桥接配置_第3张图片

 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状态

网卡阵列bond和team及网卡桥接配置_第4张图片

网卡桥接配置


真机中配置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

你可能感兴趣的:(运维)