Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-06-2005, 04:01 PM
|
#1
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Rep:
|
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...
|
|
|
02-06-2005, 06:14 PM
|
#2
|
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120
Rep:
|
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.
|
|
|
02-07-2005, 01:23 AM
|
#3
|
Member
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511
Rep:
|
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
|
|
|
02-07-2005, 02:13 AM
|
#4
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
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.
|
|
|
02-07-2005, 02:39 AM
|
#5
|
Member
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511
Rep:
|
perhaps, it is... thanks for the correction.
|
|
|
02-07-2005, 04:33 PM
|
#6
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Original Poster
Rep:
|
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?
|
|
|
02-07-2005, 06:24 PM
|
#7
|
Member
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620
Rep:
|
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
|
|
|
02-07-2005, 11:02 PM
|
#8
|
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260
Rep:
|
you must edit the file /etc/sysconfig/sysctl.conf
and edit the line ipv4.....forward=1 and save the file.
restart network service
|
|
|
02-16-2005, 06:03 AM
|
#9
|
Member
Registered: Sep 2004
Location: Malaysia
Posts: 181
Original Poster
Rep:
|
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
|
|
|
09-26-2005, 08:01 AM
|
#10
|
LQ Newbie
Registered: Oct 2003
Posts: 12
Rep:
|
/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
|
|
|
09-26-2005, 08:21 AM
|
#11
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
Code:
$cat /etc/sysconfig/static-routes
any net 212.58.27.192 netmask 255.255.255.224 gw 212.58.22.20
good luck
|
|
|
All times are GMT -5. The time now is 12:27 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|