Debian//etc/network/interfaces

From Useful Things
Revision as of 07:59, 7 January 2015 by Milosivanovic (talk | contribs) (Created page with "= DHCP setup = <pre> auto eth0 iface eth0 inet dhcp </pre> = Static IP setup = <pre> auto eth0 iface eth0 inet static address 192.168.100.2 netmask 255.255.255.248 gateway...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DHCP setup

auto eth0
iface eth0 inet dhcp

Static IP setup

auto eth0
iface eth0 inet static
	address 192.168.100.2
	netmask 255.255.255.248
	gateway 192.168.100.1

Secondary IP / alias interface setup

auto eth0:0
iface eth0:0 inet static
	address 123.123.123.123
	netmask 255.255.255.255

Extra startup commands

auto eth0:0
iface eth0:0 inet static
	address 123.123.123.123
	netmask 255.255.255.255
	up ip route change default via 192.168.100.1 dev eth0 src 123.123.123.123