Operating System - HP-UX
1819819 Members
3084 Online
109607 Solutions
New Discussion юеВ

How to check my IP and MAC address

 
Joshua Goi
Frequent Advisor

How to check my IP and MAC address

Hi there,

I have 2 questions actually:

1) How do I check my IP address on my hp-ux machine. Is it possible to do it from the command line? (I know SAM can do it)

2) How do I check the MAC address of all network devices connected to a hp-ux machine? Is there a command that will query the network device directly to retrieve it's MAC address?
6 REPLIES 6
Rajeev  Shukla
Honored Contributor

Re: How to check my IP and MAC address

Hi,
1. Yes you can check the IP address of your HP-UX machine on command prompt. Use
#netstat -in
This will tell you all IP address assigned to all network cards like lano, lan1 etc...

2. you can use arp -a command to see the mac address of devices connected.
If you also want to see the users who have connected to you'r system, their IP address, use lsof utility which is available free of the web.

Cheers
Rajeev
Patrick Wallek
Honored Contributor

Re: How to check my IP and MAC address

To check your IP address you can also use a combination of lanscan and ifconfig.

Do a lanscan, and note the lan? numbers for your interfaces. You will also be able to see the MAC address from the lanscan output, although it is called 'station address'. Then do an 'ifconfig lan?' (ifconfig lan1, for example) for each interface and it will show your IP address.

Norman_21
Honored Contributor

Re: How to check my IP and MAC address

lanscan ( for the MAC address)

ifconfig lanx (for the IP address, where x is your active lan card number, check the output of the lanscan to see the confgured lan cards)

Thanks
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Suresh Patoria
Super Advisor

Re: How to check my IP and MAC address

Hi,

1) To check the ip address of the system use the
ifconfig lan0 command

2) To check the MAC address use the lanscan command

or

You can use the lanadmin command also

Thanx
Jens Koellner
New Member

Re: How to check my IP and MAC address

Hi,
use the "lanscan" command to get an overview of your installed LANICs (including MACs).
# lanscan

In the column "Net-Interface Name Unit" you'll find somethin like "lan0 or lan1".

Then use the "ifconfig" command to obtain the IP-address.
# ifconfig lan1 (or lan0 or lan2)

--Jens
twang
Honored Contributor

Re: How to check my IP and MAC address

1.
syerp# ifconfig lan0
lan0: flags=843
inet 192.9.168.17 netmask ffffff00 broadcast 192.9.168.255

2.
syerp# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x001083FFB943 0 UP lan0 snap0 1 ETHER Yes 119
syerp#