From: aad@siemens.com (Anthony Datri)
Newsgroups: comp.sys.sun.admin
Subject: Re: default route for diskless clients
Date: 28 Dec 92 15:11:42 GMT
Organization: Siemens Corporate Research, Princeton (Plainsboro), NJ

>The default route for a diskless client is provided by rpc.bootparamd,
>and it chooses the first entry in the kernel's network routing table
>which is on the same subnet as the client.

I had several hundred diskless machines (against my wishes) in a previous
life, and what you describe sounds pretty much like what I saw.

>This can lead to some
>silly choices, such as one end of a PPP link, or a gateway to an
>optical network.  Both of those have happened, with no contortions on
>my part.

I didn't have those sorts of problems because our net was a little different
from yours.  Each subnet was connected to one router, and we didn't have
PPP or SLIP links to worry about, and if we did, they'd have been on the
router, not on hosts.  And the whole net was optical 8^)

>It might seem irrelevant which default route is used

I was wondering that, since I always had rc.whatever explicitly set one through
the router anyway.  We made sure that the router was always host 254 on each
subnet, which made it easy.

>However, if the client's /usr lives on another subnet, there is a
>chicken-and-egg problem.

Wow.  I have to admit that all of mine were on the same net.  Is it safe to
assume that there's some reason you can't move the client to the other net?

>The 4.1.3 /etc/rc.boot mentions a statically linked route command, but
>I think that's just there to torment people like me.  Providing a
>statically linked route command as part of the SunOS distribution
>would be almost as useful as providing a dynamically linked mount
>command.

Weeeeeeel, ftp to your fav-o-rite BSD source site and get yerself the
sources.  You can find them on ftp.uu.net under systems/unix/bsd-sources,
for example.

I can't claim that I've built from these sources, but in said previous life
I *did* build mount from that vendor's sources to try to get a binary that
would reliably mount a pcfs filesystem.  I gave up on that when I found mtools,
though.

>I could put libc.so.* into the client root partition, but that's gross.

True enough, but you could hard-link the copies of it together for all of
the clients like I did with kernels.

>I could decide against mounting /usr from another subnet, but that's
>not what I want.

The typical argument for that decision would be speed, but if you've got a
nifty router like a Cisco AGS+ then it's not so much of an issue.

>What are my other options?  Is there some way to tell bootparamd what
>route to use for each client,

Man, I miss not being at a vendor any more 8^(.

>client)?  Is there some way to rig the routing tables so that the
>default route comes first?

Well, you're not running routed, are you?  If so, don't.  Have the "server"
set the default route first upon startup and then explicitly set any
non-default routes with /usr/etc/route.  I would think that this would
ensure the desired order in the kernel table, not to mention making netstat -r
far more pleasant.

-- 

======================================================================8--<
Xref: sparky comp.sys.sun.admin:9706 comp.unix.solaris:433