Linux Bonding Network
基本設定
RedHat 7/8 with nmtui
nmtui > Edit a connection > Add > New Connection > Select Bond > Create
> Slaves > Add
> IPv4 Configuration
> IPv6 Configuration > Disabled
Profile Name 的名稱會與實際設定檔名 ifcfg-XXX 有關,上述的設定會產生設定檔 ifcfg-bond0 , ifcfg-eno1-slave
如果 Profile Name 設定錯了要修改,必須移除整個 Bond 設定,然後再重建;如果直接修改設定,關聯的設定檔名稱 ifcfg-XXX 並不會一起被更新,這會造成爾後管理上的困擾。
變更 Bonding 模式
預設模式是使用 Load Balancing (Round-Robin),將它變更為 Acitve-Backup
nmtui > Edit a connection > Bond: bond0 > Edit >
NOTE: 如果要使用預設的 Round-Robin 模式,網卡所連結的 Switch 設備必須設定 EtherChannel,否則 Switch 設備會偵測到 vlan XX is flapping between port YYY and port ZZZ。
重啟網路服務
# 注意:如果有使用 iSCSI Disks,重啟網路服務可能造成系統其他問題
systemctl restart network.service
or
nmcli networking off; modprobe -r bonding ; nmcli networking on