This will be about how to “bond” two Ethernet connections together to create an virtual auto failover interface.
If you have from the same ISP (internet service provider) two redundant (different) uplinks, you could create a failover solution.
Debian way installation – was tested on debian squeeze.
First we install the ifenslave-2.6 package, necessary to enable bonding on the system:
1 | apt-get install ifenslave-2.6 |
Next we configure some network stuff here: /etc/network/interfaces
1 2 3 4 5 6 7 8 9 10 11 12 | # A bonding master is defined like this: auto bond0 iface bond0 inet static address 192.168.2.10 netmask 255.255.255.0 network 192.168.2.0 gateway 192.168.2.1 slaves eth0 eth1 bond-mode active-backup bond-miimon 100 bond-downdelay 200 bond-updelay 200 |
bond_primary eth0 eth1 eth2 : Several interfaces can be given to bond_primary.
The first interface that is found to be present would become the primary.
Which NIC is now active?
1 | cat /sys/class/net/bond0/bonding/active_slave |
Leave a Reply