Pages

Saturday, November 16, 2013

How to find specific mac address or IP address in a Cisco Switch port

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.

Cisco Switch Command

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>"
 

9 comments:

  1. clearest explanation i've found of cisco tools

    ReplyDelete
  2. You can trace a mac address using the command traceroute mac!
    http://www.ciscozine.com/2011/01/12/how-to-trace-mac-address/

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Thank you for sharing such a important information .
    http://www.fltcase.com

    ReplyDelete
  5. This is excellent information. It is amazing and wonderful to visit your site.
    Best Mobile Network Signal Repeater

    ReplyDelete
  6. 10.0.0.1 is IP address that was planned as IP which will help you to configure device. It’s not difficult to get access from router’s configuration panel and set up all necessary settings. Moreover, there are other things that can be configured by configuration panel (DNS, MAC address. Etc.).

    ReplyDelete