debian 10 綁定錯誤啟動 bond0

debian 10 綁定錯誤啟動 bond0

我嘗試在我的 Debian 10 計算機上設定綁定。我有2塊網路卡,我嘗試使用enp1s0fX連接埠。我的interfaces文件樣本

auto bond0
iface bond0 inet static
   address 192.168.211.124
   gateway 192.168.211.1
   netmask 255.255.255.0
   network 192.168.211.0
   bond-slaves enp1s0f0 enp1s0f1 enp1s0f2
   bond-mode active-backup
   bond-miimon 100

當我重新啟動時,我收到以下訊息dmesg
bond0: option mode: unable to set because the bond device has slaves

我不明白為什麼

答案1

該訊息來自內核,而不是來自 ifup:

bond0: option mode: unable to set because the bond device has slaves

當介面與綁定關聯後,您將無法變更綁定模式。

由於 active-backup 是預設模式(我假設這是您選擇的模式),因此您可以簡單地bond-mode從介面配置中刪除。

如果您確實需要設定綁定模式,請使用類似的模式:

auto enp1s0f0
iface enp1s0f0 inet manual
    bond-master bond0
    bond-primary eth0
    bond-mode active-backup

auto enp1s0f1
iface enp1s0f1 inet manual
    bond-master bond0
    bond-primary enp1s0f0
    bond-mode active-backup

auto enp1s0f2
iface enp1s0f2 inet manual
    bond-master bond0
    bond-primary enp1s0f0
    bond-mode active-backup

auto bond0
iface bond0 inet dhcp
    bond-slaves none
    bond-primary enp1s0f0
    bond-mode active-backup
    bond-miimon 100

相關內容