LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-26-2005, 05:26 AM   #1
David@330
Member
 
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...?

Thanks
 
Old 05-26-2005, 06:01 AM   #2
niknah
Member
 
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
/etc/sysconfig/static-routes

and later versions in...
/etc/sysconfig/network-scripts/eth0-route

if you're using dhcp, you may need to add...
/etc/dhclient-exit-hooks
 
Old 05-26-2005, 06:57 AM   #3
David@330
Member
 
Registered: Jul 2004
Location: South Africa
Posts: 146

Original Poster
Rep: Reputation: 15
Cool

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 111.111.111.0 netmask 200.222.222.0 gw 111.111.222.5
it add it, but which file does it go and update.?

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

Rep: Reputation: 32
Hi,

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
David@330
Member
 
Registered: Jul 2004
Location: South Africa
Posts: 146

Original Poster
Rep: Reputation: 15
Cool

Hi fr_laz

That {route add -net 111.111.111.0 netmask 200.222.222.0 gw 111.111.222.5} 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...!
 
  


Reply


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 03:48 PM.

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