Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-26-2005, 05:26 AM   #1
Registered: Jul 2004
Location: South Africa
Posts: 146

Rep: Reputation: 15
Cool Network route add file

Hi All

Can someone tell me where the file is, when you add route parameters on Linux Redhat 9.x...?

Old 05-26-2005, 06:01 AM   #2
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
I'm not sure about redhat 9,
but in previous redhat's it's been in

and later versions in...

if you're using dhcp, you may need to add...
Old 05-26-2005, 06:57 AM   #3
Registered: Jul 2004
Location: South Africa
Posts: 146

Original Poster
Rep: Reputation: 15

Hi niknah

Had a look in those directory's, no luck...!
{/etc/sysconfig/static-routes} the file static-routes is their but empty, replaced it with one that has info. Did not work, even renamed the file to see if the system needed the file. It did even complain about the file...! So thats not the file.

and later versions in...
{/etc/sysconfig/network-scripts/eth0-route}had a look in that directory for that file no such file name.!

But when you enter route add -net netmask gw
it add it, but which file does it go and update.?

Old 05-26-2005, 07:15 AM   #4
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32

1/ the mask you propose won't be accepted by route... it's invalid
2/ the file used for current routing table is /proc/net/route, but it's a cache, not a conf file. Thus the route won't be kept after restarting the network service.
3/ maybe you use network profiles, in which case the conf file would be /etc/sysconfig/networking/profiles/.../route-eth0
Old 05-26-2005, 07:38 AM   #5
Registered: Jul 2004
Location: South Africa
Posts: 146

Original Poster
Rep: Reputation: 15

Hi fr_laz

That {route add -net netmask gw} is a example
and the command does work, because if I reboot the system it is still configured with all the info that I had type in.!
If I type netstat -r it list all the route parameters that i have added...!


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
How do I add a route??? moonmoth Linux - Networking 3 09-04-2005 06:25 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
route add powah Linux - Newbie 4 09-01-2005 02:24 PM
unable to add default route (network unreachable) beebop Linux - Networking 12 05-30-2005 11:07 AM
add a static route in Network init files Ghitza Linux - Networking 1 11-19-2004 05:26 AM

All times are GMT -5. The time now is 04:23 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