Problems bringing up a second virtual network interface
/etc/networking/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 eth0:0 eth0:1
#eth0 is our main IP address
iface eth0 inet static
address 198.58.103.*
netmask 255.255.255.0
gateway 198.58.103.1
#eth0:0 is our private address
iface eth0:0 inet static
address 192.168.129.134
netmask 255.255.128.0
#eth0:1 is for www.site.com
iface eth0:1 inet static
address 198.58.104.*
netmask 255.255.255.0
gateway 198.58.104.1
When I run````
/etc/init.d/networking restart
, I get several errors about resolv.conf and then a fail error about bringing up eth0:1:
resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything.
ssh stop/waiting
ssh start/running, process 23229
RTNETLINK answers: File exists
Failed to bring up eth0:1.
Any reason this would be? I didn't have any problems with I first set up eth0 and eth0:0.
6 Replies
BTW, the /etc/resolv.conf thing isn't an error, exactly. The system is just whining that automatic management of the file is disabled. If that's what you want, it's not an error.
sudo ifdown eth0:1
ifdown: interface eth0:1 not configured
sudo ifup eth0:1
RTNETLINK answers: File exists
Failed to bring up eth0:1.
Is there a correct way to restart networking? I was doing /etc/init.d/networking restart.
@Vance:
Note that a reboot is necessary to add a new IP address (this is a Linode requirement, not a Linux one).
Any reason why? A Zen thing?