第8章 链路聚合和桥接 快乐记录
nmcli connection add type team con-name qinteamfile ifname qinteamdevice config '{"runner":{"name":"activebackup"}}' 添加一个大网卡模式是activebackup
nmcli connection show 要是设备没出来就删了再来一边
nmcli connection delete qinteamfile
nmcli connection modify qinteamfile ipv4.method manual ipv4.addresses "192.168.100.88/24 192.168.100.1" ipv4.dns 192.168.100.1 connection.autoconnect yes 给大网卡配置ip,dns
nmcli connection add type team-slave con-name qinteamslave1 ifname eno33554984 master qinteamdevice 给大王卡配置子网卡
nmcli connection add type team-slave con-name qinteamslave2 ifname enoxxxxxxxx master qinteamdevice 给大王卡配置子网卡
nmcli connection down qinteamfile down主配置文件
nmcli connection up qinteamfile up主配置文件
nmcli connection up qinteamslave1 up子配置文件
nmcli connection up qinteamslave2 up子配置文件
主备模式,断了一张网卡自动切换到另一张备用网卡
//////////////////////////////////桥接
nmcli connection add type bridge con-name qinbrfile ifname qinbrdevice 桥接网卡
nmcli connection modify qinbrfile ipv4.method manual ipv4.addresses "192.168.100.88/24 192.168.100.1" ipv4.dns 192.168.100.1 connection.autoconnect yes 配置桥接网卡
nmcli connection add type bridge-slave con-name qinbrslave ifname eno16777736 master qinbrdevice 添加子网卡
nmcli connection down qinbrfile
nmcli connection up qinbrfile 启动桥接网卡
nmcli connection up qinbrslave 启动子网卡
nmcli connection show 查看一下
ping -I qinbrdevice 192.168.100.2 测试通过qinbrdevice设备ping 192.168.100.2