ubuntu 12.04LTS setting up muti ips

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
flamedog
New to forums
New to forums
Posts: 13
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed May 09, 2012 4:08 pm

ubuntu 12.04LTS setting up muti ips

Post by flamedog »

ok first i try'ed - http://www.nfoservers.com/forums/viewto ... =68&t=5418
and that didnt work so i contacted support and they took me thought the steps and then after that didnt work they sent me here. So the thing is i just bought a new ip so i can have 2 ips for my vps

the probelm is when i go to restart the "networking" (sudo /etc/init.d/networkking restart) i get this error - http://i.imgur.com/E7lMQ.png

then it shows "[OK]" on then next line then exits to where it says "user@servername: "

my networking config(/etc/network/interface) looks like this

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address <main ip>
netmask <NetMask>
gateway <main ip gateway>

auto eth0:0
iface eth0:0 inet static
address <second ip>
netmask <NetMask>
gateway <second ip gateway>
paulg1981
A regular
A regular
Posts: 37
Joined: Wed Jan 26, 2011 2:43 pm

Re: ubuntu 12.04LTS setting up muti ips

Post by paulg1981 »

The gateway should be the same for both of your ip addresses. It is hard to tell if it is or not from your snippet?
flamedog
New to forums
New to forums
Posts: 13
Joined: Wed May 09, 2012 4:08 pm

Re: ubuntu 12.04LTS setting up muti ips

Post by flamedog »

the gateway and the address are the same (the ip from the iptable in account cpanel)
and the netmask set to 255.255.255.0
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: ubuntu 12.04LTS setting up muti ips

Post by Vanderburg »

The gateway is not always the same. The proper gateway for each IP address will be listed on the IP List tab of your control panel.
flamedog
New to forums
New to forums
Posts: 13
Joined: Wed May 09, 2012 4:08 pm

Re: ubuntu 12.04LTS setting up muti ips

Post by flamedog »

Vanderburg wrote:The gateway is not always the same. The proper gateway for each IP address will be listed on the IP List tab of your control panel.
I did not know that but i got the gateway from the tab as with the other ip info
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: ubuntu 12.04LTS setting up muti ips

Post by Edge100x »

Have you also tried rebooting? It looks like Ubuntu is getting confused here and is not taking down the old interface properly.
flamedog
New to forums
New to forums
Posts: 13
Joined: Wed May 09, 2012 4:08 pm

Re: ubuntu 12.04LTS setting up muti ips

Post by flamedog »

Edge100x wrote:Have you also tried rebooting? It looks like Ubuntu is getting confused here and is not taking down the old interface properly.
Ive done this and now its stuck on booting up on "Waiting for network config"

EDIT- it seems to have booted up

EDIT EDIT - it seems reinstalling and restoring from backup files worked ^^
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: ubuntu 12.04LTS setting up muti ips

Post by Edge100x »

Out of curiosity, how does the file that our system generated and put on for you differ from the one you created?
flamedog
New to forums
New to forums
Posts: 13
Joined: Wed May 09, 2012 4:08 pm

Re: ubuntu 12.04LTS setting up muti ips

Post by flamedog »

Edge100x wrote:Out of curiosity, how does the file that our system generated and put on for you differ from the one you created?
one i had

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address <main ip>
netmask <NetMask>
gateway <main ip gateway>

auto eth0:0
iface eth0:0 inet static
address <second ip>
netmask <NetMask>
gateway <second ip gateway>
auto gen'ed one

Code: Select all

auto lo

iface lo inet loopback

auto eth0
iface eth0 inet static
        address <main ip>
        netmask 255.255.255.0
        gateway <main ip gateway>
dns-nameservers 8.8.8.8 8.8.4.4

auto eth0:1
iface eth0:1 inet static
        address <second ip>
        netmask 255.255.255.0
        gateway <second ip gateway>
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: ubuntu 12.04LTS setting up muti ips

Post by Edge100x »

It's possible that it requires it start with :1, then, which is something new, if so. It looks like you also may have accidentally removed the dns-nameservers bit with yours.
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: ubuntu 12.04LTS setting up muti ips

Post by Vanderburg »

It's an index, so I don't see why starting with :0 is a problem. I'd also guess that it was the DNS servers.
Post Reply