Monday, July 12, 2010

a graceful pseudo interface for debian...

edit:  /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 ten network interface
auto eth0
iface eth0 inet static
        address 10.100.10.5
        netmask 255.255.255.0
        network 10.100.10.0
        broadcast 10.100.10.255
        gateway 10.100.10.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.100.10.10
        dns-search ten.com

# ten net eth0:1
auto eth0:1
iface eth0:1 inet static
        address 10.100.10.15
        netmask 255.255.255.0
        network 10.100.10.0
        broadcast 10.100.10.255
        gateway 10.100.10.1
        dns-nameservers 10.100.10.10
        dns-search ten.com

then... /etc/init.d/network restart
or ifup eth0:1 if you're afeared.

This is useful if you want a logical interface on the same network.  This'll also work on VLAN-tagged networks (if your switch port is untagged, of course).
Post a Comment