Finding What Switch Port An IP Address Is On With Multiple Switches

Finding What Switch Port An IP Address Is On With Multiple Switches

1. Issue  “Show ARP | include a.b.c.d” on the Switch or Router for the subnet of the IP address you are trying to find

2. Issue a “Show Mac Address-table address mac address”

3. Issue a “Show CDP Neighbor” and “Show CDP Neighbor Detail” to find which switch the mac address in located on.

4. Repeat “Show mac address-table address “mac address” on switch until you find the port the IP address in on.


  1. Hi,

    In My Scenario, I have 1 Router and 10 Switches in the network

    I have the MAC and IP of the computer, also i can verify it on the router
    on the router it shows me the IP and MAC – by – sh ip arp | i 10.xx.yy.zz

    from the router can I find out on which switch this mac is secured and on which port..

    Thanks in advance

    • You would only be able to tell which uplink port on your router that address is coming from. To find out which switchport the device is connected to you would need to login to the switch connected to your router and work your way back through the switches. If your switches are uplinked via a daisy chain, E.G. Switch to Switch to Switch, etc. this could take longer. However 10 switches still really would not take that long to work through. Hope that helps and let me know if you have any other questions, thanks.

  2. i have multiple switches on network.

    my requirement is ro find the mac or ip over network. where i can get the output (swithc IP and Port number) is it possible. with singel command on core switch (cisco) and access switches HP and Cisco.

    Thank you Much.

  3. Nuc9901 says:

    Do you have any tips on automating this with a script so that it would be possible to run the script with the IP address on the command line and ‘walk’ down to the port where the device is connected?
    Of course the script would have to know that the ‘last’ port does NOT have a switch connected to it.
    And suppose that some switches are using telnet while others are using ssh.

Speak Your Mind