New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Assigning an additional IP to a Dedicated
AsuraHosting
Member
Hey guys, I just got a new server and I was trying to assign a secondary IP to the dedicated server; but every time I restart the networking, it cuts me off from the server; so I'm sure that I'm probably just doing it wrong.
The server is on Debian 6.0.4 (Squeeze); and I was following this: http://wiki.debian.org/NetworkConfiguration#A.2BAC8-etc.2BAC8-network.2BAC8-interfaces
It doesn't seem to work... if anyone could help point out how to do it, I'd appreciate it a lot! Thanks in advance.
Comments
I'm guessing your editing /etc/network/interfaces manually? If so, you either need to do
auto eth0:1
, etc, or when you restart networking, do it with/etc/init.d/networking restart && ifup eth0 && ifup eth0:1
, etc, since restarting networking in this fashion doesn't auto-up the interfaces unless that auto flag is set.Example:
@Aldryic
Yeah I'm a bit confused; I tried to add the following, but it locked me out of my server and I was forced to access it through KVM...
allow-hotplug eth0:1
iface eth0:1 inet static
address sec.on.dar.y
netmask 255.255.255.0
eth0:1 is a virtual interface, you can't "allow hotplug" it :P Remove that line, add the network, gateway, and broadcast, and you should be set.
@Aldyric; I don't have a broadcast, it should work fine right?
By the way, thanks a lot for the help; really appreciate this man
No worries, I fought with the same thing myself :P Broadcast isn't always necessary... but if you're not running DHCP you do need to declare a gateway.
@Aldryic
I'm trying to fix it up, but it seems to be not working correctly...
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...SIOCDELRT: No such process
SIOCADDRT: No such process
Failed to bring up eth0:1.
done.
My /etc/init.d/networking looks like this
Ah, I found out the solution... just needed to remove gateway.
Thanks for everything @Aldryic !
No worries