Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Funny netmask

Status
Not open for further replies.

wtrepani

MIS
May 30, 2002
93
0
0
US
All,

I have an interesting problem on Solaris 2.5.1, and here it is!!

/etc/inet/netmasks:
yoda 29# cat /etc/netmasks
10.20.132.0 255.255.254.0
yoda 30#

ifconfig -a:
yoda 30# ifconfig -a
lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
inet 127.0.0.1 netmask ff000000
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
inet 10.20.132.45 netmask ff000000 broadcast 10.255.255.255
ether 8:0:20:82:ab:eb
yoda 31#

If you notice, in the /etc/inet/netmasks file, this network is configured for a 255.255.254.0 (fffffe00)subnet, however, after it boots, it comes up as 255.0.0.0 (ff000000)

I have never seen this, anyone have any ideas?

Will
 
I'm assuming the link between /etc/netmasks and /etc/inet/netmasks is in place.

Are you running NIS? Call getent netmasks 10.20.132.0 to see if it's being picked up from there.

Finally check the rc scripts to check that they havn't been changed to force a static netmask on the interface. /etc/rcS.d/S30rootusr.sh and /etc/rc2.d/S72inetsvc.
 
Hi,

The link is in place, and this system is not running nis. I ran the command to be sure, and it couldn't find the database.

I also couldn't find anything in the startup scripts that showed anything hardcoded, they all say netmasks +. I assume that means to go get it from source, be it NIS or /etc/inet/netmasks, or whatever.

I don't know when this started, if it came up like that on last boot, was there before the last boot, or started on its own while the system was running. Oddly enought, the system is working ok....

Will
 
The 10 network is by default an A class network and as such if no netmask can be found, the system will automatically set yours up as it has in your example. This will work fine, but will assume all your 10 network addresses are on a flat LAN - routing to say 10.20.134.x on a different subnet will fail.

I'm guessing there's something wrong with your /etc/nsswitch.conf file since even a netmask in a /etc/netmasks file should return a value from the getent command. Does /etc/nsswitch.conf have 'netmasks: files' in it?
 
Yup, that setting is there, and I recreated the file from the default to eliminate the possibility of extra white space to be sure. But I have not had the opportunity to reboot yet.

In the /etc/networks file, there are a lot of networks defined that do not exist anymore, and 10 is defined with arpanet. Should I update this, maybe that will fix it?

Will
 
#getent netmasks 10.20.132.0 -- should reply
10.20.132.0 255.255.254.0

If this isn't the case then the netmasks file is not being used for some reason.

You can force the network I/F netmask by calling ifconfig hme0 netmask 255.255.254.0 but this shouldn't be necessary.

The networks file is simply used as a reference for network names and doesn't need to be changed - I think it is the same on all Sun systems and rarely used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top