链路聚合:多个网卡聚合到一起.
bond与team两种方法。
bond: 0平衡轮循环 1主动备份
实验步骤
bond与team两种方法。
bond: 0平衡轮循环 1主动备份
实验步骤
bond网络接口;
该网络接口同时支持连接到两块网卡,并且有不同的使用方式。
roundrobin 平衡轮询模式:两块网卡同时接受数据。
activebackup 主动备份模式:只有一块网卡工作。
该网络接口同时支持连接到两块网卡,并且有不同的使用方式。
roundrobin 平衡轮询模式:两块网卡同时接受数据。
activebackup 主动备份模式:只有一块网卡工作。
nmcli connection show 查看网卡接口
nmcli connection delete "eth0"删除已有的接口
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812183559870-274244134.png)
添加网络接口bond0
nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.103/24
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812183619468-890730103.png)
将eth0网卡添加到接口bond0中
nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0
将eth1网卡添加到网络接口中
nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0
nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812183724052-840628098.png)
测试
watch -n 1 cat /proc/net/bonding/bond0
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812183737955-1668608416.png)
ifconfig eth0 down/up
通过执行此命令会发现当一块网卡停止工作时,另一块网卡会自动顶替之前工作的网卡,网络连接不中断
------------------------------------------------------------
------------------------------------------------------------
删除之前的接口。
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184010549-1443473535.png)
team 支持8块网卡。
删除之前的bond接口。
nmcli connection delete bond0
nmcli connection delete eth0
nmcli connection delete eth1
创建team接口
nmcli connection add con-name team0 ifname team0 type team config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.10/24
nmcli connection delete bond0
nmcli connection delete eth0
nmcli connection delete eth1
创建team接口
nmcli connection add con-name team0 ifname team0 type team config '{"runner":{"name":"activebackup"}}' ip4 172.25.254.10/24
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184315729-408919518.png)
创建连接team的网卡接口
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
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184324767-1310904709.png)
测试:
teamctl team0 stat
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184353809-372473260.png)
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184343842-215191980.png)
删除
nmcli connection delete team0
nmcli connection delete eth0
nmcli connection delete eth1
------------------------------------------------------------
网络桥接
网络桥接
用于虚拟化
桥接接口
桥接接口
vim /etc/sysconfig/network-scrpits/ifcfg-enp0s25
BOOTPROTO=none
DEVICE=enp0s25
ONBOOT=yes
BRIDGE=br0
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184505293-224768053.png)
vim /etc/sysconfig/network-scrpits/ifcfg-br0
DEVICE=br0
ONBOOT=yes
BOOTPROTO=none
IPADDR=172.25.254.4
PREFIX=24
TYPE=Bridge
DEVICE=br0
ONBOOT=yes
BOOTPROTO=none
IPADDR=172.25.254.4
PREFIX=24
TYPE=Bridge
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184517454-968794087.png)
systemctl restart network
检测:
brctl show
检测:
brctl show
![](https://images2018.cnblogs.com/blog/1443263/201808/1443263-20180812184532946-389592807.png)