cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
490
Views
0
Helpful
6
Replies

Finding a machine on IOS

august70
Level 1
Level 1

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 192.168.2.7 From the enable prompt you would type in

"sh arp | include 192.168.2.7 "

This would result in this if found on that switch

Internet 192.168.2.7 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.

TIA

6 Replies 6

paul.matthews
Level 5
Level 5

You do exactly what I do!

Paul.

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

jcoke
Level 3
Level 3

I suppose you could temporarily put a VSI on the same VLAN as the host you're trying to find. That way you wouldn't have to log into the router to pull the arp entry.

ankbhasi
Cisco Employee
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.

HTH

Ankur

Kevin Dorrell
Level 10
Level 10

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

Luxembourg

petr.novak
Level 1
Level 1

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.

--

Petr

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