zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Bonding

January 18, 2013 by Igor Drobot Leave a Comment

Bonding

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

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

# 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

cat /sys/class/net/bond0/bonding/active_slave

Filed Under: Linux Tagged With: Bonding, Debian, Failover, networking, redundancy

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok