A CDP neighbor table records directly connected devices discovered through Cisco Discovery Protocol advertisements. Each entry identifies the neighbor and maps its port to the local interface. section 1.1 section 1.1.1
Read the standard show cdp neighbors columns as follows:
- Device ID gives the neighbor hostname; Local Intrfce gives the local device interface; Port ID gives the neighbor’s outgoing interface. section 1.1.1
- Holdtme shows the remaining time before the entry is removed; receiving another advertisement resets the default 180-second timer. section 1.1.1
- Capability identifies device functions, while Platform identifies the neighbor’s hardware model. section 1.1.1
- Use show cdp neighbors detail for additional information such as software version, native VLAN, duplex, and advertisement version. section 1.1.1
R1# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge #1
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, #1
D - Remote, C - CVTA, M - Two-port Mac Relay #1
Device ID Local Intrfce Holdtme Capability Platform Port ID
SW1 Gig 0/0 158 R S I WS-C2960C Gig 0/1 #2
#1 Codes used in the Capability column
#2 SW1 is R1’s CDP neighbor.
Annotated output demonstrates how a neighbor entry maps SW1 to R1’s GigabitEthernet0/0 and SW1’s GigabitEthernet0/1. section 1.1.1
Mapping an undocumented network
Collect show cdp neighbors output from several remotely accessible devices and connect each Local Intrfce to the corresponding Port ID. This reconstructs device relationships without physical access or an updated diagram. section 1.1.2
R1# show cdp neighbors . . . Device ID Local Intrfce Holdtme Capability Platform Port ID SW1 Gig 0/2 163 R S I Gig 0/1 SW2 Gig 0/1 151 R S I Gig 0/2 R2 Gig 0/0 132 R B Gig 0/1 R2# show cdp neighbors . . . Device ID Local Intrfce Holdtme Capability Platform Port ID SW3 Gig 0/0 160 R S I Gig 0/1 R1 Gig 0/1 150 R B Gig 0/0 SW1# show cdp neighbors . . . Device ID Local Intrfce Holdtme Capability Platform Port ID SW2 Gig 0/2 168 R S I Gig 0/1 R1 Gig 0/1 178 R B Gig 0/2 SW2# show cdp neighbors . . . Device ID Local Intrfce Holdtme Capability Platform Port ID SW1 Gig 0/1 124 R S I Gig 0/2 R1 Gig 0/2 157 R B Gig 0/1 SW3# show cdp neighbors . . . Device ID Local Intrfce Holdtme Capability Platform Port ID R2 Gig 0/1 157 R B Gig 0/0
Multiple device outputs provide the data needed to practice reconstructing a topology from reciprocal local and remote interface mappings. section 1.1.2
