RSS Feed
Mar 23

Almost dead blog, but that’s not good.

Posted on Sunday, March 23, 2008 in linux, network

Oh man, I wish I would get to post here more often, then I’d probably have a lot less problems. These days, the simplest of tasks can become a big pain in the neck. I was doing some re-racking of servers to place them in correct order and I noticed one of the servers was connected on Port 2 instead of Port 1 (Ethernet) — I’m a big fan of consistency.

So I decided to change it, I get the monitor & keyboard and start messing. It sounded pretty simple, we have a service called ifaliases that activates all the other IPs by creating aliases (duh!). I edited that file to make the main interface eth0 instead of eth1, unplug from Port 2, plug in Port 1, wait a couple of minutes, …, still unpingable, ugh.

I tried to ping other servers in the same subnet, I was able to ping them. I checked the route table and it seems there was no default route for all traffic, I created a custom route and the network started to work, but the problem is that every time the interface is restarted, the route table would need to be recreated, blah blah, it’s a dumb idea.

I looked everywhere until I found the magical file: /etc/sysconfig/network — The contents of it look something like this:

NETWORKING=yes
GATEWAY=the.gw.ip.here
GATEWAYDEV=eth1
HOSTNAME=host.domain.com
DOMAINNAME=domain.com

It was pretty simple from there, change the GATEWAYDEV to the new port and voilà. So the next time you are trying to change ports or the default route won’t stick, I hope I helped!

Be the first to comment.

Leave a Reply