LinuxQuestions.org
Visit Jeremy's Blog.
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 02-06-2005, 04:01 PM   #1
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Rep: Reputation: 30
How to add perssitent route in Red Hat 9?


Can I know how to add perssitent route in Red Hat 9? I had tried to use the following, and is working fine only if there is no restart of the PC. After restart the rouote will be gone in the routing table.

route add -net IP netmask 255.255.255.0 gw IP

Anyone knows add perssitent route, please help....

Thank You...
 
Old 02-06-2005, 06:14 PM   #2
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I can't search up too many network problems now with linux as I use it mainly as it stands as a standalone system now, but maybe if you add the command with full path in rc.local everyting will be cool.
 
Old 02-07-2005, 01:23 AM   #3
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
for rh8, i believe, u just add it into a file called

/etc/sysconfig/static-routine

like such
any net 192.168.0.0/24 gw 192.168.0.254
 
Old 02-07-2005, 02:13 AM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
Quote:
Originally posted by yenonn

/etc/sysconfig/static-routine
i think u did a typo mistake. that file must be

/etc/sysconfig/static-routes



good luck.
 
Old 02-07-2005, 02:39 AM   #5
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
perhaps, it is... thanks for the correction.
 
Old 02-07-2005, 04:33 PM   #6
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Thank for the help guys, but i didnt have

/etc/sysconfig/static-routes

Is is the kernel problem? Even add route need to be in /sbin/route ?

Anyone knows the solution?
 
Old 02-07-2005, 06:24 PM   #7
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
I think you need to create the static-routes file. Easy way to tell...
Code:
[INFOHIIWAY\scowles@voyager ~]$ cd /etc/init.d
[INFOHIIWAY\scowles@voyager init.d]$ grep static-routes network
        # Add non interface-specific static-routes.
        if [ -f /etc/sysconfig/static-routes ]; then
           grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
If you see similar output, then the RH9 network init script supports adding static routes. Just follow the syntax posted earlier
 
Old 02-07-2005, 11:02 PM   #8
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
you must edit the file /etc/sysconfig/sysctl.conf
and edit the line ipv4.....forward=1 and save the file.
restart network service
 
Old 02-16-2005, 06:03 AM   #9
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Thank You for all of your help guys.....

I solve this by add the same command in /etc/rc.local

Code:
route add -net IP netmask 255.255.255.0 gw IP
This is ok for RedHat 9
 
Old 09-26-2005, 08:01 AM   #10
andreseso
LQ Newbie
 
Registered: Oct 2003
Posts: 12

Rep: Reputation: 0
/etc/sysconfig/static-routes

What is the syntax for /etc/sysconfig/static-routes ?

The routes I need to be available at system boot up I add to /etc/rc.local with the default route syntax.


Since /etc/sysconfig/static-routes is read by the Redhat and similar /etc/init.d/network startup script it would be nice to know how to set up that file.

The one time I tried to set it up I failed miserably.

Andres
 
Old 09-26-2005, 08:21 AM   #11
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
Code:
$cat /etc/sysconfig/static-routes
any net 212.58.27.192 netmask 255.255.255.224 gw 212.58.22.20
good luck
 
  


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 you add a window manger to red hat 9? Thaidog Linux - General 2 11-13-2005 08:41 PM
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
How can I do to add a item of start menu in Red Hat 9 danilux Red Hat 1 11-06-2004 05:07 AM
add a lib to php in Red Hat 9 omelin Red Hat 2 08-10-2004 08:12 PM
Adding persistent(permanent) route entries on Red hat Linux 7.1 sram Linux - Networking 1 02-08-2002 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration