mirror of
https://bitbucket.org/mangelo/snippets.git
synced 2024-11-21 18:31:00 +02:00
Interfaces.
This commit is contained in:
parent
e69672c61c
commit
f8f1055a9b
44
interfaces.sh
Normal file
44
interfaces.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user