- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: netmask
Categories
Company
Local Language
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2008 10:20 PM
02-10-2008 10:20 PM
netmask
how i can find netmask address with the help of netstat command ? or any other command or file is there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2008 10:28 PM
02-10-2008 10:28 PM
Re: netmask
ifconfig
subnet would be in hex like ffffff00
so ff ff ff 00 qould be
255.255.255.0
BR,
Kapil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2008 12:10 AM
02-11-2008 12:10 AM
Re: netmask
Also, you could have a look on /etc/rc.config.d/netconf file.
Thanks & Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2008 01:02 AM
02-11-2008 01:02 AM
Re: netmask
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 32808
12.12.12.12/255.255.255.255 12.12.12.12 UH 0 lan0 32808
192.168.0.24/255.255.255.255 192.168.0.24 UH 0 clic1 32808
192.168.1.24/255.255.255.255 192.168.1.24 UH 0 clic0 32808
192.168.1.0/255.255.255.0 192.168.1.24 U 2 clic0 31744
192.168.0.0/255.255.248.0 192.168.0.24 U 2 clic1 31744
12.0.0.0/255.0.0.0 12.12.12.12 U 2 lan0 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 32808
default/0.0.0.0 12.12.16.1 UG 0 lan4 1500
Then lines where you see the netmasks are those where the gateway is your NIC addresses, but with only the flag U ( not UH)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2008 01:48 AM
02-11-2008 01:48 AM
Re: netmask
Probably a mix of some commands. For example :
netstat -in | egrep -v "^Name|^lo0" | while read LAN rab
do ifconfig $LAN | egrep inet | read rab IP rab NM rab
echo "$LAN : $IP / $NM"
done
will output :
lan1 : 192.168.111.177 / ffffff00
lan0 : 10.33.70.12 / ffff0000
Hope this will help
Regards
Eric