SUMMARY: SunOS 4.1.4 - network classes and netmask / broadcast a ddresses

From: O'Neal, Chris (
Date: Tue Oct 24 2000 - 08:21:23 CDT

Did not know my ABC of network classes like I thought I did. Was trying to
assign a class C submask to a class A network IP. Needed to add the fully
qualified network number for my class A network into file /etc/netmasks to
get correct netmask. Made the following entry into the file

then reboot and all is now fine.

SunOS 4.1.4
Sun SPARCstation 2 -thru- SS20
Netmask will not set to ffffff00 and broadcast will not set to
for the server IP of, How do I force the setting for netmask
and broadcast? -or- What am I doing wrong?

I am moving servers to a new LAN network and they are not coming up with the
netmask (ffffff00) and broadcast ( values I want.

I am not using NIS or DNS.

My old IP was

The new IP is and is set in file: /etc/hosts.
The file /etc/hostname.le0 matches my host's name.
The file /etc/defaultrouter matches up with entry in /etc/hosts and is my
new defaultrouter with IP of and is pingable

The /etc/networks file looks like...

loopback 127
sun-ether 10.124.65 sunether ethernet localnet
sun-oldether 125 sunoldether
arpanet 10 arpa
ucb-ether 46 ucbether

The /etc/netmasks file looks like...

Did not know my ABC of network classes like I thought I did. All IP
addresses are 32 bit and have four octets. For SunOS 4.x, it thinks of life
in the pre-CIDR way.

Class A network IPs start wit a 0 bit = [1-126].x.x.x
loop back = 127.x.x.x
Class B network IPs start with bits 10 = [128-191].x.x.x
Class C network IPs start with bits 110 = [192-227].x.x.x

With CIDR, there are no such hard and fast rules. Instead subnet masks can
be applied to any IP address to create the size of network that is needed.

My misunderstanding was that my /etc/netmasks entry of "10.124" in the
pre-CIDR world (everything before
Solaris 2.6) was NOT a "network".

"10" is a network, "10.124" is not.

The file /etc/netmasks is used for subnetting classful networks.

I was moving from a class B network IP to a class A network IP and needed to
correctly name the new class A network in /etc/netmasks as first entry in
list to get sun to auto-set submask and broadcast to class C settings at
boot time (Correctly name = fully qualified network number ""). This
is what I wanted and what I choose to do.

Also remember that /etc/netmasks is not consulted if YP is running. You'll
need to put this info on the YP server if that is the case. In my case YP
is not running.

Other suggestion was to manual set the netmask and broadcast address inside
of /etc/rc.local with something like...

ifconfig le0 inet netmask broadcast

But I did not do this and I did not test this.

Broadcast packets go to all nodes on the network. Typically, broadcast
packets are used for address resolution and network management applications.
Multicast packets are designed to be sent to a subset of nodes. SunOS and
Solaris will automatically set the sun's broadcast IP based off its IP and
its netmasks setting. However, the default setting for SunOS and for
Solaris is different.

SunOS = x.x.x.0
Solaris = x.x.x.255

I would like to thank the following for their responses,

Michael Connolly [],
Mark Niell [],
Peter Wallis [],
Darren Dunham [],
Michael Glasgow [],
Rick Kelly [],
David E. Schwarze [],
Chris 'Chipper' Chiapusio [],
Dolores Capers [],
Parks Fields [],
Thomas Knox [],
Gavin Brennan [],
Jerry Springer [],
Shannon Wimberly [],

Chris O'Neal <>

When I am not computing in am WW1ing! Visit to learn


WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.

U BEFORE POSTING please READ the FAQ located at
. and the list POLICY statement located at
A To submit questions/summaries to this list send your email message to:
A To unsubscribe from this list please send an email message to:
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:20 CDT