Operating System - HP-UX
1819824 Members
3086 Online
109607 Solutions
New Discussion юеВ

Re: get remote mac address

 
SOLVED
Go to solution
wyan lowe
Frequent Advisor

get remote mac address

how do you get the MAC address of a remote IP address node? Assuming the node is on another subnet...

arp will show for local subnet? rarp doesn't exist?
NT has getMAC (resource kit), nbtstat -A...
7 REPLIES 7
Vikas Khator
Honored Contributor

Re: get remote mac address

Hi ,

Are you running Network Node Manager in your environment . If yes you can click on Interface propoerties for the node and it will give you MAC address . ( provided NNM has discovered the node).
Keep it simple
wyan lowe
Frequent Advisor

Re: get remote mac address

no nnm here, but nnm uses snmp? and probably the router/hub/switch on the other subnet has the MAC addresses of the local nodes - but this is kind of cheating since you don't get the info from the node, but from the middle-man. Also, do you need to have the security/community string or whatever?

isn't there a way to do this using rarp or arp or something that directly contact the 2nd node on another subnet and retrieves its MAC address? or am I on crack...
James A. Donovan
Honored Contributor

Re: get remote mac address

A packet sniffer program like tcpdump should be able to give you the information you want, since the incoming packets from the remote host should have the MAC address. Nettl may also be able to give you the same info, but I don't know the procedure for extracting it.
Remember, wherever you go, there you are...
wyan lowe
Frequent Advisor

Re: get remote mac address

but the packet sniffer, running on the host that wants to know the mac of the remote node, would probably only see the MAC address of the router/gateway that relayed the message from the remote node. arp -a shows that the default gateway's mac address...
Brian Hackley
Honored Contributor
Solution

Re: get remote mac address

Wyan,
I don't know of a command in the base HPUX Operating system product that can reveal the MAC address of a "target" located on another IP subnet. It is possible that if that IP subnet is on the same collision domain/Virtual Network as the HP system, then a tool such as tcpdump or a sniffer might be helpful if arp is not able to reveal the actual MAC address of the target, and not that of the router.

Of course a few workarounds might be possible, such as a shell script that does a "remsh target-host lanscan". If the target has multiple lan cards, you'll need to determine which one is of interest. For example lanscan followed by netstat -in on that target host.

Another note is that at HPUX 11.0 at present the arp command will not show the mac address of a local lan interface, but at 10.20 it will.

Hope this helps a little,
Brian Hackley
Ask me about telecommuting!
wyan lowe
Frequent Advisor

Re: get remote mac address

But this is weird, what happened to reverse arp?

the problem with the remsh to remote node is suppose you don't have access to that node or it doesn't have remote shell support...

so isn't there an agreed up/supported TCP/IP standard protocol where you can contact the node via it's IP address and request its MAC address be returned in the data field?

somehow most nodes understand arp & will respond to a broadcast - so that is a supported standard protocol. what happened to the reverse?

is the supported standard only available now via snmp or something? or am i on crack?
Carlos Fernandez Riera
Honored Contributor

Re: get remote mac address


Nettl will help you.

Some type of packets contain both source and destination macs.

I dont know any utility that show a mac address for a IP. In facts IP protocol is over arp ( Ethernet) protocol, who must resolve mac to IP adrress. This is, arp command is not part of IP protocol, just search/set arp tables.

As you say NT has getMAC into his RESOURCE KIT, not by command as long i know.

Search nettl in forums for help.




unsupported