[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sarge ip alias?



On Thu, Jul 28, 2005 at 11:46:34AM -0500, Matthew Lenz wrote:
>so what's the proper debian way of adding an ip alias to an interface?
>
>say i've got 192.168.0.2 on eth0 and I want 192.168.0.3 on eth0:0 (or 1
>whatever debian uses for the first ip alias on an interface)
>

put this in /etc/network/interfaces

iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    up ip addr add dev $IFACE 192.168.0.3/24 broadcast 192.168.1.255 label eth0:1
    down ip addr flush dev $IFACE



Reply to: