Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Netmask is set to 255.255.0.0 while it should be set to 255.255.255.128

502 views
Skip to first unread message

Thomas Glanzmann

unread,
Dec 11, 2009, 6:49:55 AM12/11/09
to
Hello,
I have a Solaris 10 Update 7 machine which sets the netmask and network
route incorrectly. And I have two questions that I can't answer myself:

1) As far as I can tell /etc/netmasks, /etc/hosts and /etc/hostname.* are
configured correctly but the netmask is set wrong

deerlf0x68-root # ifconfig nxge0
nxge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 157.163.247.48 netmask ffff0000 broadcast 157.163.255.255
groupname mpathd1
ether 0:21:28:42:b9:7a
deerlf0x68-root # cat /etc/hostname.nxge0
deerlf0x68 group mpathd1 up
deerlf0x68-root # cat /etc/hostname.nxge4
group mpathd1 standby up
deerlf0x68-root # grep -v '^#' /etc/netmasks
157.163.247.0 255.255.255.128
deerlf0x68-root # netstat -rn

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 157.163.247.126 UG 1 34
157.163.0.0 157.163.247.48 U 1 78 nxge0
192.168.224.1 192.168.224.2 UH 1 1 sppp0
224.0.0.0 157.163.247.48 U 1 0 nxge0
127.0.0.1 127.0.0.1 UH 3 129 lo0
deerlf0x68-root # cat /etc/defaultrouter
157.163.247.126

2) Even if the netmask is configured wrong the machine seems to use the
defaultrouter for everything outside /25 for some reason. It can reach for
example my workstation which is not on the same network.

deerlf0x68-root # traceroute -n ad054764pc
traceroute: Warning: Multiple interfaces found; using 157.163.247.48 @ nxge0
traceroute to ad054764pc (157.163.208.118), 30 hops max, 40 byte packets
1 157.163.247.124 0.330 ms 0.399 ms 0.203 ms
2 10.112.11.36 1.060 ms 0.858 ms 0.856 ms
3 10.112.11.226 1.059 ms 1.075 ms 1.076 ms
4 10.112.11.17 1.714 ms 1.512 ms 1.511 ms
5 172.16.65.2 1.714 ms 1.515 ms 1.510 ms
6 157.163.208.118 1.493 ms 1.514 ms 1.511 ms

The default router answers as 157.163.247.124 because we have HSRP (Hot Standby
Router Protocol (Cisco, IOS)) on that network enabled.

Thomas

John D Groenveld

unread,
Dec 11, 2009, 12:35:23 PM12/11/09
to
In article <slrnhi4cf3...@faui00u.informatik.uni-erlangen.de>,

Thomas Glanzmann <tho...@glanzmann.de> wrote:
>deerlf0x68-root # grep -v '^#' /etc/netmasks
>157.163.247.0 255.255.255.128

Solaris may expect you to be pedantic in netmasks(4):
157.163.0.0 255.255.0.0
157.163.247.0 255.255.255.128
157.163.247.128 255.255.255.128

John
groe...@acm.org

Thomas Glanzmann

unread,
Dec 11, 2009, 1:05:00 PM12/11/09
to
John,

* John D Groenveld <groe...@cse.psu.edu>:


> Thomas Glanzmann <tho...@glanzmann.de> wrote:
>>deerlf0x68-root # grep -v '^#' /etc/netmasks
>>157.163.247.0 255.255.255.128

> Solaris may expect you to be pedantic in netmasks(4):
> 157.163.0.0 255.255.0.0
> 157.163.247.0 255.255.255.128
> 157.163.247.128 255.255.255.128

thank you, I'll modify the netmasks and try again. The problem is that
the system is now in production and I may have to wait a bit until I can
reboot it. However what I don't get is that I sys-unconfigured a Solaris
10 Update 8 x86 and than configured the network using the wizard. And
there it did _not_ put the three entries in, but it worked. Than I
modified hostname.e1000g{0,1} to do active/passive with link status and
the netmask was still right. Might be possible that I miss something
else?

Thomas

Thomas Glanzmann

unread,
Dec 11, 2009, 1:14:28 PM12/11/09
to
John,

* Thomas Glanzmann <tho...@glanzmann.de>:


