1847108 Members
5283 Online
110263 Solutions
New Discussion

Re: submask

 
SOLVED
Go to solution
Michael_33
Regular Advisor

submask

Hi all,

Which command can show submask directly?
I want ip format not hex.

Thanks!
7 REPLIES 7
Kurt Beyers.
Honored Contributor

Re: submask

The fastest way remains ifconfig lan0, but this gives the subnet in hexadecimal (it's not such a big deal to calculate it into decimal ff=255)

Via SAM-Networkong and Communications-Network Interface Cards, you can retrieve the subnet mask in decimal format. I didn't find the equivalent command from the prompt (if it exists).

Kurt
Steven Sim Kok Leong
Honored Contributor
Solution

Re: submask

Hi,

Execute this will show you the lan interface, IP address, interface status and netmask in decimal mode that you wanted.

# /usr/sam/lbin/laninfo 2>/dev/null |awk '{print $8, $9, $10, $11}'

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com

Michael_33
Regular Advisor

Re: submask

thanks Kurt!

Hartmut Lang
Trusted Contributor

Re: submask

netstat -rv -n

Hartmut
Michael_33
Regular Advisor

Re: submask

Great! :)
Thierry Poels_1
Honored Contributor

Re: submask

Hi,

yet another option:
grep SUBNET_MASK /etc/rc.config.d/netconf

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Thierry Poels_1
Honored Contributor

Re: submask

hi again,

yet one more:
/usr/sam/lbin/laninfo

happy newyear
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.