Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 10-19-2010, 07:02 PM   #1
LQ Newbie
Registered: Mar 2009
Posts: 11

Rep: Reputation: 0
Question Static Route Gets Ignored

On a Red Hat Enterprise Linux Server release 5.4 (Tikanga) system,
I set up a static route that unfortunately seems to get ignored.

I set up the static route in the file /etc/sysconfig/network-scripts/route-eth0 as follows: via

I've restarted the network service and also rebooted a few times.

Hereís my current routing table:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface UGH 0 0 0 eth0 * U 0 0 0 eth0 * U 0 0 0 eth0
default UG 0 0 0 eth0

I am able to ping However, when I do traceroute, it appears that the traffic goes through the default gateway instead of our requested specific gateway

[root@colt-vm-4019c ~]# traceroute -n
traceroute to (, 30 hops max, 40 byte packets
1 0.511 ms 0.768 ms 0.753 ms
2 3.466 ms 3.452 ms 3.434 ms
3 * * *

I can ping both and

In the route-eth0 file, Iíve also tried using the alternate syntax with ADDRESS0=<IP address> etc, but it didnít work any better. I also tried setting a more general route of via

But this also didnít help.

The System / Administration / Network tool previously showed a spurious extra NIC called eth0.bak in addition to eth0. I deleted the eth0.bak and rebooted, but this also didn't help. Currently, eth0 is the only NIC on the system.

Thanks in advance for any workarounds or diagnostic tips.
Old 10-20-2010, 07:02 PM   #2
Registered: May 2004
Location: Orlando, Florida
Distribution: SLES10/11, RH4/5 svrs, Fedora, Debian/Ubuntu/Mint; FreeBSD/OpenBSD
Posts: 63

Rep: Reputation: 26
I've used iptables snat/dnat prerouting/postrouting rules to do this before. Google/man page it.
Old 10-29-2010, 06:44 PM   #3
LQ Newbie
Registered: Mar 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks fuubar2003. I belatedly discovered that this was a spurious problem. The traceroute command was not reporting the first hop that the packet took. When I ran tshark on the desired device, I was able to see that the packet was really arriving as expected. Live and learn, I guess.
-- Joseph


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
route-eth - Adding a static route gbwien Linux - Networking 5 02-24-2012 05:15 AM
static route anhtt Solaris / OpenSolaris 1 11-11-2007 03:50 PM
static route dvong3 Linux - Networking 1 01-25-2006 04:42 PM
Help with static route noinfo Linux - Networking 1 10-05-2005 11:40 AM
static route cox Linux - Networking 3 09-30-2003 02:22 PM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration