How to set up a bridge network on Ubuntu?

by wayne.swaniawski , in category: Networking & Wireless , a year ago

How to set up a bridge network on Ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by albert , a year ago

@wayne.swaniawski 

To set up a bridge network on Ubuntu, follow these steps:

  1. Install the bridge-utils package by running the following command in the terminal:
1
sudo apt-get install bridge-utils


  1. Disable Network Manager by opening the file /etc/network/interfaces in a text editor and commenting out any lines that start with "auto" or "iface". Then restart the networking service by running the following command:
1
sudo service networking restart


  1. Edit the file /etc/network/interfaces and add the following lines:
1
2
3
auto br0
iface br0 inet dhcp
    bridge_ports eth0


Here, "eth0" is the name of the interface that you want to bridge. Replace it with the name of your actual interface.

  1. Restart the networking service again:
1
sudo service networking restart


  1. Verify that the bridge network is working by running the following command:
1
brctl show


You should see a bridge named "br0" with the interface "eth0" added to it.


That's it! Your Ubuntu machine is now connected to a bridge network.