3-雙網卡的網絡配置
阿新 • • 發佈:2017-05-18
linux學習筆記
#####雙網卡網絡配置######
*鏈路聚合
*作用:主動備份模式 一次只能只能使用一個接口,如果接口故障,另一個會接替它
命令:nmcli connection add con-name bond0 ifname bond0 type bond mode active-backup ip4 172.25.254.162/24 ##添加主動備份模式的bond0,ip為172.25.254.162
命令:watch -n 1 cat /proc/net/bonding/bond0 ##監控網絡bond0
命令:nmcli connection add con-name eth0 ifname eth0 type bond-slave master bond0
##給bond0網絡添加eth0網卡
命令:nmcli connection add con-name eth1 ifname eth1 type bond-slave master bond0
##給bond0網絡添加eth1網卡
命令:ifconfig eth1 down ##當網卡eth1故障網卡eth0工作
命令:ifconfig eth1 up ##當網卡eth1啟動後網卡eth0還在工作直到eth0故障
命令:ifconfig eth0 down ##當網卡eth0故障切換到網卡eth1工作
3-雙網卡的網絡配置