[c-nsp] MAC-to-IP script on IOS

Phil Mayers p.mayers at imperial.ac.uk
Fri May 25 06:18:39 EDT 2012


On 05/25/2012 07:27 AM, Hansen, Ulrich Vestergaard B. (E W EN R&D DT ES
1 2) wrote:
> Gents,
>
> Have anyone come across a script that could yield the IP address of a
> given mac-address when invoked on a Layer 3 Router? I would assume
> that you would have to select the given interface (as it could be any
> interface) and the router should start arp-ing all hosts on a given
> subnet returning the result when finished executing the script?
>
> Assumptions is that you know the logical subnet where the mac-address
> reside or maybe it could be invoked with a "all" interface command to
> run the script on all logical interfaces. Anyone seen it?

This is such a simple question I feel sure I am misunderstanding it.

It seems you are assuming the IP will NOT be in the ARP table. If that's 
the case, why do you assume that "arp"ing all hosts in a subnet would 
make it appear in the ARP table.

Put another way: why do you need to know the IP of a MAC that *isn't* in 
the ARP table?

You might want to investigate "netdisco" which maintains historical 
IP/MAC mappings by way of the ARP table. We run something similar locally.


More information about the cisco-nsp mailing list