> thank you, I'll modify the netmasks and try again. The problem is that
> the system is now in production and I may have to wait a bit until I can
> reboot it. However what I don't get is that I sys-unconfigured a Solaris
> 10 Update 8 x86 and than configured the network using the wizard. And
> there it did _not_ put the three entries in, but it worked. Than I
> modified hostname.e1000g{0,1} to do active/passive with link status and
> the netmask was still right. Might be possible that I miss something
> else?

here is a screenshot (sorry that was a minimal installation without ssh)
from the machine were I did try to reproduce the problem:

http://thomas.glanzmann.de/tmp/screenshot-mini-2009-12-11-19:08:03.png

As you can see the subnetting is fine and there is only one entry in
netmasks. Strange

Thomas

Diego

unread,
Dec 14, 2009, 2:09:25 AM12/14/09
to
> thank you, I'll modify the netmasks and try again. The problem is that
> the system is now in production and I may have to wait a bit until I can
> reboot it.
It's in production AND you still have the subnet mask problem?
However, it's not necessary to reboot the system, just open the
console, and make a:
ifconfig name_interface hostname_or_ip/your_subnet_decimal_notation
broadcast + up
And it will go up with the correct settings. Just expect to have a
little instability until the new ip/netmask will come up.

And if you want to just test the correct sintax in your /etc/netmasks,
do:
ifconfig name_interface hostname_or_ip netmask + broadcast + up
And it should just take the correct value from the file.

Have a nice day.

Diego.

Darren Dunham

unread,
Dec 14, 2009, 4:46:15 PM12/14/09
to
On Dec 11, 3:49 am, Thomas Glanzmann <tho...@glanzmann.de> wrote:
> deerlf0x68-root # cat /etc/hostname.nxge0
> deerlf0x68 group mpathd1 up

That's odd. Why do you have 'up' in there?

Can you show the output of 'wc /etc/hostname*'?

--
Darren

Thomas Glanzmann

unread,
Dec 15, 2009, 7:34:27 AM12/15/09
to
John,

* John D Groenveld <groe...@cse.psu.edu>:

> Solaris may expect you to be pedantic in netmasks(4):
> 157.163.0.0 255.255.0.0
> 157.163.247.0 255.255.255.128
> 157.163.247.128 255.255.255.128

even if I could not reproduce it on another machine, I added the entries
and today got the timeslot to reboot the machine and it works:

deerlf0x68-root # tail -3 /etc/netmasks


157.163.0.0 255.255.0.0
157.163.247.0 255.255.255.128
157.163.247.128 255.255.255.128

deerlf0x68-root # ifconfig nxge0
nxge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 157.163.247.48 netmask ffffff80 broadcast 157.163.247.127


groupname mpathd1
ether 0:21:28:42:b9:7a

So to formulate as general rule: If you use CLASS A, B or C networks you can
just add the netmask in questions, if you use another netmask you have to
specify the hirachy up to the next CLASS A, B or C network, is that correct?

Thomas

Darren Dunham

unread,
Dec 15, 2009, 5:38:38 PM12/15/09
to
On Dec 15, 4:34 am, Thomas Glanzmann <tho...@glanzmann.de> wrote:
>
> So to formulate as general rule: If you use CLASS A, B or C networks you can
> just add the netmask in questions, if you use another netmask you have to
> specify the hirachy up to the next CLASS A, B or C network, is that correct?

Don't think so.

You will also see the problem you describe if your hostname.nxge0 file
had a blank line in it.

--
Darren

Thomas Glanzmann

unread,
Dec 16, 2009, 1:30:03 AM12/16/09
to
Hello,

* Thomas Glanzmann <tho...@glanzmann.de>:


> 1) As far as I can tell /etc/netmasks, /etc/hosts and /etc/hostname.* are
> configured correctly but the netmask is set wrong

> Thomas

ulm:/root/root 1 : getent netmasks 157.163.247.0
157.163.247.0 255.255.0.0
ulm:/root/root 2 : grep netmasks /etc/nsswitch.conf
netmasks: nis [NOTFOUND=return] files

netmasks was configured to retrieve them using NIS and NIS was misconfigured.

Thomas

0 new messages