管理聚合鏈路和橋接網絡(多網卡綁定)
一 配置bonding接口,實現多網卡綁定
綁定多網卡,可以有以下優點:
提升網絡傳輸能力
避免網絡鏈路單點故障
bonding的兩種綁定工作模式:實際上有7種,其他不常用
0 balance-rr 輪訓模式
1 active-backup 高可用模式
邏輯原理
--eth0---
app --數據發送到---bond0 ---switch----
--eth1---
創建步驟:
創建主接口(master) bondx
給主接口bondx設定Ip信息
創建子接口(slave)
啓動主接口
#nmcli con add type bond con-name bond0 ifname bond0 mode active-backup
#nmcli con mod bond0 ipv4.address '192.168.0.100/24'
#nmcli con mod bond0 ipv4.method manual
#nmcli con add type bond-slave con-name bond-slave-eno1 ifname eno1 master bond0
#nmcli con add type bond-slave con-name bond-slave-eno2 ifname eno2 master bond0
#cat /proc/net/bonding/bond0
#nmcli con up bond-slave-eno1
#nmcli con up bond-slave-eno2
#nmcli con up bond0
#ip addr show dev bond0
二 teaming 聚合鏈路
rhce 7.0使用teaming實現聚合鏈路,能夠提供網卡綁定之後的網絡吞吐性能,並且提供網卡的故障切換處理能力。
team是基於一個小型內核驅動實現聚合鏈路,在用戶層提供teamd命令實現鏈路管理。teamd可以實現以下模式的聚合鏈路:
broadcast
roundrobin
activebackup
loadbalance
lacp
具體操作: