How To Setup Bonded (bond0) and Bridged (br0) Networking On Ubuntu LTS Server
To set up bonded (bond0) and bridged (br0) networking on Ubuntu LTS server, follow these steps:
- Install the necessary packages:
sudo apt-get update
nsudo apt-get install ifenslave- Configure network interfaces: Edit the network interface configuration file,
/etc/network/interfaces, and configure the network interfaces you want to bond. Here is an example of two bonded interfaces,eth0andeth1, that are also part of a bridge,br0:
# The loopback network interface
auto lo
niface lo inet loopbackn# The primary network interface
auto eth0
niface eth0 inet manual
nbond-master bond0
# The secondary network interface
auto eth1
niface eth1 inet manual
nbond-master bond0
# The bonded interface
auto bond0
niface bond0 inet dhcp
nbond-mode active-backup
nbond-miimon 100
nbond-slaves none# The bridge interface
auto br0
niface br0 inet dhcp
nbridge_ports bond0
nbridge_stp off
nbridge_fd 0- Restart networking: Restart networking to apply the changes:
sudo /etc/init.d/networking restart- Verify the setup: Verify the bond and bridge setup by checking the status of the interfaces:
cat /proc/net/bonding/bond0
nbrctl showThat’s it! You’ve successfully set up bonded (bond0) and bridged (br0) networking on Ubuntu LTS server. You should now have a more robust and flexible network configuration.
n(louisvilleroofing.com)