Operating System - HP-UX
1834274 Members
2026 Online
110066 Solutions
New Discussion

need listing of IP addr bound to interface

 
SOLVED
Go to solution
Eric Rellergert
Occasional Contributor

need listing of IP addr bound to interface

Can anyone tell me how to get a similar listing that is provided by SAM when you look at the network interfaces where the interface along with its indexes, IP addresses and subnet masks are listed? What I am looking for would look like:
lan0 10.x.y.z 255.255.252.0
lan0:1 10.x.y.z 255.255.252.0
lan0:2 10.x.y.z 255.255.252.0
Unfortunately, I opened a call with ITRC and they say this can't be done outside of SAM, but I am betting it can. Everything they provided me does not mention getting the index numbers :1, :2, etc.
Any assistance will be appreciated!
5 REPLIES 5
Geoff Wild
Honored Contributor
Solution

Re: need listing of IP addr bound to interface

How about netstat -in

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sundar_7
Honored Contributor

Re: need listing of IP addr bound to interface

netstat -in will give you the lanX:index , IP address and the network , but to get the subnet mask you will have to use ifconfig command.

ifconfig lan0
ifconfig lan0:1

or you can derive the subnet mask from the network number and the IP address assigned to the interface.

Learn What to do ,How to do and more importantly When to do ?
Eric Rellergert
Occasional Contributor

Re: need listing of IP addr bound to interface

Thanks. The netstat -in will give me most of what I want and I can remove what I don't want.
Marvin Strong
Honored Contributor

Re: need listing of IP addr bound to interface

netstat -rvn

should give you everything you need.
Ted Buis
Honored Contributor

Re: need listing of IP addr bound to interface

I don't understand the reponse center's response, since SAM is just scripts that you can actually read to see what they are doing.
So if it is in a script in SAM, you should be able to find it and read it to see what was done in SAM.
Mom 6