Brian Ruthven - Solaris Network Sustaining - Oracle UK wrote:
> 
> Which Solaris release are you talking about here?
> 
> /etc/init.d/network hasn't existed since Solaris 9, and there is no
> "restart" option anyway.
> 
> If Solaris 10 or OpenSolaris with nwam disabled, then either of the two
> methods below will add the router, but method #2 will only persist until
> you reboot.

It might be easier to explain that the network/physical service reads
the /etc/defaultrouter file at boot time, and invokes "route add
default" for each of the addresses it finds in that file.  (The file may
contain a list.)  See /lib/svc/method/net-physical for the actual
implementation.

So, they're really the same thing -- one drives the other -- rather than
being two different mechanisms.  It's very much like the difference
between /etc/hostname.* and ifconfig.  The system boot scripts read the
/etc/hostname.* files and invoke ifconfig for you.

If this is a relatively modern Solaris release, you can also do "route
-p add ..." to add persistent routes.  Those are stored separately from
/etc/defaultrouter, and have the advantage that you can store arbitrary
network routes as well as just "default" (0/0) routes.

You can also use the static route service in Zebra/Quagga to manage
routes.  That has the advantage of being integrated with a fairly
complete routing solution.

The one thing you should _not_ do is attempt to use /etc/gateways to add
static routes.  It "sort of" works in some cases, but it usually ends in
tears.

-- 
James Carlson         42.703N 71.076W         <carls...@workingcode.com>
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org

Reply via email to