SUMMARY: Q: netmask suddenly changes

Tuna Tugcu (
Tue, 24 Feb 1998 17:13:17 +0200 (EET)

Hi SMs,
Sorry for the late reply. I have posted the original question and the
replies below. I've solved the problem by comparing it with another
machine; creating /etc/defaultrouter solved the problem. The replies are
generally based on the idea that Solaris does not allow creating subnets
under a class C network. I really don't understand the reason for such a
restriction; anyway I am applying as my netmask and it

Tuna Tugcu

Special thanks go to:
William Smith <>
"Auteria Wally Winzer Jr." <wally.winzer@ChampUSA.COM>
"Mr.Venkat D" <>
Jim Harmon <>
Reto Lichtensteiger <>
Jerry Springer <>
Dan Hubbard <>
Rick Reineman <>
Eugene Kramer <>

Here is the original question:
Dear SMs,
We have just installed 2.5.1 on a sun4m. We have set the netmask in
/etc/netmasks and the machine works properly after reboot. While the
machine is working we suddenly encounter network problems and notice
the netmask has changed from to This has
happened twice in the last few hours. We don't seem to be doing anything
special that could affect the netmask.
I'm looking forward to your reply. Of course, I'll summarize.

Tuna Tugcu

Here are the replies:
From: "William Smith" <>

Solaris 2.5.1 cannot support variable netmask, the only choice of netmask
is class A, B and C,
so it maybe result some problems when you design netwok and it only support
RIP version 1.

sinceley, William Smith
From: "Auteria Wally Winzer Jr." <wally.winzer@ChampUSA.COM>

What Class IP Addresses are you using within your internal network?
If you're using Class C netmask Solaris automatically sets it to 0xffffff00,
which translates to There is no way for you to set the
netmask to Where and why are you setting this netmask?

Even if you use Class A or B addresses within the installation if you do not
specify the IP Addr as a "Subnet" Solaris will automatically set the netmask
to the proper netmask for that IP. Class C addresses will automatically fall
at if you do not specify the address as part of a subnet. Thereby

giving you the option of setting your Class C address to a Class A or B

- Wally Winzer Jr.
From: "Mr.Venkat D" <>


is your machine a nis client ??? if so then go to the file

/etc/rc2.d/S72inetsvc and see the following !!
# Re-set the netmask and broadcast addr for all IP interfaces. This
# ifconfig is run here, after NIS has been started, so that "netmask
# +" will find the netmask if it lives in a NIS map.

/usr/sbin/ifconfig -au netmask + broadcast +

you could also put a new script in the /etc/rc2.d to force the interface
to the netmask.


From: Jim Harmon <>

have you tried setting the netmask through ifconfig?

   Jim Harmon                           The Telephone Connection                          Rockville, Maryland
From: Reto Lichtensteiger <>

NIS or NIS+ is resetting the mask ...

Edit /etc/nsswitch.conf and replace the line:

netmasks: nis [NOTFOUND=return] files


netmasks: files


Reto L.

R A Lichtensteiger -or-
    "Yes, you're doing things right, but are you doing the right things?"
    "Nope.  I'm just doing something dumb fast."
From: Jerry Springer <>

It would help if you showed a copy of the netmasks file as well as telling us what the IP address of the system is.

It sounds like there is some sort of error in the netmasks file.

Jerry Springer			Phone:  (972) 907-4011
CSG				Fax:    (972) 907-4005
1776 North Greenville Ave.
Richardson,TX 75081
From: Dan Hubbard <>

When you configured the interface did you set the netmask.

Check with ifconfig -a. //////////////////////////////////////////////////////////////////////// From: Rick Reineman <>

Have you doublechecked /etc/netmasks? Is NIS(+) running, and does it have a netmasks map (or table)?

The /etc/init.d/rootusr file is what sets up the netmask on bootup. Has that been modified. Is it possible there's some sort of automated task running that's changing the netmask, it would have to do something with ifconfig.

Do you have all the recommended patches loaded?

Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rick Reineman Lasers CAD&UNIX Systems Management Lawrence Livermore National Laboratory //////////////////////////////////////////////////////////////////////// From: Eugene Kramer <>

Are you running NIS(+)? If yes, check networks table there.