Linode Forum Index Linode Forum
Linode Community Forums
 


Setting a default IP when using multiple IPs

Click here to go to the original topic

 
       Linode Forum Index -> Linux Networking
Author Message
mattm



Joined: 21 Mar 2010
Posts: 39

Posted: Tue Sep 28, 2010 3:09 pm    Post subject: Setting a default IP when using multiple IPs  

I have a linode running cPanel software. I have 2 IP's on the server and I have the default gateway setup to use eth0

However, the server keeps defaulting back to eth0:1 which is not what my cpanel is licensed to. For a while it would flip in and out between which IP it was responding to, but now if I check what its going out as using lynx and an ip address site, it shows up as teh secondary.

Does anyone have a work around for this?
Back to top  
Stan_Theman



Joined: 29 Jan 2010
Posts: 31
Location: New Jersey

Posted: Tue Sep 28, 2010 3:36 pm    Post subject:  

It sounds like you haven't configured static networking. Have you used this guide?

http://library.linode.com/networking/configuring-static-ip-interfaces
Back to top  
mattm



Joined: 21 Mar 2010
Posts: 39

Posted: Wed Sep 29, 2010 9:39 am    Post subject:  

ok I did eth0 and eth0:1

maybe the system is skipping over to eth0:1 instead of eth0:0?
Back to top  
mattm



Joined: 21 Mar 2010
Posts: 39

Posted: Wed Sep 29, 2010 9:41 am    Post subject:  

meaning because i didn't create eth0:0 it's defaulting to eth0:1 for some reason.
Back to top  
mattm



Joined: 21 Mar 2010
Posts: 39

Posted: Wed Sep 29, 2010 3:10 pm    Post subject:  

ok i believe I got it - just hoping the DHCP of linode network doesn't blip it back...

Code: root@server1 [~]# route -n

0.0.0.0         69.164.221.1    0.0.0.0         UG    0      0        0 eth0
0.0.0.0         97.107.141.1    0.0.0.0         UG    0      0        0 eth0

that was showing 2 default gateway routes.

Code: root@server1 [~]# route del default gw 69.164.221.1 eth0


removed that secondary route that I didn't want. No need to network restart, server started coming up as the IP I wanted.
Back to top  
akerl



Joined: 05 Jul 2010
Posts: 123

Posted: Wed Sep 29, 2010 5:48 pm    Post subject:  

mattm wrote: just hoping the DHCP of linode network doesn't blip it back...

DHCP only gives your linode it's networking info if you've got it setup to use DHCP. If you have static networking configured, then DHCP has nothing to do with you.
Back to top  
 
       Linode Forum Index -> Linux Networking
Page 1 of 1