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

Multiple IPs on single interface



I am adding multiple IPs with different subnets to my single interface on this machine. Everything works fine except whenever I issue an `ifup eth0:1` command I get this...

# ifup eth0:1
SIOCADDRT: File exists
Failed to bring up eth0:1.

And it's the first time I try to bring it up. But despite the message, it works fine. The IP suddenly becomes pingable after that. Doing `ifup eth0:0` is fine, no output.

The thing is if I remove eth0:1 stanza, and I try to do `ifup eth0:0` it will say the same-thing.

Everything is working, I just want to know why I am getting that error, and if it's safe to permanently save this interfaces file despite the errors.

My /etc/network/interfaces
_____________________________________
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 117.10.268.211
        netmask 255.255.255.0
        network 117.10.268.0
        broadcast 117.10.268.255

auto eth0:0
iface eth0:0 inet static
        address 64.16.155.107
        netmask 255.255.255.0
        network 64.16.255.0
        broadcast 64.16.255.255
        gateway 117.10.267.1

auto eth0:1
iface eth0:1 inet static
        address 64.16.155.108
        netmask 255.255.255.0
        network 64.16.255.0
        broadcast 64.16.255.255
        gateway 117.10.267.1

up route add -host 117.10.267.1 dev eth0
up route add default gw 117.10.267.1
_______________________________________


P.S. IPs are fake, but it's pretty much what mine looks like.




Reply to: