Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create and link to article covering fundamental bridging btw existing network interface... the original use of a bridge.

Creating a Simple Bridge

I'm frankly still fuzzy on what's happening here. But this bridge works for my LXD host to allow my containers to interface with my hosts network directly.

Here is the default dhcp network interface...

Here is the network interface with modifications to make it static...

Here is we've added a bridge br0 that interfaces with the host's primary network card ens3,

Code Block
languagebash
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto br0
iface br0 inet static
    address 192.168.0.50
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-nameservers 192.168.0.1
    bridge-ports ens3
    bridge-stp off


Bridge File

Common to to all,

Code Block
languagebash
auto br0
iface br0 inet dhcp # or static but keeping simple for now


    # Required
    bridge_ports eth0 # Binds the bridge to your existing ethernet
    
    # Looks to be options
    bridge_maxwait 0
    bridge_stp off
    bridge_fd 0      # ?

...