Unix Technical Forum

saving routing table question

This is a discussion on saving routing table question within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> some users asked how to save to customized routing table on solaris 9/10 as by doing route add, it ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 11:35 AM
steeles
 
Posts: n/a
Default saving routing table question

some users asked how to save to customized routing table on solaris 9/10 as
by doing route add, it will be gone after server reboot.

I saw someone said that it will be saved under /etc/gateways,

net <ip> gateway <ip> metric <count> passive

but seems it didn't work for me, I saved new route into that file and tried
to go that route, but didn't work.

The way worked for me is to run "route add" in command line.

Can anyone give me some advice?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 11:35 AM
Huge
 
Posts: n/a
Default Re: saving routing table question

On 2007-10-17, steeles <steeles@gmail.com> wrote:
> some users asked how to save to customized routing table on solaris 9/10 as
> by doing route add, it will be gone after server reboot.
>
> I saw someone said that it will be saved under /etc/gateways,
>
> net <ip> gateway <ip> metric <count> passive
>
> but seems it didn't work for me, I saved new route into that file and tried
> to go that route, but didn't work.
>
> The way worked for me is to run "route add" in command line.
>
> Can anyone give me some advice?


man route

Read the entry for the "-p" switch.


--
"A computer is a nerd-designed machine for screwdriver addicts."
[email me at huge {at} huge (dot) org <dot> uk]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 11:35 AM
Oscar del Rio
 
Posts: n/a
Default Re: saving routing table question

Huge wrote:
> On 2007-10-17, steeles <steeles@gmail.com> wrote:
>> some users asked how to save to customized routing table on solaris 9/10 as
>> by doing route add, it will be gone after server reboot.


>
> man route
>
> Read the entry for the "-p" switch.


not for Solaris 9
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 11:35 AM
steeles
 
Posts: n/a
Default Re: saving routing table question

ya, -p is not for Solaris.

other comment please.

"Oscar del Rio" <delrio@mie.utoronto.ca> wrote in message
news:ff8ast$lnh$2@news.mie...
> Huge wrote:
>> On 2007-10-17, steeles <steeles@gmail.com> wrote:
>>> some users asked how to save to customized routing table on solaris 9/10
>>> as by doing route add, it will be gone after server reboot.

>
>>
>> man route
>>
>> Read the entry for the "-p" switch.

>
> not for Solaris 9



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 11:35 AM
Doug McIntyre
 
Posts: n/a
Default Re: saving routing table question

"steeles" <steeles@gmail.com> writes:
>ya, -p is not for Solaris.


>other comment please.


Well, route -p for Solaris 10..

For earlier versions, you'll have to write something. It was common to
writeup a rc.x/init.d shell script just feed in all the static routes
needed to do something like that.

Or, there is routed if you feed your routes in via the RIP dynamic
routing protocols. There's other options for doing OSPF or BGP.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 11:35 AM
Cydrome Leader
 
Posts: n/a
Default Re: saving routing table question

Doug McIntyre <merlyn@geeks.org> wrote:
> "steeles" <steeles@gmail.com> writes:
>>ya, -p is not for Solaris.

>
>>other comment please.

>
> Well, route -p for Solaris 10..
>
> For earlier versions, you'll have to write something. It was common to
> writeup a rc.x/init.d shell script just feed in all the static routes
> needed to do something like that.
>
> Or, there is routed if you feed your routes in via the RIP dynamic
> routing protocols. There's other options for doing OSPF or BGP.


Does anybody know where solaris 10 stores the persistent routes added with
the -p flag?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 11:35 AM
James Carlson
 
Posts: n/a
Default Re: saving routing table question

Cydrome Leader <presence@MUNGEpanix.com> writes:
> Does anybody know where solaris 10 stores the persistent routes added with
> the -p flag?


Yes. It's /etc/inet/static_routes -- visible both in the source code
and in the output of "strings /usr/sbin/route".

However, it's not a documented interface, and there are thus no
guarantees about it. It may disappear or change incompatibly in the
future, without notice, even in a patch. Don't rely on it.

--
James Carlson, Solaris Networking <james.d.carlson@sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 11:35 AM
Cydrome Leader
 
Posts: n/a
Default Re: saving routing table question

James Carlson <james.d.carlson@sun.com> wrote:
> Cydrome Leader <presence@MUNGEpanix.com> writes:
>> Does anybody know where solaris 10 stores the persistent routes added with
>> the -p flag?

>
> Yes. It's /etc/inet/static_routes -- visible both in the source code
> and in the output of "strings /usr/sbin/route".
>
> However, it's not a documented interface, and there are thus no
> guarantees about it. It may disappear or change incompatibly in the
> future, without notice, even in a patch. Don't rely on it.


hopefully it stays-

It was obviously made so somebody didn't have to waste time writing route
adding rc scripts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 11:35 AM
Richard B. Gilbert
 
Posts: n/a
Default Re: saving routing table question

Cydrome Leader wrote:
> James Carlson <james.d.carlson@sun.com> wrote:
>
>>Cydrome Leader <presence@MUNGEpanix.com> writes:
>>
>>>Does anybody know where solaris 10 stores the persistent routes added with
>>>the -p flag?

>>
>>Yes. It's /etc/inet/static_routes -- visible both in the source code
>>and in the output of "strings /usr/sbin/route".
>>
>>However, it's not a documented interface, and there are thus no
>>guarantees about it. It may disappear or change incompatibly in the
>>future, without notice, even in a patch. Don't rely on it.

>
>
> hopefully it stays-
>
> It was obviously made so somebody didn't have to waste time writing route
> adding rc scripts.


It may stay for years or it may be replaced in Solaris 11. When
something like that is undocumented you dare not rely on it being there
in the next release!

What problem are you trying to solve?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 11:35 AM
Cydrome Leader
 
Posts: n/a
Default Re: saving routing table question

Richard B. Gilbert <rgilbert88@comcast.net> wrote:
> Cydrome Leader wrote:
>> James Carlson <james.d.carlson@sun.com> wrote:
>>
>>>Cydrome Leader <presence@MUNGEpanix.com> writes:
>>>
>>>>Does anybody know where solaris 10 stores the persistent routes added with
>>>>the -p flag?
>>>
>>>Yes. It's /etc/inet/static_routes -- visible both in the source code
>>>and in the output of "strings /usr/sbin/route".
>>>
>>>However, it's not a documented interface, and there are thus no
>>>guarantees about it. It may disappear or change incompatibly in the
>>>future, without notice, even in a patch. Don't rely on it.

>>
>>
>> hopefully it stays-
>>
>> It was obviously made so somebody didn't have to waste time writing route
>> adding rc scripts.

>
> It may stay for years or it may be replaced in Solaris 11. When
> something like that is undocumented you dare not rely on it being there
> in the next release!
>
> What problem are you trying to solve?


I was just curious as to how it worked, without lots of digging.

Sometimes you need a static route, and that -p flag in newer solaris 10s
is well, very handy.

Anything beats scripts to add routes, which is primitive and a time
burner.

Consider this feedback- the less runaround an admit has, the happier they
are, and the more they suggest people run solaris over other stuff.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com