PDA

View Full Version : Adding extra server IP's


wxman
8th July 2009, 22:34
When I add extra server IP's do I have to add them anywhere else? It's working as far as it's writing to the apache files. I checked, and it's adding the correct IP to the virtual server. The problem is I'm not able to get to the site if I type the local IP directly, or from the URL; I'm on the server locally. If I check ifconfig, the new IP isn't there.
I've added it manually to /etc/network/interfaces, but it keeps giving errors when I do a network restart. I've added one IP already, and I didn't do anything outside of ISPConfig with that one, and it's working. It also shows up in ifconfig.
This is what I added to /etc/network/interfaces:auto eth0:0
iface eth0:0 inet static
address 192.168.31.203
netmask 255.255.255.0
auto eth0:1
iface eth0:1 inet static
address 192.168.31.203
netmask 255.255.255.0
I'm getting this error when I restart:
* Reconfiguring network interfaces... SIOCSIFADDR: File exists
SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFNETMASK: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
Failed to bring up eth0:1.

till
9th July 2009, 11:25
You will have to assign the IP addresses in /etc/network/interfaces as you did already. Please check that these IP addresses are not in use by any other computer in your network. Here is a more complete for a working interfaces file from debian:

auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

auto eth0:0
iface eth0:0 inet static
address 192.168.0.101
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

wxman
9th July 2009, 17:36
I actually made a mistype there. One of those .203 is really .204. Is there a way to see if the addresses are assigned somewhere else? I've used ifconfig, and looked everywhere else I can see. I only have eth0 and eth1.

till
10th July 2009, 11:09
You can e.g try to ping them before you assign them to your server.