Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Created February 13, 2015 04:45
Show Gist options
  • Save cloudnull/868a953a940f3643f226 to your computer and use it in GitHub Desktop.
Save cloudnull/868a953a940f3643f226 to your computer and use it in GitHub Desktop.
br-vlan interface with a veth pluged into it.
auto br-vlan
iface br-vlan inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
address 172.29.248.100
netmask 255.255.252.0
# Create veth pair, don't bomb if already exists
pre-up ip link add br-vlan-veth type veth peer name eth12 || true
# Set both ends UP
pre-up ip link set br-vlan-veth up
pre-up ip link set eth12 up
# Delete veth pair on DOWN
post-down ip link del br-vlan-veth || true
bridge_ports br-vlan-veth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment