Interfaces.

This commit is contained in:
Miguel Scapolla 2016-05-06 23:34:43 -03:00
parent e69672c61c
commit f8f1055a9b
1 changed files with 44 additions and 0 deletions

44
interfaces.sh Normal file
View File

@ -0,0 +1,44 @@
#
# /etc/network/interfaces
#
# Loopback.
auto lo
iface lo inet loopback
# Another loopback.
auto lo:50
iface lo:50 inet static
address 192.168.0.1
netmask 255.255.255.255
# VLANs.
auto eth0
auto eth0.100
auto eth0.333
auto eth0.333.400
# Physical interface,
iface eth0 inet manual
mtu 1508
pre-up /sbin/ifconfig eth0 mtu 1508
# Vlan 100.
iface eth0.100 inet static
address <IP_ADDR>
netmask <IP_MASK>
gateway <GATEWAY>
dns-nameservers <DNS1> <DNS2>
mtu 1500
# Vlan 333.
iface eth0.333 inet manual
mtu 1500
up /sbin/vconfig add eth0.333 400
# Vlan 333.400.
iface eth0.333.400 inet static
address <IP_ADDR>
netmask <IP_MASK>
mtu 1500
pre-up /sbin/ifconfig eth0.333 up