How To Setup Bonded (bond0) and Bridged (br0) Networking On Ubuntu LTS Server

How To Setup Bonded (bond0) and Bridged (br0) Networking On Ubuntu LTS Server

To set up bonded (bond0) and bridged (br0) networking on an Ubuntu LTS server, you can use the following steps:

  1. Install the required packages by running the following command:
sudo apt-get install ifenslave bridge-utils
Source:w‮.ww‬lautturi.com
  1. Edit the /etc/network/interfaces file and add the following lines to create the bond0 interface:
auto bond0
iface bond0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1
    bond-slaves eth0 eth1
    bond-mode active-backup
    bond-miimon 100
    bond-downdelay 200
    bond-updelay 200

Replace 192.168.1.100, 255.255.255.0, and 192.168.1.1 with the desired static IP address, netmask, and gateway for the bond0 interface. Replace eth0 and eth1 with the names of the network interfaces that you want to include in the bond.

  1. Add the following lines to create the br0 interface:
auto br0
iface br0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1
    bridge_ports bond0
    bridge_stp off
    bridge_fd 0

Replace 192.168.1.101, 255.255.255.0, and 192.168.1.1 with the desired static IP address, netmask, and gateway for the br0 interface.

  1. Save the /etc/network/interfaces file and restart the networking service by running the following command:
sudo service networking restart

The bond0 and br0 interfaces should now be configured and active. You can verify the configuration by running the ifconfig command and looking for the bond0 and br0 interfaces in the output.

Keep in mind that the above steps assume that you are using the /etc/network/interfaces file to configure the network interfaces. If you are using a different method to configure the network, the steps may be different.

For more information on configuring bonded and bridged networking on Ubuntu, you can refer to the Ubuntu documentation or the documentation for the ifenslave and bridge-utils packages.

Created Time:2017-10-29 22:08:31  Author:lautturi