Bonding two Ethernet devices

In my continued investigations of networking stuff, I came across the question “How do you bond two ethernet devices together?”   While I did this years ago on RHEL3, I have pretty much forgotten how, so I decided to research and relearn this.

To start, I cloned my Centos 7 VM so I had a throw-away playground.  Before booting the VM, I added a second ethernet device on the default network, parallel to the existing device.


Then I booted it on up.

To start with, I have two ethernet devices that have both gotten their configuration information via DHCP.  I’m going to trash those to get to a clear starting point:

First, lets do it the easy way, with THe Network Manager Text UI (nmtui).

Create brings up this screen

Next to the box that says “slaves” (that term needs to go) Select add, and select ethernet:

And take all the defaults.

Do this again for the second ethernet device as well, and the result should look like this:

And exit out of nmtui.  You can use ip addr to see the current set up, and use ping to confirm that it works.

Lets do that using the CLI.  First, cleanup.

nmcli co delete "Bond connection 1"
nmcli co delete "Ethernet connection 1"
nmcli co delete "Ethernet connection 2"

Turns out there is a tutorial on the machine already:

man nmcli-examples

Example 6. Adding a bonding master and two slave connection profiles
$ nmcli con add type bond ifname mybond0 mode active-backup
$ nmcli con add type ethernet ifname eth1 master mybond0
$ nmcli con add type ethernet ifname eth2 master mybond0

Of course, that should be eth0 and eth1, but the steps laid out work and, again, you can test with ping once it is done.

Leave a Reply

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