Friday, November 13, 2015

Cisco Switch: Three Commands To Find A Device In CLI

I was tasked to find a bunch of printers on the network.  Cable labeling was a train wreck, and we needed to know where all the printers were so that we could change them to appropriate vlans.  Thankfully, the company knew the IP addresses of the printers.  So, if they know that, I can find the printers.

First, get the printer in the arp table by pinging it.
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/202/1000 ms

Then, find out the mac address.
Cisco_Switch#sh arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet             0   0080.9176.1234  ARPA   Vlan1

Then, find out what port its on.
Cisco_Switch#sh mac add add 0080.9176.1234
          Mac Address Table

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0080.9176.1234    DYNAMIC     Gi2/0/5
Total Mac Addresses for this criterion: 1


  1. Can this be automated in some why so that the connected port for a range of Ip addressess can be discovered ?

    1. I'm sure Brocade Network Advisor (BNA) would do this automatically for you. Other than that, I'm sure there are other third party software that might. I never use those things, probably because if the type of role I do. But it might be worth looking at.


Your comment will be reviewed for approval. Thank you for submitting your comments.