VLAN

From Hack Sphere Labs Wiki
Jump to: navigation, search

Debian VLAN Example

/etc/network/interfaces

# 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

#Config  With VLANS

#ETHERNET
auto eth0
iface eth0 inet manual

#ETHERNET VLANS

#VLAN 20 - INTERNAL
iface eth0.20 inet manual
        vlan_raw_device eth0

#VLAN 10 - NORMAL
iface eth0.10 inet manual
        vlan_raw_device eth0

#VLAN 30 - DMZ
iface eth0.30 inet manual
        vlan_raw_device eth0

#BRING UP INTERFACES

#VLAN 20 - INTERNAL
auto xenbr0
iface xenbr0 inet static
       bridge_ports eth0.20
       address 10.0.0.10
       netmask 255.255.255.0
       network 10.0.0.0
       broadcast 10.0.0.255
       gateway 10.0.0.1
       # dns-* options are implemented by the resolvconf package, if installed
       dns-nameservers 10.0.0.1

#VLAN 10 - NORMAL
auto xenbr1
iface xenbr1 inet manual
        bridge_ports eth0.10

#VLAN 30 - DMZ
auto xenbr2
iface xenbr2 inet manual
        bridge_ports eth0.30