Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Cisco ip to mac address of a device?

What command can I run in CLI, to get a mac address that is associated with a provided ip address?

Context: In order to access wifi, users have to go through a web authentication. Upon submiting their credentials, we are able to see their ip address. We want to query router api with cli or something, to find a mac address based on the ip.

Any pointers?

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
VIP Purple

Yes this is a very basic way

Yes this is a very basic way  of getting it, In the past you could not even do this & Cisco added this feature only from 7.5.x code onward.

So you cannot do lot of filtering on this, hope Cisco will improve it further. So you need to live with those limitation at the moment :)

 

HTH

Rasika

9 REPLIES
VIP Purple

Hi"show ip arp" may be helps

Hi

"show ip arp" may be helps you.

HTH

Rasika

**** Pls rate all useful responses ***

New Member

A follow up question - do I

A follow up question - do I run this against the Wireless Controller or the Access Point? I do not seem to be able to find command information for my hardware (3560-C switch, 2500 series WLC and 2700 AP)

New Member

Hi again. I've ran "show ip

Hi again.

 

I've ran "show ip arp" against the switch and get the following output (see attachment)

I checked my mobile device, and neither ip nor mac addresses of my device are on the list. 

 

 

VIP Purple

Try to get "show client

Try to get "show client summary" output from your WLC at the time you get "show ip arp" output from your 3560 switch.

In that way we can compare whether your wireless client entry shown in WLC/Switch or not

 

HTH

Rasika

**** Pls rate all useful responses ****

New Member

Hi,I actually found a

Hi,

I actually found a possibly better solution. Running "show arp switch" against the WLC, outputs a table (see attachment). 

It's basically what I need, except I cannot find a way to filter the command by a mac address. Something along the lines of "show arp switch | <ip address to find>" would be perfect. Any ideas?

VIP Purple

Try this command, you can

Try this command, you can include MAC address or IP address of your client as you want.

(WLC-01) >grep include '04:FE:7F:68:A4:54' 'show arp switch'

 

HTH

Rasika

**** Pls rate all useful responses ****

New Member

Thank you, this almost works.

Thank you, this almost works. If there are more than 15 entries in data output, I am asked to type "y" to show next set of results ( see attachment). Is it possible to make sure it skips empty result sets? I realize this is more of a "grep include" question.

 

VIP Purple

Yes this is a very basic way

Yes this is a very basic way  of getting it, In the past you could not even do this & Cisco added this feature only from 7.5.x code onward.

So you cannot do lot of filtering on this, hope Cisco will improve it further. So you need to live with those limitation at the moment :)

 

HTH

Rasika

Cisco Employee

It is usually not possible

It is usually not possible for a person to get the MAC address of a computer from its IP address alone. These two addresses originate from different sources. Simply stated, a computer's own hardware configuration determines its MAC address while the configuration of the network it is connected to determines its IP address.

 

However, computers connected to the same TCP/IP local network can determine each other's MAC addresses. The technology called ARP - Address Resolution Protocol included with TCP/IP makes it possible. Using ARP, each computer maintains a list of both IP and MAC addresses for each device it has recently communicated with.

Most computers allow you to see the list of IP and MAC addresses that ARP has collected there. In Windows, Linux and other operating systems, the command line utility "arp" shows this information. Using "arp," you can in fact determine the MAC address of some computers from their IP address. ARP works only within the small group of computers on a local area network (LAN), though, not across the Internet. ARP is intended for use by system administrators and is not generally useful as a way to track down computers and people on the Internet.

1026
Views
13
Helpful
9
Replies
CreatePlease login to create content