Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#
# https://wiki.debian.org/NetworkConfiguration
#
# The loopback network interface.
auto lo
iface lo inet loopback
# The two gigabit interfaces will be controller by OVS
auto em49
iface em49 inet manual
auto em50
iface em50 inet manual
auto em2
iface em2 inet static
address 172.24.16.57
netmask 255.255.252.0
gateway 172.24.16.1
dns-nameservers 69.20.0.164 69.20.0.196
post-up ip a a 146.20.138.58/32 dev em2
auto em2.64
iface em2.64 inet manual
vlan-raw-device em2
auto em2.65
iface em2.65 inet manual
vlan-raw-device em2
# Container management bridge
auto br-mgmt
iface br-mgmt inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port references tagged interface
bridge_ports em2.64
address 172.29.236.11
netmask 255.255.252.0
post-up ip a a 172.29.236.10/32 dev br-mgmt
# OpenStack Networking VLAN bridge
auto br-vlan
iface br-vlan inet manual
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port references untagged interface
bridge_ports veth-ovs-vlan
# Storage bridge (optional)
auto br-storage
iface br-storage inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port reference tagged interface
bridge_ports em2.65
address 172.29.244.11
netmask 255.255.252.0
# OpenStack Networking VXLAN (tunnel/overlay) bridge
auto br-vxlan
iface br-vxlan inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Bridge port references tagged interface
bridge_ports veth-ovs-vxlan
address 172.29.240.11
netmask 255.255.252.0
### OVS Configuration ###
auto br-bond1
allow-ovs br-bond1
iface br-bond1 inet manual
ovs_type OVSBridge
ovs_ports bond1
post-up ovs-vsctl add-port br-bond1 veth-br-vxlan tag=66 vlan_mode=access
post-up ovs-vsctl add-port br-bond1 veth-br-vlan
# Add a tagged bond port using LACP
allow-br-bond1 bond1
iface bond1 inet manual
ovs_bridge br-bond1
ovs_type OVSBond
ovs_bonds em49 em50
ovs_options bond_mode=balance-tcp lacp=active other_config:lacp-time=fast bond_updelay=2000 bond_downdelay=400
auto veth-br-vlan
iface veth-br-vlan inet manual
pre-up /sbin/ip link add name veth-br-vlan type veth peer name veth-ovs-vlan
pre-up /sbin/ip link set veth-br-vlan up
pre-up /sbin/ip link set veth-ovs-vlan up
pre-down /sbin/brctl delif br-vlan veth-ovs-vlan
pre-down ovs-vsctl del-port br-bond1 veth-br-vlan
pre-down /sbin/ip link delete veth-br-vlan
pre-down /sbin/ip link delete veth-ovs-vlan
auto veth-br-vxlan
iface veth-br-vxlan inet manual
pre-up /sbin/ip link add name veth-br-vxlan type veth peer name veth-ovs-vxlan
pre-up /sbin/ip link set veth-br-vxlan up
pre-up /sbin/ip link set veth-ovs-vxlan up
pre-down /sbin/brctl delif br-vxlan veth-ovs-vxlan
pre-down ovs-vsctl del-port br-bond1 veth-br-vxlan
pre-down /sbin/ip link delete veth-br-vxlan
pre-down /sbin/ip link delete veth-ovs-vxlan
source /etc/network/interfaces.d/*.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment