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?

5 Replies

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

http://library.linode.com/networking/co … interfaces">http://library.linode.com/networking/configuring-static-ip-interfaces

ok I did eth0 and eth0:1

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

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

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

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.

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.

@mattm:

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct