liveBook · Manning

Show cdp neighbors

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

show cdp neighbors is a Cisco IOS CLI command that displays the Cisco Discovery Protocol neighbor table.

show cdp neighbors displays the Cisco Discovery Protocol neighbor table, revealing directly connected devices and the local and neighboring interfaces used to connect them. section 1.1.1 section 1.3

Read the principal columns as follows:

  • Device ID identifies the neighbor; Local Intrfce identifies the local device’s port. section 1.1.1
  • Port ID identifies the neighbor’s outgoing port, allowing both ends of a link to be matched. section 1.1.1
  • Holdtme counts down from the default 180 seconds until the neighbor entry expires without another advertisement. section 1.1.1
  • Capability and Platform identify device roles and hardware models. section 1.1.1

Mapping an undocumented network

Run show cdp neighbors on multiple remotely accessed devices, then connect each Local Intrfce to the corresponding neighbor Port ID to reconstruct the topology. section 1.1.2

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.

Inspect annotated IOS output showing capability codes and the relationship between local and neighbor interfaces. section 1.1.1

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Explains output fields, holdtime behavior, capability codes, and topology mapping, while detailed neighbor data requires show cdp neighbors detail.
Examples
Uses annotated R1 output and multi-device neighbor listings to identify links and reconstruct a network diagram.
What it assumes
Assumes Cisco IOS CLI access and familiarity with local interfaces; explains CDP neighbor fields directly.
What you can do after
Diagnose/debug with it: identify directly connected neighbors, match interface endpoints, and map an undocumented network.
How it connects
Connects CDP neighbor tables with Cisco Discovery Protocol, LLDP, interface identification, and Layer 2 discovery.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.