Operating System - HP-UX
1823920 Members
3180 Online
109667 Solutions
New Discussion юеВ

Re: How to display mac address in HP-UX

 
SOLVED
Go to solution
Becke
Super Advisor

How to display mac address in HP-UX


Guys,
What command I should use in HP to find out the mac address of the adapter, I need to create an entry in the DNS for the HP machine and need the mac address in order to do that?

Thanks,
Raf
15 REPLIES 15
RAC_1
Honored Contributor
Solution

Re: How to display mac address in HP-UX

lanscan
arp
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: How to display mac address in HP-UX

HI Raf,

You can use # arp -a

(162.23.150.22) at 8:0:20:a4:a9:ce ether
(162.23.150.45) at 0:f:1f:65:7a:95 ether

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Torsten.
Acclaimed Contributor

Re: How to display mac address in HP-UX

# lanscan -a

is showing MAC address only,

# lanscan -v

gives a lot of information.
see
# man lanscan

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Rajeev  Shukla
Honored Contributor

Re: How to display mac address in HP-UX

running lanscan will give you station address in HEX, thats the MAC address. And if you have more than one NIC card on that machine then map them with netstat -in command
Becke
Super Advisor

Re: How to display mac address in HP-UX


Guys,
arp -a didn't work, however lanscan worked but It listed the mac address in HEX as you said, now how do I convert HEX into normal so I can give it to network guys to put in DNS???

Thanks for the quick responses guys...
Rajeev  Shukla
Honored Contributor

Re: How to display mac address in HP-UX

to get the MAC address in the format you want run
arp $(hostname)
or
arp
Arunvijai_4
Honored Contributor

Re: How to display mac address in HP-UX


>arp -a didn't work, however lanscan worked but It listed the mac address in HEX as you said, now how do I convert HEX into normal so I can give it to network guys to put in DNS???

How about this ?

# lanscan |awk '{print $2}'|grep -v Station|grep -v Address

-Arun

"A ship in the harbor is safe, but that is not what ships are built for"
Becke
Super Advisor

Re: How to display mac address in HP-UX


Hi Guys,

Thanks for the help, when i ran
'arp hostname' the command displayed the following

"hostname, ipaddress --no entry"

It didn't display the mac address..

# lanscan |awk '{print $2}'|grep -v Station|grep -v Address

The above command displayed the mac address in HEX again ie 0x00108303390F..

I have given the mac address in HEX to network guys to put in DNS...but it would be good know if i can resolve this to a normal mac address from HEX...Please let me know if there is any other way...I will assign points anyway because everyone helped.
H.Merijn Brand (procura
Honored Contributor

Re: How to display mac address in HP-UX

A MAC address *IS* HEX. Always.
You will never find a MAC address that is not hex. The only difference you will see is upper-case versus lower case, and differences in the seperator(s)

00108303390F = 00.10.83.03.39.0f = 00:10:83:03:39:0F

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Arunvijai_4
Honored Contributor

Re: How to display mac address in HP-UX

Hi Raf,

Mac address is HEX all the way. Take a look at Wikipedia definition.

http://en.wikipedia.org/wiki/MAC_address

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Becke
Super Advisor

Re: How to display mac address in HP-UX


Thanks for your help guys, I was actually comparing that with AIX as in AIX its not in HEX....This problem has been resolved..

Thanks team........
Frank de Vries
Respected Contributor

Re: How to display mac address in HP-UX

Also if you would like to test on
mac - level (lower then ping),
you can do this

[root@oradb1:]/root<>>> lanscan -a
0x080009D790C2
0x080009D790C4
0x0060B0588A2A
[root@oradb1:]/root<>>> linkloop 0x080009D790C2
Link connectivity to LAN station: 0x080009D790C2
-- OK
[root@oradb1:]/root<>>>
[root@oradb1:]/root<>>> linkloop 0x080009D790C4
Link connectivity to LAN station: 0x080009D790C4
-- OK
[root@oradb1:]/root<>>>

Look before you leap
Torsten.
Acclaimed Contributor

Re: How to display mac address in HP-UX

Believe me, the MAC is always HEX, even on AIX. Perhaps you have a number without a letter.

Every bit follows a definition, e.g. bit 45 to 24 is the Organisation Unique Identifier.

You can search on IEEE for it

http://standards.ieee.org/regauth/oui/index.shtml

example:

08-00-09 from MAC 0x080009D790C2 (see above)

gives you

08-00-09 (hex) HEWLETT PACKARD
080009 (base 16) HEWLETT PACKARD
ENTERPRISE SYSTEMS TECH.CENTER
11000 WOLFE ROAD
CUPERTINO CA 95014
UNITED STATES





IBM has 00-09-6B ;-))

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Nguyen Anh Tien
Honored Contributor

Re: How to display mac address in HP-UX

just type
#lanscan
tienna
HP is simple
Becke
Super Advisor

Re: How to display mac address in HP-UX


Thanks for the detailed info guys, I have learned something new. My problem has already been resolved..I will assign points

Cheers
Raf