SUMMARY: route in Solaris

From: Stanislav Protassov (
Date: Thu Nov 21 1996 - 04:33:07 CST

Hello sun-managers,

Thanks to all of you who try to help:

Anton Bernal <>
Noel Fardy <> (Michael Sullivan) (Russ Poffenberger)
"Trevor Paquette" <> (Andrew H. Evans)

The most interesting answers were:

Andrew H. Evans wrote:
> I've done this using gated. It is unsupported. Hosts on the other networks
> won't realize the mask via rip. If all hosts ran gated with OSPF or ripV2
> it may work, but that's a lot of work. I used a default route for the
> net at large in broadcast, then had icmp from the gated host redirect
> from static routes where to go. Inefficient, and like I said, unsupported.
> If only that Solaris system needs to know the smaller interior net, it
> stands a good chance of working. If the Solaris box really is routing
> lots of packets to that net from a variety of hosts, it's a challenge.
> There's many things in your environment that may complicate or simplify
> how it's set up.
> See also:

Michael Sullivan wrote:
> To the best of my knowledge, Solaris still doesn't support variable
> length netmasks, but since a subnet with a netmask of
> only supports 6 host addresses, a possible work around would be to
> specify individual static host routes for each of those 6 addresses
> (all using the WinNT system as the gateway) rather than the single
> static network route.

Anton Bernal wrote:
> AFAIK, there is a _reported_ bug to SUN, which does not allow "route" to
> use a different netmask from the standard one (Class A - 24bit, B - 16bit,
> C - 8bit), _except_ when there is a local interface configured with a
> diferent netmask. In that case, the "route" command takes the local
> netmask value.
> This is, for remote networks (i.e., not on the local IP subnet), the Subnet
> mask is the "standard" one.
> One workaround is to define one interface with the WinNT IP network address,
> and the correct network mask (.248). Then you ifconfig it DOWN, and add the
> route. Afterwards, you can remove this interface. Your route has been added.

Very interesting workaround - it unfortunately does not work in my case,
since i have to establish route to subnetwork, which belongs to the same
class C network as my network for le0, but in the case of different
subnetworks it works - i've check it out.

My original question:

> can anybody tell me is it possible to have variable-length subnets in
> Solaris? What i actually need is something like -netmask switch to
> route
> add. I have the following situation:
> --------- -----------
> ethernet | | -----| | ethernet
> -----| WinNT | \ | Solaris |----------
> netmask | |---- | | netmask
> --------- -----------
> Both LANs are actually subnets of the same class C network. Since from
> one end is WinNT which supports only RIP, so i have to make a static
> route on Solaris. Usually it's not a problem:
> route add -netmask gateway
> is enough. But in Solaris there is no -netmask parameter in route add.
> So I have a route with netmask 224 ;( Are there any workarounds?

Best regards,
Stanislav Protassov
If God is dead, who will save the Queen?

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:16 CDT