SUMMARY: different netmasks w/ two interfaces

From: Mark Natoli (
Date: Thu Sep 30 1999 - 10:20:55 CDT

  I could not find one, other than my original workaround.

  I have an Ultra-2 with a FDDI interface and Fast Ethernet interface.
This machine is attached to two separate networks but no routing is done.
All is fine when both cards exist using the same netmask. But when I want
to change the hme0 netmask from to without
changing the mask of the nf0 interface I find this impossible using only
the /etc/inet/netmasks.


where the hme0 is
and the nf0 is

  I have also tried including in the netmasks
file as well as most logical combinations/orders that I could think.

  This is not sufficient. In order to work around this problem I have to
edit /etc/init/inetinit and inetsvc.
  In inetinit I run ifconfig with the correct mask for hme and then
ifconfig up.
 Then in inetsvc I make this change:

/usr/sbin/ifconfig -auD netmask + broadcast +
/usr/sbin/ifconfig -auD #netmask + broadcast +

  This works but is a big workaround for a simple problem. Any help?

Roger Caron said:
> try

Martin Oksnevad said:
> Have you edited /etc/nsswitch.conf ?
> #netmasks: nis [NOTFOUND=return] files
> netmasks: files
> If you edit the local /etc/netmasks you must make sure the machine
> uses the local file and not a NIS/NIS+ network wide value.

John D Groenveld said:
> As I recall, variable length subneting does not work at least with
> Solaris 2.5.1. Supposedly fixed with 7 and maybe 2.6.
> 131.230 is a class b network, so you can only apply one netmask to
> it.

Marco Greene said:
> Try the following:
> /etc/inet/netmasks
> 131.230.19
> 131.230.8
> If that doesn't work write a script to change the netmask using
> ifconfig.

Karl Sprules said:
> Is this Solaris 2.5.1? If so the shell script that interprets
> /etc/inet/netmasks does not have sufficient intelligence to handle two
> different masks on same base network. We have the same problem and used
> a solution very similar to your's. I believe the problem is fixed in
> 2.6

Mark Neill said:
> I believe the 131.*.*.* address is, by default, a class B address (I
> don't have my Stevens book here right now). If that is the case, you
> need your netmasks file to look like:
> /etc/inet/netmasks
> The /24 specifies the class C network mapping. And specifying the
> larger network first, then remapping the smaller portion, should
> probably fix things.

Thanks to everyone who replied.

Mark Natoli
Systems and Network Administrator
Northeast Parallel Architectures Center, Syracuse University

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:26 CDT