How to determine which port that a host connects

Unanswered Question
Aug 14th, 2007


I'd like to associate a host to a port. I know the IP and MAC address of the host in question but I'd ilke to find out the switch port it connects without having to physically trace cables. Is there an easy way of doing this?



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Jon Marshall Tue, 08/14/2007 - 01:59


Do you know the switch it is connected to. If not doesn't matter, just takes a bit more time.

Assuming IOS on your switches

sh mac-address-table address "mac address".

This will either tell you which port it is attached to or it will show it has been learned via a trunk port. If it has been learn't by a trunk port you need to do a

"sh cdp neigh" and track down the switch at the other end of the trunk link and repeat the above process.



Edit - if CatOS command would be

"sh cam "mac address"

graemeporter Tue, 08/14/2007 - 02:00

Hi Paul!

On IOS switches, you can use these commands:

show ip arp


show mac-address-table

If you know the specific MAC, then you could do (e.g.)

show mac-address-table | include 01234.5678.9abc

Hope this helps!

Kind regards,



This Discussion