LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-29-2010, 08:45 AM   #1
dadash
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
How to keep static routes after rc.inet1 restart?


Is there a standard config file for saving static routes or "ip route" commands? i lose my static routes after every "/etc/rc.d/rc.inet1 restart".
rc.local wouldn't be a good idea, because it's not run automatically after "/etc/rc.d/rc.inet1 restart"
 
Old 06-29-2010, 11:35 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,309

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
How are your static routes being set now?
 
Old 06-29-2010, 11:51 AM   #3
dadash
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
they are in /etc/rc.d/rc.local
 
Old 06-29-2010, 12:37 PM   #4
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
Did you try setting them in /etc/rc.d/rc.inet1.conf?
 
Old 06-29-2010, 01:30 PM   #5
dadash
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
As far as i know, default gateway, is the only static route that can be written in /etc/rc.d/rc.inet1.conf
but i want to save a command like this :

Code:
ip route add default via 10.10.10.1 dev eth1 table 4
 
Old 06-29-2010, 01:40 PM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
I would consider just making a little change to /etc/rc.d/rc.inet1 to add the static route when needed. Have a look at the script it's very readable and such an addition would be trivial. As it stands the script contains a function "gateway_up()" and gateway_down(). You could just add static_up() and static_down() functions called from it's start() and stop() functions just after the gateway_ functions.
 
  


Reply

Tags
iproute2, slackware


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
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 07:08 PM
no IP address during boot, restart rc.inet1 works bioe007 Slackware 4 06-27-2007 01:31 AM
rc.inet1, routes, default gateways Woodsman Slackware 1 01-06-2006 12:41 AM
static-routes in Mandrake 10.0 tallthom Mandriva 1 09-27-2004 12:51 AM
Network restart and additional routes WeNdeL Linux - Networking 5 05-25-2004 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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