cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15054
Views
14
Helpful
9
Replies

Cisco ip to mac address of a device?

evr000001
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

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

View solution in original post

9 Replies 9

Hi

"show ip arp" may be helps you.

HTH

Rasika

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

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)

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. 

 

 

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 ****

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?

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 ****

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.

 

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

mohanak
Cisco Employee
Cisco Employee

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card