LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-20-2007, 04:09 PM   #1
kidswipe
LQ Newbie
 
Registered: Jun 2007
Location: 703
Distribution: SuSE & Redhat ES4
Posts: 23

Rep: Reputation: 15
saving routes permanetly


I'm trying to save a route that I've added for my RHEL ES4 and I've have done some research on this and everyone seems to say just to create a shell script and add it into rc.local which i've done but if I do the command

services network restart

it loses any routes that I've added, I know when I've done this in SuSE it saves it no problem but for some reason Redhat is being stupid like that...

Thanks for any help on this issue... and the shell script I wrote simply states

/sbin/routes add -net 10.0.0.0 netmask 255.0.0.0 gw 10.100.6.254
 
Old 06-20-2007, 04:55 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Note I wrote myself after I did this on RHEL AS 4:

Example command line:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.0.52.54 metric 1

To make it permanent (automatic start) create route-eth1 file in the directory /etc/sysconfig (associates route for eth1 with IP of eth0 NIC) with the following lines:

GATEWAY0=10.0.52.54
NETMASK0=255.0.0.0
ADDRESS0=10.0.0.0


I didn't do anything in /etc/rc.local on RHEL AS 4 - just the above.
 
Old 06-21-2007, 08:08 AM   #3
kidswipe
LQ Newbie
 
Registered: Jun 2007
Location: 703
Distribution: SuSE & Redhat ES4
Posts: 23

Original Poster
Rep: Reputation: 15
awesome... it worked, thanks alot!
 
Old 06-21-2007, 09:14 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
No problem.

Thanks for the feedback - many newbies never post follow ups so you always wonder if they were abducted by aliens after the initial post.

Last edited by MensaWater; 06-22-2007 at 11:44 AM.
 
Old 06-22-2007, 09:50 AM   #5
kidswipe
LQ Newbie
 
Registered: Jun 2007
Location: 703
Distribution: SuSE & Redhat ES4
Posts: 23

Original Poster
Rep: Reputation: 15
lol... yeah I would imagine that being annoying after awhile with dealing with that...

common courtesy would be to repost just so people know what works and what doesn't.

again thanks
 
  


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
Active Routes not saving on Suse 10.0 after reboot krodwill49 Linux - Newbie 1 12-07-2006 02:07 PM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 07:27 AM
I need some routes |Drakehash| Linux - Newbie 1 06-08-2003 12:22 AM
saving just added routes? pk21 Linux - Networking 2 01-21-2003 07:24 PM
does the rm command permanetly remove a file? flyboy320 Linux - General 4 03-07-2002 12:01 AM

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

All times are GMT -5. The time now is 05:17 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