Alfred's New Ramblings

CDP is a lifesaver

Cisco Discovery Protocol or CDP as I have discovered is a lifesaver.

I wanted to connect my switch to another. The customer has no idea what is the hostname. So I just cascaded my switch off an empty port and typed the following:

show CDP neighbour

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 
Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
ac17c999e999     Gig 1/0/1         178          R S   Meraki MR Port 0
ac17c999e998     Gig 1/0/3         152          R S   Meraki MR Port 0
SW1              Gig 1/0/48        179          S I   WS-C3650- Gig 1/0/48
SW3              Gig 1/0/47        165          S I   WS-C3650- Gig 1/0/47
ac17c999e997     Gig 1/0/4         169          R S   Meraki MR Port 0
ac17c999e996     Gig 1/0/2         135          R S   Meraki MR Port 0
Total cdp entries displayed : 6

CDP showed the hostname of the switch I was connected to. No messing around with VLAN required. The command

show CDP entry <hostname>

SW2#sh cdp entry SW1
Device ID: SW2
Entry address(es): 
  IP address:
Platform: cisco WS-C3650-48PS,  Capabilities: Switch IGMP 
Interface: GigabitEthernet1/0/48,  Port ID (outgoing port): GigabitEthernet1/0/48
Holdtime : 153 sec
Version :
Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.9.4, RELEASE SOFTWARE (fc2)
Technical Support:
Copyright (c) 1986-2019 by Cisco Systems, Inc.
Compiled Thu 22-Aug-19 17:33 by mcpre
advertisement version: 2
VTP Management Domain: ''
Native VLAN: 1
Duplex: full
Management address(es): 
  IP address:

It displays the management IP and additional information. This really saves me the hassle of scheduling a password recovery.

Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *