Operating System - HP-UX
1832442 Members
3306 Online
110042 Solutions
New Discussion

Re: How to find MAC address ?

 
SOLVED
Go to solution
dictum9
Super Advisor

How to find MAC address ?

What's the easist way to find the MAC address of an interface?
lanadmin or lanscan? Or something else?
23 REPLIES 23
DCE
Honored Contributor
Solution

Re: How to find MAC address ?


lanscan is easy - it lists the SCSI address and the MAC address of the card
Pete Randall
Outstanding Contributor

Re: How to find MAC address ?

Use lanscan:

# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
10/0/12/0 0x001083CFA5E5 0 UP lan0 snap0 1 ETHER Yes 11
9

The MAC address (0x001083CFA5E5 in this case) is listed under Station Address.


Pete

Pete
Jeff_Traigle
Honored Contributor

Re: How to find MAC address ?

For a specific interface, lanadmin -a PPA. For all of them, lanscan. Look at the man pages.
--
Jeff Traigle
Patrick Wallek
Honored Contributor

Re: How to find MAC address ?

I prefer lanscan.

# 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 0x00306E271BD2 0 UP lan0 snap0 1 ETHER Yes 119
0/4/0/0/6/0 0x0010837B0D34 2 UP lan2 snap2 2 ETHER Yes 119
0/4/0/0/7/0 0x0010837B0D35 3 UP lan3 snap3 3 ETHER Yes 119
0/2/0/0 0x00306EEA45AE 1 UP lan1 snap1 4 ETHER Yes 119

In the above, the STATION ADDRESS is the MAC ADDRESS.
Pete Randall
Outstanding Contributor

Re: How to find MAC address ?

Let me try to make that read a little better:

# lanscan
Hardware Station Crd Hdw Net-Interface
Path Address In# State NamePPA
10/0/12/0 0x001083CFA5E5 0 UP lan0 snap0


Pete

Pete
Peter Godron
Honored Contributor

Re: How to find MAC address ?

Deepak Kulkarni
Regular Advisor

Re: How to find MAC address ?

Hi there,

Just do `arp -a`. This is the easiest one.

Cheers
DK
NMory
Respected Contributor

Re: How to find MAC address ?

Type in:

#lanscan

Check:

http://www-dcn.fnal.gov/DCG-Docs/mac/index.html

Regards,

LN
IT_2007
Honored Contributor

Re: How to find MAC address ?

lanscan is the way to see MAC address.
lanadmin also can be used but you have to go through menu and select which one you want to see. Also lanadmin used to check / set lan speed to 100FD /HD etc..
Deepak Kulkarni
Regular Advisor

Re: How to find MAC address ?

Hi etc.

I mean first ping the with IP adress of the server which you would like to know. And then run `arp -a`.

For Ex.

1) Ping xxx.xxx.xxx.xxx
2) arp -a

Cheers
DK
Sp4admin
Trusted Contributor

Re: How to find MAC address ?

Hi etc,

This will give you the MAC addess for all the interfaces.

#lanscan -ia
Jaime Bolanos Rojas.
Honored Contributor

Re: How to find MAC address ?

Hello etc!

From SAM ---> Networking and communication, select interface, then actions, then modify and it will show you the current mac address.

Regards,

Jaime.
Work hard when the need comes out.
Patrick Wallek
Honored Contributor

Re: How to find MAC address ?

The 'arp -a' command will give you the MAC addresses for other machines, but NOT your local machine.
Sean Dale
Trusted Contributor

Re: How to find MAC address ?

I would use lanscan since it also shows the hardware address and status of the cards.
Live life everyday
James R. Ferguson
Acclaimed Contributor

Re: How to find MAC address ?

Hi:

Interesting. My first query would have been to do:

# man -k lan

...and noted commands like 'lanadmin(1M)' 'lan*conf(1M)' and 'lanscan'. From there I would scan the corresponding manpages...

:-))

Regards!

...JRF...
Deepak Kulkarni
Regular Advisor

Re: How to find MAC address ?

Hi Patrick,

Yesi Patrick you are right. I was in the impression that, to find the other server MAC address from the local server. :-)

Cheers
DK
Ivan Ferreira
Honored Contributor

Re: How to find MAC address ?

If you want to find out the mac of a remote machine, ping to that machine and then run arp -a:

# ping 1.2.3.4
PING 1.2.3.4 (1.2.3.4): 56 data bytes
64 bytes from 1.2.3.4: icmp_seq=0 ttl=255 time=1 ms

# arp -a |grep 1.2.3.4

1.2.3.4 at 08-e8-18-ef-c2-c3
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
dictum9
Super Advisor

Re: How to find MAC address ?

Here is the problem, I need to find the MAC of a specific interface on all machines and I don't know if it's lan0, lan1 or whatever.

I need the equivalent of the Solaris command "ifconfig -a" which as you are aware displays MAC addresses for all interfaces.

Therefore, for me, it's a 2 or 3 step process, first I need to determine which interface I should be looking at (and how do I do that??) and then determine its MAC.
James R. Ferguson
Acclaimed Contributor

Re: How to find MAC address ?

Hi (again):

With regard to you last question, if you use:

# netstat -i

...the first field is the name of the interface. This name can be used in a subsequent 'lanscan' query:

# netstat -i|grep "$(hostname)"|cut -d" " -f1

...note output, and:

# lanscan|grep

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: How to find MAC address ?

Hi (again):

# X=`netstat -i|grep $(hostname)|cut -d" " -f1`

# lanscan|grep ${X}

Regards!

...JRF...
dictum9
Super Advisor

Re: How to find MAC address ?

And that's what I was looking for, thank you....
Patrick Wallek
Honored Contributor

Re: How to find MAC address ?

It would have helped if you had told us what your exact problem was in the first place.

Khangelani Vuke
New Member

Re: How to find MAC address ?

Use lanscan, its better..!