Netmask settings in Solaris 11

I have net0 as my primary network interface in Solaris 11.

# ifconfig net0
net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.53.77.154 netmask ffffff00 broadcast 10.53.77.255
        ether 0:10:e0:3a:c4:d8

Its netmask should be fffffc00, but whenever I am rebooting this server, it takes ffffff00.

 # cat /etc/netmasks | grep -v "#"
 # 

This is same for other server, which is having good netmask and not changing its netmask. Anywhere else, I need to make changes ?
/etc/defaultrouter is also blank in both servers (working and non-working server)

Wht don't you unplumb and plumb the interface with the settings?

ifconfig net0 10.53.77.154 netmask 255.255.252.0 broadcast 10.53.77.255 up

See what error it throws out..

What does this show:

ipadm

br1an, I can reset netmask with ifconfig, but it comes back to old value after reboot.
bartus11, here it is -->

 # ipadm
NAME              CLASS/TYPE STATE        UNDER      ADDR
lo0               loopback   ok           --         --
   lo0/v4         static     ok           --         127.0.0.1/8
   lo0/v6         static     ok           --         ::1/128
net0              ip         ok           --         --
   net0/v4        static     ok           --         10.53.77.154/24
   net0/v6        addrconf   ok           --         fe80::210:e0ff:fe3a:c4d8/10
net4              ip         ok           --         --
   net4/v4        static     ok           --         10.52.217.14/23
net8              ip         ok           --         --
   net8/v4        static     ok           --         169.254.182.77/24
 #

I was looking to fix it permanently.

This should fix it:

ipadm set-addrprop -p prefixlen=22 net0/v4
1 Like

It fixed the issue. Thanks for helping.

Sorry for continuing old topic, but it was related to same server, so putting my question here.
As bartus suggested, I was able to fix issue. Now I have installed a non global zone on this server, which is having 3 IP's. But those coming in different netmask when I am rebooting server.

# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        zone vtlplddp02
        inet 127.0.0.1 netmask ff000000
net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.53.77.154 netmask fffffc00 broadcast 10.53.79.255
        ether 0:10:e0:3a:c4:d8
net0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        zone vtlplddp02
        inet 10.53.77.169 netmask ff000000 broadcast 10.255.255.255
net0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        zone vtlplddp02
        inet 10.53.77.170 netmask ff000000 broadcast 10.255.255.255
net0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        zone vtlplddp02
        inet 10.53.77.171 netmask ff000000 broadcast 10.255.255.255
net4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.52.217.14 netmask fffffc00 broadcast 10.52.219.255
        ether a0:36:9f:14:b8:4c
net8: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 169.254.182.77 netmask ffffff00 broadcast 169.254.182.255
        ether 2:21:28:57:47:17
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128
lo0:1: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        zone vtlplddp02
        inet6 ::1/128
net0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 2
        inet6 fe80::210:e0ff:fe3a:c4d8/10
        ether 0:10:e0:3a:c4:d8
net4: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 3
        inet6 ::/0
        ether a0:36:9f:14:b8:4c
net8: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 4
        inet6 ::/0
        ether 2:21:28:57:47:17
# ipadm
NAME              CLASS/TYPE STATE        UNDER      ADDR
lo0               loopback   ok           --         --
   lo0/v4         static     ok           --         127.0.0.1/8
   lo0/v6         static     ok           --         ::1/128
   lo0/zoneadmd.v4 static    ok           --         127.0.0.1/8
   lo0/zoneadmd.v6 static    ok           --         ::1/128
net0              ip         ok           --         --
   net0/v4        static     ok           --         10.53.77.154/22
   net0/v6        addrconf   ok           --         fe80::210:e0ff:fe3a:c4d8/10
   net0/zoneadmd.v4 static   ok           --         10.53.77.169/8
   net0/zoneadmd.v4a static  ok           --         10.53.77.170/8
   net0/zoneadmd.v4b static  ok           --         10.53.77.171/8
net4              ip         ok           --         --
   net4/v4        static     ok           --         10.52.217.14/22
net8              ip         ok           --         --
   net8/v4        static     ok           --         169.254.182.77/24
#

net0 is fine, other three virtual IP's are for non global zone. Earlier suggested command is not working, seems like I am giving some wrong syntax

# ipadm set-addrprop -p prefixlen=22 net0/zoneadmd.v4
ipadm: set-addrprop: prefixlen: Persistent operation on temporary object

You should specify netmask in the zone configuration (zonecfg).

Able to fix. Thanks