Finding switch port from IP address

Sometimes it is necessary to be able to find the port a PC is connected to in case you need to VLAN that particular port or troubleshoot other issues.  Below are some quick instructions for how to find the port a device is plugged into based on IP address and or MAC address.

1. Record the IP address or MAC address of the computer or device you are trying to locate
2. Locate the network switch your device is connected to
3. Telnet to the Cisco switch the device is connected to
4. You will see the following prompt highlighted in RED.  Ping the IP address of the device you are working on.


Switch1#
ping 192.168.16.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.16.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms

3. Type in the following sho arp command

Switch1#sho arp | inc 192.168.16.2

Internet  192.168.16.2            0   001e.4f2f.1506  ARPA   Vlan1

4. Type in the following sho mac address-table command

Switch1#
sho mac address-table add 001e.4f2f.1506

Depending on the version of IOS on the switch, this can be:

sho mac-address-table address 001e.4f2f.1506

             Mac Address Table
——————————————-
Vlan    Mac Address       Type        Ports
—-      ———–          ——–    —–
1    001e.4f2f.1506    DYNAMIC     Fa0/7

Note the port Fa0/7. This device has been found on Port 7 of this network switch.

George Almeida

Welcome to my little corner of the blogosphere. I'm an Information Technology Director. I specialize in Windows operating systems, applications, servers, storage, networks and also have a technical background on the IBM iSeries platform. My only purpose for this blog is the hope that it helps someone, someday, somewhere. Any meager proceeds derived from our sponsors will be donated to charity.

You may also like...

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x