How To Setup Bridge (br0) Network on Ubuntu Linux 14.04 and 16.04 LTS

How To Setup Bridge (br0) Network on Ubuntu Linux 14.04 and 16.04 LTS

To set up a bridge (br0) network on Ubuntu Linux 14.04 or 16.04 LTS, you can follow these steps:

  1. Install the bridge-utils package, which provides the tools needed to create and configure bridge networks:
sudo apt-get update
sudo apt-get install bridge-utils
Source:ww‮l.w‬autturi.com
  1. Edit the /etc/network/interfaces file to define the bridge network. Add the following lines to the file:
auto br0
iface br0 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    gateway 192.168.0.1
    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

Replace the address, netmask, and gateway values with the desired IP address, netmask, and default gateway for the bridge network. The eth0 interface will be added to the bridge.

  1. Restart the network service to apply the changes:
sudo systemctl restart networking
  1. To add additional interfaces to the bridge network, add them to the bridge_ports line in the /etc/network/interfaces file. For example:
bridge_ports eth0 eth1 wlan0

This will add the eth1 and wlan0 interfaces to the bridge network in addition to eth0.

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