Skip to content
TrySitePrice

How to setup and configure network bridge on Debian Linux

Best/Tutorial

To set up and configure a network bridge on Debian Linux, follow these steps:

  1. Install the required packages:

    sudo apt-get update
    sudo apt-get install bridge-utils -y

  2. Create a backup of your network interfaces configuration file:

    sudo cp /etc/network/interfaces /etc/network/interfaces.bak

  3. Edit the network interfaces configuration file:

    sudo nano /etc/network/interfaces

  4. Define the network bridge, replace eth0 with the name of your Ethernet interface:

    auto br0
    iface br0 inet dhcprn bridge_ports eth0
     bridge_stp off
     bridge_fd 0
     bridge_maxwait 0

  5. Restart the networking service to apply the changes:

    sudo systemctl restart networking

  6. Verify the network bridge is up and running:

    sudo brctl show

  7. Verify the IP address of the bridge interface:

    ip addr show br0

rnNow, your Debian Linux system is configured with a network bridge that is using DHCP to obtain an IP address. You can modify the configuration as needed, for example, to use a static IP address.