From Noah.org
Jump to: navigation, search

Set static IP

These settings are lost on reboot. This is just for a temporary config.

# ip route add default via
# ifconfig eth0 netmask

Virtual Interfaces

Adding virtual interfaces is easy in Linux. Just add a number to a real interface name. In this example, I assume 'eth0' is the real interface name, so I will configure 'eth0:1' (you can pick any free number after the 'eth0:'). The netmask defaults to

ifconfig eth0:1

If you need to specify the netmask, this is easy:

ifconfig eth0:1 netmask

Delete an interface

Use the 'down' command:

# ifconfig eth0:1 down