Skip to content

Instantly share code, notes, and snippets.

@dexterbt1
Created December 18, 2011 20:41
Show Gist options
  • Save dexterbt1/1494396 to your computer and use it in GitHub Desktop.
Save dexterbt1/1494396 to your computer and use it in GitHub Desktop.
dummy bridge for inter-vm VLAN
create a script like this
( mkdir /usr/local/scripts )
/usr/local/scripts/generate_vmbr20.sh
modprobe -o dummy0 dummy1
ifconfig dummy0 up
brctl addbr vmbr20
brctl addif vmbr20 dummy0
ifconfig vmbr20 up
chmod +x /usr/local/scripts/generate_vmbr20.sh
And add to your vmbr0-section in /etc/network/interfaces
post-up /usr/local/scripts/generate_vmbr20.sh
==========================================
# sample
/etc/network/interfaces
auto vmbr0
iface vmbr0 inet static
address x.y.z.41
netmask 255.255.255.224
gateway x.y.z.33
broadcast x.y.z.63
network x.y.z.32
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search mydomain.com
bridge_ports eth0
bridge_stp off
bridge_fd 0
post-up /usr/local/scripts/generate_vmbr20.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment