1833696 Members
3390 Online
110062 Solutions
New Discussion

Re: MAC address

 
SOLVED
Go to solution
Chern Jian Leaw
Regular Advisor

MAC address

Hi
Is there a way which I can find the MAC address of a particular HP workstation, given only the IP address?

If so, could someone provide the command on how to find the MAC address?

Thanks
18 REPLIES 18
Tom Geudens
Honored Contributor

Re: MAC address

Hi,
You cannot do this remote, but on the workstation itself you can do (example) :
root/sv00138#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 0x001083FC02BC 0 UP lan0 snap0 1 ETHER Yes 119

Hope this helps,
Tom
A life ? Cool ! Where can I download one of those from ?
Ruediger Noack
Valued Contributor

Re: MAC address

A simple way:
ping the workstation an then look in the arp cache: arp -a

Ruediger
Trond Haugen
Honored Contributor

Re: MAC address

As there is no connection between MAC- and IP-adress, strictly no. But a posible solution is:
telnet IP
logind: root
lanscan

Not sure if this is what you wanted.

regards,
Trond
Regards,
Trond Haugen
LinkedIn
Tom Geudens
Honored Contributor

Re: MAC address

Oh ... I so ashamed ... arp -a does indeed do the trick remotely.
I'm going very red in the face now :-)

Regards,
Tom

P.S. N/A for this one please
A life ? Cool ! Where can I download one of those from ?
steven Burgess_2
Honored Contributor

Re: MAC address

Hi

arp -a | grep

Steve
take your time and think things through
manoj_pu
Regular Advisor

Re: MAC address



Hi

You can get macaddress by "ping" and "arp -a" if the IP is in LAN.

If it is connected through router then yo will have to do telnet and do lanscan

Manoj
Leave with out tense and try best you gets result
T G Manikandan
Honored Contributor

Re: MAC address

#arp -a |grep should give it.
If the result is blank

Then just do a ping to the remote ip-address(ip for which you require mac-address)
#ping
#arp -a|grep

Thanks
Chern Jian Leaw
Regular Advisor

Re: MAC address

HI Tom,
From your generated output below:

root/sv00138#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 0x001083FC02BC 0 UP lan0 snap0 1 ETHER Yes 119

Which is the MAC address? Is it the HP-DLPI, or 0x001083FC02BC ?

Thanks.

Chern Jian Leaw
Regular Advisor

Re: MAC address

TG,

I'm afraid arp -a |grep still produces a blank result, after doing a ping or even logging into that ip_address.

Please advice.
T G Manikandan
Honored Contributor
Solution

Re: MAC address

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

is the MAC-address!
Mahima Kaushik_2
Frequent Advisor

Re: MAC address

The Mac address can be found written in a file under /etc/rc.config.d directory. The file can be hpfddiconf or hpetherconf depending upon your network configuration. The variable should be listed something like this.

STATION_ADDRESS=0x08******

Mahima
Aim high!
Pete Randall
Outstanding Contributor

Re: MAC address

In answer to your question,
0x001083FC02BC is the MAC address in Tom's output.

HTH
Pete

Pete
Ruediger Noack
Valued Contributor

Re: MAC address

Hi,

the reading of arp cache works from a remote box. You don't need to login to the box you want to recognize the MAC address. The MAC adresses of local NIC are *NOT* in the arp cache.

Ruediger
Chern Jian Leaw
Regular Advisor

Re: MAC address

mahima,
When I opened the file hpetherconf, there isn't a value assigned to the HP_ETHER_STATION_ADDRESS[0] variable.

Could you please explain how is it possible for the lanscan to still produce the MAC address without it being defined the hpetherconf file?

Thanks
Pete Randall
Outstanding Contributor

Re: MAC address

From what I can gather from the man page, lanscan reads from the running kernel, not from any configuration file. That would explain how it can find the MAC address, I think.

Pete

Pete
John Palmer
Honored Contributor

Re: MAC address

Hi,

HP_ETHER_STATION_ADDRESS allows you to set a particular MAC address if you want to. This was used historically on systems where application software licensing depended on a MAC address.

If you don't set it (which is the default) then the unique hardware address of the card is used.

Regards,
John
Tom Geudens
Honored Contributor

Re: MAC address

Hi,
The MAC address in the output is
0x001083FC02BC

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Rich Wright
Trusted Contributor

Re: MAC address

It looks to me like the "arp -a" method does not work if going through a router.