To set up a bridge (br0) network on Ubuntu Linux 14.04 or 16.04 LTS, you can follow these steps:
bridge-utils
package, which provides the tools needed to create and configure bridge networks:sudo apt-get update sudo apt-get install bridge-utilsSource:wwl.wautturi.com
/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.
sudo systemctl restart networking
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
.