Trick and tip for network admin you should know when you work on enterprice switch. These commands will help you to work faster. If you know the IP address of the device then try to ping it from within the switch. If the device is pingable, then do a simple sh ip arp command. This command will show the MAC address of the device.
TB-CS-4506#
TB-CS-4506#ping 142.30.15.254 ## Step 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 142.30.15.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms
TB-CS-4506#
TB-CS-4506#sh ip arp 142.30.15.254 ## Step 2
Protocol Address Age (min) Hardware Addr Type Interface
Internet 142.30.15.254 140 18ef.63dc.aacd ARPA Vlan20
Then, do the show mac-address command on the switch. This will show the interface (or IP) to which it is connected to a port or through which it is learned.
TB-CS-4506#
TB-CS-4506#sh mac address-table address 18ef.63dc.aacd ## Step 3
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
20 18ef.63dc.aacd DYNAMIC Gi2/0/5
Total Mac Addresses for this criterion: 1
TB-CS-4506#
This indicate the the device is connected to port GigabitEthernet2/0/5. There you can find the device.
Note: You can use the below command to check the ip address of devices on different subnet
"ping ip" then "show ip arp | include <mac address>" or "show cdp neighbors detail | begin <mac address>"
TB-CS-4506#
TB-CS-4506#ping 142.30.15.254 ## Step 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 142.30.15.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms
TB-CS-4506#
TB-CS-4506#sh ip arp 142.30.15.254 ## Step 2
Protocol Address Age (min) Hardware Addr Type Interface
Internet 142.30.15.254 140 18ef.63dc.aacd ARPA Vlan20
Then, do the show mac-address command on the switch. This will show the interface (or IP) to which it is connected to a port or through which it is learned.
TB-CS-4506#
TB-CS-4506#sh mac address-table address 18ef.63dc.aacd ## Step 3
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
20 18ef.63dc.aacd DYNAMIC Gi2/0/5
Total Mac Addresses for this criterion: 1
TB-CS-4506#
This indicate the the device is connected to port GigabitEthernet2/0/5. There you can find the device.
Note: You can use the below command to check the ip address of devices on different subnet
"ping ip" then "show ip arp | include <mac address>" or "show cdp neighbors detail | begin <mac address>"