我在 Debian 10.11 上创建绑定接口时遇到问题。
我所做的是安装ifenslave
然后停止网络。我编辑/etc/network/interfaces
如下:
#WiFi Interface
auto mlan0
iface mlan0 inet manual
bond-master bond0
bond-primary mlan0
bond-mode active-backup
wpa-ssid SSID
wpa-psk PSK
#Bonding Interface
auto bond0
iface bond0 inet dhcp
bond-slaves none
bond-primary mlan0
bond-mode active-backup
bond-miimon 100
下一步是重新启动网络服务,我在系统日志中收到如下错误:
Feb 18 13:25:16 A11VRW systemd[1]: Starting Raise network interfaces...
Feb 18 13:25:16 A11VRW ifup[2278]: /etc/network/if-pre-up.d/ifenslave: 19: /etc/network/if-pre-up.d/ifenslave: cannot create /sys/class/net/bonding_masters: Permission denied
Feb 18 13:25:16 A11VRW ifup[2278]: /etc/network/if-pre-up.d/ifenslave: 47: /etc/network/if-pre-up.d/ifenslave: cannot create /sys/class/net/bond0/bonding/miimon: Directory nonexistent
Feb 18 13:25:16 A11VRW ifup[2278]: Device "bond0" does not exist.
Feb 18 13:25:16 A11VRW ifup[2278]: /etc/network/if-pre-up.d/ifenslave: 47: /etc/network/if-pre-up.d/ifenslave: cannot create /sys/class/net/bond0/bonding/mode: Directory nonexistent
Feb 18 13:25:16 A11VRW dhclient[2321]: Internet Systems Consortium DHCP Client 4.4.1
Feb 18 13:25:16 A11VRW dhclient[2321]: Copyright 2004-2018 Internet Systems Consortium.
Feb 18 13:25:16 A11VRW ifup[2278]: Internet Systems Consortium DHCP Client 4.4.1
Feb 18 13:25:16 A11VRW ifup[2278]: Copyright 2004-2018 Internet Systems Consortium.
Feb 18 13:25:16 A11VRW ifup[2278]: All rights reserved.
Feb 18 13:25:16 A11VRW ifup[2278]: For info, please visit https://www.isc.org/software/dhcp/
Feb 18 13:25:16 A11VRW dhclient[2321]: All rights reserved.
Feb 18 13:25:16 A11VRW dhclient[2321]: For info, please visit https://www.isc.org/software/dhcp/
Feb 18 13:25:16 A11VRW dhclient[2321]:
Feb 18 13:25:16 A11VRW ifup[2278]: Cannot find device "bond0"
Feb 18 13:25:16 A11VRW dhclient[2321]: Failed to get interface index: No such device
Feb 18 13:25:16 A11VRW ifup[2278]: Failed to get interface index: No such device
Feb 18 13:25:16 A11VRW ifup[2278]: If you think you have received this message due to a bug rather
Feb 18 13:25:16 A11VRW ifup[2278]: than a configuration issue please read the section on submitting
Feb 18 13:25:16 A11VRW ifup[2278]: bugs on either our web page at www.isc.org or in the README file
Feb 18 13:25:16 A11VRW ifup[2278]: before submitting a bug. These pages explain the proper
Feb 18 13:25:16 A11VRW ifup[2278]: process and the information we find helpful for debugging.
Feb 18 13:25:16 A11VRW ifup[2278]: exiting.
Feb 18 13:25:16 A11VRW dhclient[2321]:
Feb 18 13:25:17 A11VRW dhclient[2321]: If you think you have received this message due to a bug rather
Feb 18 13:25:17 A11VRW dhclient[2321]: than a configuration issue please read the section on submitting
Feb 18 13:25:17 A11VRW dhclient[2321]: bugs on either our web page at www.isc.org or in the README file
Feb 18 13:25:17 A11VRW dhclient[2321]: before submitting a bug. These pages explain the proper
Feb 18 13:25:17 A11VRW dhclient[2321]: process and the information we find helpful for debugging.
Feb 18 13:25:17 A11VRW ifup[2278]: ifup: failed to bring up bond0
Feb 18 13:25:17 A11VRW dhclient[2321]:
Feb 18 13:25:17 A11VRW dhclient[2321]: exiting.
Feb 18 13:25:17 A11VRW systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 13:25:17 A11VRW systemd[1]: networking.service: Failed with result 'exit-code'.
Feb 18 13:25:17 A11VRW systemd[1]: Failed to start Raise network interfaces.
我尝试制作modprobe bonding
甚至添加它/etc/modules
但出现如下错误:
# modprobe bonding
modprobe: FATAL: Module bonding not found in directory /lib/modules/4.19.94-1.0.12+
我应该怎么办?