Setting up Gentoo Networking after IP Change?

I just moved from a Linode 64 to a Linode 96, and my IP changed. While I have a support ticket in for this, I really would like to get this fixed ASAP because right now my entire site is down.

Basically I changed all the configs to add the new IP, route, and dns servers, even clicked save on the configuration for my lindoe, but I still can't get network access to its new IP, only via console.

Is there anyhting else that needs to be done? Seems like a routing problem. Here is some output from my Linode:

kami root # route add default gw 65.19.178.1

SIOCADDRT: Network is unreachable

/etc/conf.d.net:

iface_eth0="66.160.141.4 netmask 255.255.255.0"

gateway="eth0/65.19.178.1"

/etc/resolv.conf:

domain garzsbarg.com

search linode.com

nameserver 216.156.129.65

nameserver 12.96.160.115

nameserver 216.234.234.30

ifconfig eth0:

eth0 Link encap:Ethernet HWaddr FE:FD:42:A0:8D:04

inet addr:66.160.141.4 Bcast:66.255.255.255 Mask:255.255.255.0

inet6 addr: fe80::fcfd:42ff:fea0:8d04/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:102 errors:0 dropped:0 overruns:0 frame:0

TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

collisions:0

RX bytes:27241 (26.6 Kb) TX bytes:468 (468.0 b)

6 Replies

That gateway doesn't go with that IP and subnet mask.

Remember your IP networking: two machines are on the same subnet if and only if ( address1 & netmask) = (address2 & netmask), where '&' is the bitwise logical AND operator. Your gateway must be on the same subnet as you are.

Since you've got 255.255.255.0 as your subnet mask, your gateway's IP needs to have the first three numbers be the same as the first three numbers in your IP; it will be in the form 66.160.141.something.

Recheck your gateway in the Linode control panel.

The default gateway should be 66.160.141.1

At HE, you'll need a default gateway for each subnet you have an IP in. At ThePlanet, it didn't matter – they allowed you to gateway through any of the subnets.

I've updated the control panel (netinfo page, and config profile edit page), so at least now it shows the correct gateway for your primary IP.

-Chris

OK thanks, it seems to be up now, but do I need that other IP as well for some other route?

output of route -n:

root@kami crisis # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
66.160.141.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         66.160.141.1    0.0.0.0         UG    1      0        0 eth0

@Crisis:

OK thanks, it seems to be up now, but do I need that other IP as well for some other route?
At HE, you'll need a default gateway for each IP you have in a different subnet.

If your IPs were:

192.168.1.222 and

192.168.2.222

You would need these two gateways:

route add default gw 192.168.1.1

route add default gw 192.168.2.1

-Chris

So the IP address 65.19.178.1 mentioned on the network info page has nothing to do with my linode since my only IP is 66.160.141.4 ?

@Crisis:

So the IP address 65.19.178.1 mentioned on the network info page has nothing to do with my linode since my only IP is 66.160.141.4 ?
Right - that's the gateway assigned to the host. It's a left-over from when I only assigned certain IPs to each host, and they weren't portable across hosts.

Like I mentioned, I've updated the LPM to correct this.

DHCP will always assign the correct initial IP and gateway.

-Chris

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