Showing results for 
Search instead for 
Did you mean: 


Waqar Razi
Regular Advisor


I have configured bonding using two lan cards eth0, eth1 and created a bonding file ifcfg-bond0.
I can ping my self. But cant ping the other servers.

Do I need to make some changes on the switch as well?

I have one more question here, Can I get IP Address for the bonding channel (bond0 having two network interfaces eth0 and eth1) from DHCP server.

Do I need to make some configurations here.

I will really appreciate your help.

THanks in advance.
Steven McCoy
Valued Contributor

Re: Bonding

Once you've created the bonded device (bond0), you should be able to treat it just like any other ethernet device (at least in my experience):

ifconfig bond0 netmask
route add default gw
echo 'nameserver' > /etc/resolv.conf

^ please replace '' with the IP address you want, the '' with the subnet mask on the network, and '' with the router/gateway and DNS server(s) you may have.
Waqar Razi
Regular Advisor

Re: Bonding

Can bonding channel use DHCP?
Steven McCoy
Valued Contributor

Re: Bonding

In my experience, yes:

dhcpcd bond0

Does that work for you?
Honored Contributor

Re: Bonding

Some bonding modes will require configuration at the switch side, some won't.

Which bonding mode did you choose?

This is usually configured in /etc/modprobe.conf (or /etc/modules.conf in older versions of Linux). The configuration appears usually in one or two lines:

alias bond0 bonding
options bond0 mode= [other options]

If no mode is specified, the default is "balance-rr", which sends outgoing packets sequentially from each available slave NIC in turn. From the switch side, this looks like one MAC address is rapidly jumping from one port to another and back.

If your switch has (for example) security features to disallow MAC address hijacking, it might disable traffic to those ports in this case. If the security feature can be disabled in the switch, you might be able to use this mode.

If you don't need extra bandwidth but only fault tolerance, choose mode 1, "active-backup". It will use only one slave NIC at a time, and switch only if the active NIC loses connection. This mode is the easiest to get working if the switch configuration is not accessible and/or you don't know anything about the features of that particular switch.

With this mode, you will also have to define what is regarded as a "lost connection": you can either just monitor the NIC link state (miimon) or make the system monitor the link by ARP probes.

Link state monitoring is easier to set up and does not cause any extra traffic to the network; ARP probes require more configuration and will cause extra traffic, but will catch more failure situations than link state monitoring.

Example modprobe.conf options line for link state monitoring:

options bond0 mode=active-backup miimon=100
options bond0 mode=1 miimon=100

(miimon=100 means the link state is checked in 100 ms intervals)

If you need the bandwidth of both NICs and the switch does not allow you to use the default "balance-rr" mode, you might have to use the mode 4, "802.3ad". This mode *will* require some configuration at the switch side to enable 802.3ad link aggregation mode.

Example modprobe.conf options line for this configuration:

options bond0 mode=802.3ad
options bond0 mode=4

For more information, see RedHat documentation: