Finding a machine on IOS

Unanswered Question
Oct 3rd, 2007
User Badges:

Currently when I need to find a device on a switch that I dont know where it is plugged in, I go through this process.

Say you want to find a machine with the IP address of From the enable prompt you would type in

"sh arp | include "

This would result in this if found on that switch

Internet 4 000b.cdaf.1d29 ARPA Vlan192

From here, to find the port you would type in

"sh mac address-table dynamic | include 000b.cdaf.1d29"

And the results, if found would be like this

"192 000b.cdaf.1d29 dynamic ip GigabitEthernet7/10"

Can anyone recommend a easier fast way to do this ON THE SWITCH, without using a third party application.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
paul.matthews Wed, 10/03/2007 - 07:52
User Badges:
  • Silver, 250 points or more

Though I ought to add, I rarely type the whole address into the sh arp and sh mac-a commands!

ankbhasi Wed, 10/03/2007 - 07:15
User Badges:
  • Cisco Employee,

Hi Paul,

AFAIK thats the only possible way to find the port on which end user is connected if you only know the ip address. One other way could be to get the mac address details from DHCP server binding table if incase you have DHCP server in network serving your end users and once you have the mac address you can find the port details from the switch which you are already aware.

But no doubt it need more work. So easy and fast way is to get the mac address details from arp table.



Kevin Dorrell Wed, 10/03/2007 - 07:17
User Badges:
  • Green, 3000 points or more

That's the way to do it. But it doesn't work on a layer-2 switch - in that case you need to go to the router to do the ARP bit.

Kevin Dorrell


Petr Novak Wed, 10/03/2007 - 18:09
User Badges:

Another way:

"traceroute mac ip "

One more pinging IP from same subnet (it can't be any switch mgmt IP in network) and you get switch/port info for both IPs. This trace command needs CDP running.




This Discussion