Let's try to setup a bonding device and enslave four real ethernet devices to it:
# modprobe bonding
# ifconfig bond0 10.0.0.1 netmask 255.0.0.0
# ifenslave bond0 eth0 eth1 eth2 eth3
Once we have the bonding driver installed, we need to ensure that it is loaded when our computer boots up. For this, we need to add an alias in the module-init-tools setup. This alias associates the kernel module with the network interface name (typically bond0). It is also necessary to specify the options. I added the following lines to /etc/modprobe.d/arch/x86_64:
# modprobe bonding
# ifconfig bond0 10.0.0.1 netmask 255.0.0.0
# ifenslave bond0 eth0 eth1 eth2 eth3
Once we have the bonding driver installed, we need to ensure that it is loaded when our computer boots up. For this, we need to add an alias in the module-init-tools setup. This alias associates the kernel module with the network interface name (typically bond0). It is also necessary to specify the options. I added the following lines to /etc/modprobe.d/arch/x86_64:
alias bond0 bonding
#options bond0 mode=balance-alb miimon=100
If it works, you'll want to ensure that ifenslave is run at the next reboot.
From /etc/network/interfaces you can run ifenslave by using the "up" keyword.
auto bond0 iface bond0 inet static address 10.0.0.1 netmask 255.0.0.0 up /sbin/ifenslave bond0 eth0 eth1 eth2 eth3
Links:
Aggregating network interfaces
ifenslave(8) - Linux man page

Комментариев нет:
Отправить комментарий