SUMMARY: Q: netmask suddenly changes

Tuna Tugcu (tuna@tunafish.cmpe.boun.edu.tr)
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 255.255.255.224 as my netmask and it
works!

Sincerely,
Tuna Tugcu

Special thanks go to:
William Smith <shizy@guomai.sh.cn>
"Auteria Wally Winzer Jr." <wally.winzer@ChampUSA.COM>
"Mr.Venkat D" <venki21@hotmail.com>
Jim Harmon <jharmon@telecnnct.com>
Reto Lichtensteiger <rali@meitca.com>
Jerry Springer <jerry_springer@csgsystems.com>
Dan Hubbard <dhubbard@netpart.com>
Rick Reineman <rick@lunger.llnl.gov>
Eugene Kramer <eugene@uniteq.com>

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
that
the netmask has changed from 255.255.255.224 to 255.255.255.0. 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.

Sincerely,
Tuna Tugcu
////////////////////////////////////////////////////////////////////////

Here are the replies:
////////////////////////////////////////////////////////////////////////
From: "William Smith" <shizy@guomai.sh.cn>

Hi,
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 255.255.255.0. There is no way for you to set the
netmask to 255.255.255.224. 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
255.255.255.0 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
netmask.

- Wally Winzer Jr.
////////////////////////////////////////////////////////////////////////
From: "Mr.Venkat D" <venki21@hotmail.com>

HI,

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.

thanks

venkat
////////////////////////////////////////////////////////////////////////
From: Jim Harmon <jharmon@telecnnct.com>

have you tried setting the netmask through ifconfig?

-- 
   Jim Harmon                           The Telephone Connection
jim@telecnnct.com                          Rockville, Maryland
////////////////////////////////////////////////////////////////////////
From: Reto Lichtensteiger <rali@meitca.com>

NIS or NIS+ is resetting the mask ...

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

netmasks: nis [NOTFOUND=return] files

with:

netmasks: files

Rgds,

Reto L.

-- 
R A Lichtensteiger	 rali@meitca.com -or- rali@world.std.com
			 http://www.meitca.com/ITA/People/rali
    "Yes, you're doing things right, but are you doing the right things?"
    "Nope.  I'm just doing something dumb fast."
////////////////////////////////////////////////////////////////////////
From: Jerry Springer <jerry_springer@csgsystems.com>

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.	Email:jerry_springer@csgsystems.com
Richardson,TX 75081
////////////////////////////////////////////////////////////////////////
From: Dan Hubbard <dhubbard@netpart.com>

When you configured the interface did you set the netmask.

Check with ifconfig -a. //////////////////////////////////////////////////////////////////////// From: Rick Reineman <rick@lunger.llnl.gov>

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 reineman1@llnl.gov //////////////////////////////////////////////////////////////////////// From: Eugene Kramer <eugene@uniteq.com>

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

HTH

Eugene.