Summary: Solaris Secondary network interface getting incorrect netmask

From: Sundaram Ramsamy <sfgroups_at_gmail.com>
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:



  172.31.215.0    255.255.254.0

172.31.215.0 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.

Use
        172.31.0.0        255.255.254.0
and you'll get what you want.


Details, from http://en.wikipedia.org/wiki/Classful_network:

Network ranges:
Class A     0.0.0.0 through 126.255.255.255, default netmask 255.0.0.0
Class B   128.0.0.0 through 191.255.255.255, default netmask 255.255.0.0
Class C   192.0.0.0 through 223.255.255.255, default netmask 255.255.255.0

So your the network in question cannot be specified in /etc/netmasks by naming
one of its subnets, i.e., 172.31.215.0. This does present a potential problem,
e.g., if you have another subnet, say, 172.31.216.0 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
describe.

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

  ----- Original Message -----
  From: Sundaram Ramsamy
  To: sunmanagers@sunmanagers.org
  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 (255.255.0.0).



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



  Ifconfig ce4 netmask 255.255.254.0



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







  /etc/inet/netmasks

  172.31.215.0    255.255.254.0

  172.31.199.0    255.255.255.0



  ifconfig output



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

          inet 172.31.199.231 netmask ffffff00 broadcast 172.31.199.255



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

          inet 172.31.215.231 netmask ffff0000 broadcast 172.31.215.255



  Thanks

  Sundaram
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
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