The route add command does not use /etc/netmasks file (Solaris) (Doc ID 1004415.1)

Last updated on JULY 29, 2016

Applies to:

Solaris Operating System - Version 8.0 to 11.2 [Release 8.0 to 11.0]
All Platforms

Symptoms

 The route add command does not use the VLSM (Variable Length Subnet Masking) specified in the /etc/netmasks file.   For example:

# cat /etc/netmasks
129.145.0.0     255.255.255.0
#TESTING Subnet masks........
152.75.0.0      255.255.255.0
152.75.8.0      255.255.248.0
152.75.16.0     255.255.248.0
152.75.24.0     255.255.248.0
152.75.48.0     255.255.248.0
152.75.56.0     255.255.248.0
152.75.64.0     255.255.248.0
152.75.72.0     255.255.248.0
152.75.88.0     255.255.248.0
152.75.128.0    255.255.248.0
152.75.136.0    255.255.248.0
152.75.152.0    255.255.248.0
152.75.160.0    255.255.248.0
152.75.168.0    255.255.248.0

# netstat -rn
Routing Table:
Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ -
152.75.114.0         129.145.20.50         UG       0      0
129.145.20.0         129.145.20.111        U        3    162  le0
224.0.0.0            129.145.20.111        U        3      0  le0
default              129.145.20.50         UG       0    393
127.0.0.1            127.0.0.1             UH       0   2247  lo0

# netstat -rv
IRE Table:
Destination             Mask           Gateway          Device Mxfrg  Rtt Ref Flg  Out  In/Fwd
-------------------- --------------- -----------------------
152.75.114.0         255.255.255.0   nasc-enet-20                 1500* 0   0 UG       0     0
mtv07-enet-20        255.255.255.0   sree                 le0     1500* 0   3 U      162     0
224.0.0.0            240.0.0.0       sree                 le0     1500* 0   3 U        0     0
default              0.0.0.0         nasc-enet-20                 1500* 0   0 UG     393     0
localhost            255.255.255.255 localhost            lo0     8232* 0   0 UH    2247     0

# route add net 152.75.136.0 129.145.20.50 1
add net 152.75.136.0: gateway 129.145.20.50

# netstat -rv
IRE Table:
Destination             Mask           Gateway          Device Mxfrg  Rtt Ref Flg  Out  In/Fwd
-------------------- --------------- ------------------ -----
152.75.114.0         255.255.255.0   nasc-enet-20                 1500* 0   0 UG       0     0
mtv07-enet-20        255.255.255.0   sree                 le0     1500* 0   3 U      163     0
152.75.136.0         255.255.255.0   nasc-enet-20                 1500* 0   0 UG       0     0
224.0.0.0            240.0.0.0       sree                 le0     1500* 0   3 U        0     0
default              0.0.0.0         nasc-enet-20                 1500* 0   0 UG     393     0
localhost            255.255.255.255 localhost            lo0     8232* 0   0 UH    2247     0
------------------------------------------------------------

 


The 152.75.136.0 network has a netmask of 255.255.255.0 instead of 255.255.248.0 as specified in /etc/netmasks.

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms