Finding a machine on IOS

Unanswered Question
Oct 3rd, 2007

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
paul.matthews Wed, 10/03/2007 - 07:52

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

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 Wed, 10/03/2007 - 07:17

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 Wed, 10/03/2007 - 18:09

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

Actions

This Discussion