示图:
示图:测试结果,并未影响网络的连接状态,用watch -n 1 cat /proc/net/bonding/bond 观察到此时bond0工作的由eth0变为eth1,达到双网卡阵列的目的
1.team也是链路聚合的一种方式
最多支持8块网卡
支持模式
广播
论旬
主备
负载均衡
2.设置
nmcli connection add con-name team0 ifname team0 type team config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.100/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
示图:
3.测试
watch -n 1 teamdctl team0 stat
ifconfig eth0 down
ifconfig eth0 up
示图:eth0 down
1.配置
vim /etc/sysconfig/network-scripts/ifcfg-enp1s0 ##此文设备名每个主机不相同,针对各自主机进行修改
DEVICE=enp1s0 ##设备名称
ONBOOT=yes ##开启服务设备自动激活
BOOTPROTO=none ##网卡工作状态
BRIDGE=br0 ##网卡开启的网桥接口
vim /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
ONBOOT=yes
BOOTPROTO=none
IPADDR=172.25.254.98
NETMASK=255.255.255.0
TYPE=Bridge ##网络接口类型是桥接
systemctl stop NetworkManager.service
systemctl restart network
systemctl start NetworkManager.service
ifconfig
br0: flags=4163
inet 172.25.254.98 netmask 255.255.255.0 broadcast 172.25.254.255
inet6 fe80::221:ccff:fe60:32a3 prefixlen 64 scopeid 0x20
ether 00:21:cc:60:32:a3 txqueuelen 0 (Ethernet)
RX packets 25396 bytes 59291358 (56.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 15360 bytes 105128915 (100.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
2.命令管理方式
#添加
systemctl stop NetworkManager
brctl show
brctl addbr br0
brctl addif br0 eth0
ifconfig eth0 up
ifconfig br0 172.25.254.x netmask 255.255.255.0
brctl show
ping 172.25.254.250
#删除
ifconfig br0 down
brctl delif br0 eth0
brctl delbr br0
brctl show