LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2006, 02:43 PM   #1
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Rep: Reputation: 15
route in linux


I need to add a couple of routes on my Redhat 7.1sbe distro. I am able to do the route add command but every time i restart i lose the route. Where do i enter my route so that they will stay.

thanks
 
Old 03-21-2006, 05:42 PM   #2
mbreith
Member
 
Registered: Feb 2006
Location: oregon
Distribution: PIII fedora2 | P4 fedora2 | Thinkpad fedora2
Posts: 54

Rep: Reputation: 15
It would go in one of the init scripts. I think they usually live in the init.d directory. I don't know which one would be best choice for the RedHat systems. In Gentoo it makes a script for each of the network cards that contain the IP address and route info. It is then added to the boot scripts.
 
Old 03-31-2006, 08:24 AM   #3
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Original Poster
Rep: Reputation: 15
Anyone else?

Quote:
Originally Posted by mbreith
It would go in one of the init scripts. I think they usually live in the init.d directory. I don't know which one would be best choice for the RedHat systems. In Gentoo it makes a script for each of the network cards that contain the IP address and route info. It is then added to the boot scripts.


Thanks
I have looked but have been unsuccessful. Anyone else out in the Linux world have any ideas? Thanks
 
Old 03-31-2006, 04:04 PM   #4
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
The file you want to edit would be /etc/rc.local

Just add the command to the end of that file and you should be good the next time you reboot.

The /etc/rc.local file is the last file to execute after the other bootup files. It's been a while since RH 7.1 but I'm pretty sure that one has the file as well. Good luck.
 
Old 04-03-2006, 07:21 AM   #5
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Original Poster
Rep: Reputation: 15
I will give it a try thanks

I am giving it a try.
 
Old 04-10-2006, 07:54 AM   #6
nkeever
Member
 
Registered: Apr 2005
Distribution: Debian / Redhat
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by nkeever
I am giving it a try.


negative on the above rc.local. Just rebooted my server this weekend and the routes did not load.

anymore ideas
thanks
 
  


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
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
if a route fails in a multipath route? eantoranz Linux - Networking 5 07-03-2005 02:03 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
Working with 'route' and unwanted route entries pioniere Linux - Networking 6 02-05-2003 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration