链路聚合
添加网卡
Active&Backup
[root@localhost ~]# nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.229/24 ##创建bond0
[root@localhost ~]# nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0 ##添加eth0网卡
[root@localhost ~]# nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0 ##添加eth1网卡
测试:
监控命令:
[root@localhost ~]# watch -n 1 cat /proc/net/bonding/bond0
[root@localhost ~]# ping 172.25.254.66
[root@localhost ~]# ifconfig eth0 down
[root@localhost ~]# ifconfig eth0 up
[root@localhost ~]# ifconfig eth1 down