Sometimes you don’t have access to physically trace (or the patience) to determine what physical switch port you are plugged in to. These steps can help you (applying to a Cisco switch). This is very useful for modular layer 3 switches as well as appliance switches.
NOTE: If your switch is a layer 2 switch and your management IP is on a different subnet than the host you are trying to figure out, you might not be able to do this. In this case the arp table is stored on the host and not the switch so you wont be able to use this method.
- Log into your switch/router. You don’t need privileged rights to do this.
- Ping the device (this isn’t mandatory if your host is in the ARP table, but I do it just in case)
Switch#ping 192.168.1.50 Sending 5, 100-byte ICMP Echos to 192.168.1.50, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
3. Find the mac-address of the host
Switch#sh arp | inc 192.168.1.50 Internet 192.168.1.50 2 0061.1624.ab69 ARPA Vlan50
4. Take the mac-address and compare to the arp-table
Switch#sh mac-address-table | inc 0061.1624.ab69 * 50 0061.1624.ab69 dynamic Yes 15 Gi2/5
Bam!! You’ve got the port!! In my example my server is on VLAN 50 and I’m plugged into module 2 port 5.
If you know the server will be staying in this port–do yourself a favor and update your documentation and switchport description!!