LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-18-2003, 02:49 AM   #1
s7nner
LQ Newbie
 
Registered: Apr 2003
Posts: 19

Rep: Reputation: 0
static route not saving! frustrating


i am running redhat 8.0 on my machine. I was having problems SAVING a default route to my routing table.

:/sbin/route add default gw router

however, this default route is deleted everything i restart the network services.


I've the same problem as the post before but the question was not answered.
http://www.linuxquestions.org/questi...ht=route+table

from here i've also tried adding

/etc/sysconfig/static-route but still doesn't seem to save it once i reboot!
help pplease.
 
Old 06-18-2003, 03:15 AM   #2
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
I don't have a RH system, but I think it uses System V style scripts, and the startup scripts for SystemV typically reside in /etc/rc#.d where # is the runlevel for when you want the script to start. I would put the static route stuff in runlevel 3 (multi-user mode, run before X if you boot to X). So, you should make a link from /etc/sysconfig/static-route to /etc/rc3.d/S10static-route. The S tells init that the script is to be run on startup, and 10 tells it when to start it. The number (10, in my example) should come after the network startup (static-route should have a higher number than the network stuff).
Code:
ln -s /etc/sysconfig/static-route /etc/rc3.d/S10static-route

Last edited by moses; 06-18-2003 at 03:16 AM.
 
Old 06-20-2003, 08:44 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Isn't the default route set up by networking, based on the info from /etc/sysconfig/network/scripts/ifcfg-<device>?
 
Old 06-20-2003, 11:51 AM   #4
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Typically the default route IS set up during network setups, but if you need another static route, you'd have to either add it to the config there or somewhere. . . For example, my home system uses DHCP to get its IP address, but I have several routes that I keep static so I only have a couple of hops to my work. This is set in /etc/rc.d/rc.inet1 for my system.
 
  


Reply



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
Help with static route noinfo Linux - Networking 1 10-05-2005 11:40 AM
saving 'route' settings sparky_132 Linux - Wireless Networking 3 10-13-2004 04:42 AM
static route cox Linux - Networking 3 09-30-2003 02:22 PM
STATIC Route using IPTables Milkman00 Linux - Networking 3 03-06-2003 07:47 PM
Static route to a router? Milkman00 Linux - Networking 9 02-09-2003 11:11 AM

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

All times are GMT -5. The time now is 02:55 AM.

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