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

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
    # For virtualized hosts, delay a bit
    pre-up sleep 2

auto eth1
iface eth1 inet manual

auto br1
iface br1 inet static
    bridge_ports eth1
    bridge_stp on
    bridge_maxwait 0
    address 10.70.128.179
    netmask 255.255.252.0
    # Arrange a default route for all "reply" packets received on the bridge
    # interface (for restarting this interface, we need to ignore errors; the
    # rule may not exist, there may already be a default route via the bridge)
    post-up ip rule   del from        10.70.128.179                  || true
    post-up ip rule   add from        10.70.128.179  table 3         || true
    post-up ip route  add             10.70.128.0/22 table 3 dev br1 || true
    post-up ip route  add default via 10.70.128.1    table 3         || true
    # Disable bridge multicast_snooping, enable multicast_querier so multicast
    # is reliably forwarded to Docker interfaces on bridge, and route multicast
    # over bridge, so multicast joins go to lab network
    post-up echo 0 > /sys/devices/virtual/net/br1/bridge/multicast_snooping
    post-up echo 1 > /sys/devices/virtual/net/br1/bridge/multicast_querier
    post-up ip route  add             224.0.0.0/4            dev br1 || true
