Page tree

Versions Compared

Key

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

...

Where to find reference on exact commands?

The bridge-utils-interface man pages describe the options.

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      # ?



Reference

Differences between articles,

https://insights.ubuntu.com/2015/11/10/converting-eth0-to-br0-and-getting-all-your-lxc-or-lxd-onto-your-lan/ - LXC/LXD specific bridging. This looks quite different than the other examples and not sure why

Code Block
languagebash
auto br0
iface br0 inet dhcp
    bridge-ifaces eth0 # Different than other examples.
    bridge-ports eth0
    up ifconfig eth0 up # Different than other examples.

iface eth0 inet manual # Different than other examples.


https://help.ubuntu.com/community/KVM/Networking - KVM specific, but also explains each item more,

...