Summary: Solaris Secondary network interface getting incorrect netmask

From: Sundaram Ramsamy <>
Date: Wed Feb 21 2007 - 19:24:10 EST
Hi all,

I have received lots of response, thanks for every one.

my  problem with /etc/inet/netmasks file entry.

Here is detailed message from Brad Morrison:

It's the entry in /etc/netmasks: is not a network, it's a subnet. I know, I know, it sucks, but
that's the way that Solaris and /etc/netmasks is set up to work. This drove me
nuts about 10 years ago. I actually yelled at several people over it. More
details after the solution.

and you'll get what you want.

Details, from

Network ranges:
Class A through, default netmask
Class B through, default netmask
Class C through, default netmask

So your the network in question cannot be specified in /etc/netmasks by naming
one of its subnets, i.e., This does present a potential problem,
e.g., if you have another subnet, say, for which you want to (and
probably must) use a different netmask, you can't do it with /etc/netmasks.

In fact, the other entry in /etc/netmasks isn't working either, but you get
the default which happens to coincide with what you want. IMHO, there ought to
be a warning message in the syslog about entries in /etc/netmask which are
being ignored--and maybe even a hint about it. This was not obvious at all to
me when I first saw it.

The only workaround that I know of is to use a script in /etc/init.d and
/etc/rc3.d, i.e., issue the ifconfig commands there. Fortunately, you seem to
have only these two subnets, so you don't hae the potential problem I

I think there could also be a file named /etc/subnetmasks

  ----- Original Message -----
  From: Sundaram Ramsamy
  Sent: Wednesday, February 14, 2007 9:24 PM
  Subject: Solaris Secondary network interface getting incorrect netmask

  Hi all,

  I have Solaris 8 system with two-network interface configured. ce0 & ce4.
ce4  has host IP address, ce0 has backup network IP address. When system comes
up ce4 interface gets wrong netmask (

  I have to run ifconfig command to correct this problem..

  Ifconfig ce4 netmask

  I would like to know why its picking up wrong netmak and how to resolve it.


  ifconfig output

  ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

          inet netmask ffffff00 broadcast

  ce4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

          inet netmask ffff0000 broadcast


sunmanagers mailing list
Received on Wed Feb 21 19:24:56 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:04 EST