Skip to content

Instantly share code, notes, and snippets.

@mostafahussein
Forked from martiell/interfaces
Created February 10, 2018 16:58
Show Gist options
  • Save mostafahussein/5cbe0b8b0b777cd788a64947fac1612b to your computer and use it in GitHub Desktop.
Save mostafahussein/5cbe0b8b0b777cd788a64947fac1612b to your computer and use it in GitHub Desktop.
macvlan and bridge networking
auto lo
iface lo inet loopback
iface eth0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth0
auto macvlan0
iface macvlan0 inet manual
up ip link add link br0 name macvlan0 type macvlan mode bridge
up ifconfig macvlan0 up
up route add -net 192.168.75.0/24 macvlan0
up route del -net 192.168.75.0/24 br0
down route add -net 192.168.75.0/24 br0
down ip link delete macvlan0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment