How to setup and configure network bridge on Debian Linux

How to setup and configure network bridge on Debian Linux

To set up and configure a network bridge on Debian Linux, you will need to perform the following steps:

  1. Install the bridge-utils package by running the following command:
‮t refer‬o:lautturi.com
sudo apt-get install bridge-utils
  1. Create a configuration file for the bridge interface, /etc/network/interfaces.d/br0, and add the following lines, replacing <interface1> and <interface2> with the names of the network interfaces you want to add to the bridge:
auto br0
iface br0 inet static
    address <static IP address>
    netmask <netmask>
    bridge_ports <interface1> <interface2>
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

Replace <static IP address> and <netmask> with the appropriate values for your network.

  1. Save the changes to the configuration file and exit the text editor.

  2. Restart the network service to apply the changes:

systemctl restart networking
  1. Verify that the bridge has been correctly configured by using the brctl command:
brctl show

This should show you the bridge interface, br0, and the interfaces that are part of the bridge.

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