show cdp neighbors

To display the Cisco Discovery Protocol (CDP) neighbors, use the show cdp neighbors command.

show cdp neighbors [ interface { ethernet slot / port | mgmt mgmt-num }] [ detail ]

Syntax Description

interface
(Optional) Displays CDP neighbor information for an interface, Ethernet or management.
ethernet slot / port
(Optional) Displays CDP neighbor information for an Ethernet interface. The slot number is from 1 to 255 and the port number is from 1 to 128
mgmt mgmt-num
(Optional) Displays CDP neighbor information for a management interface. The management interface number is 0.
detail
(Optional) Displays the detailed information about CDP neighbors.

Command Default

None

Command Modes

EXEC mode

Command History

Release
Modification
5.0(3)N2(1)
This command was introduced.

Examples

This example shows how to display all CDP neighbors:

switch# show cdp neighbors
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
V - VoIP-Phone, D - Remotely-Managed-Device,
s - Supports-STP-Dispute, M - Two-port Mac Relay
 
 
Device ID Local Intrfce Hldtme Capability Platform Port ID
savbu-qa-dist-120 mgmt0 177 S I WS-C3750E-24T Gig1/0/13
swor96(SSI13110AAQ) Eth1/17 165 S I s N5K-C5010P-BF Eth1/19
 
swor96(SSI13110AAQ) Eth1/18 165 S I s N5K-C5010P-BF Eth1/20
 
swor95(SSI13110AAS) Eth1/29 171 S I s N5K-C5010P-BF Eth1/19
 
switch#
 

This example shows how to display the CDP neighbors for a specific Ethernet interface:

switch# show cdp neighbors interface ethernet 1/29
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
V - VoIP-Phone, D - Remotely-Managed-Device,
s - Supports-STP-Dispute, M - Two-port Mac Relay
 
 
Device ID Local Intrfce Hldtme Capability Platform Port ID
swor95(SSI13110AAS) Eth1/29 146 S I s N5K-C5010P-BF Eth1/19
 
switch#
 

This example shows how to display the detailed information of the CDP neighbors for a specific Ethernet interface:

switch# show cdp neighbors interface ethernet 1/29 detail
----------------------------------------
Device ID:swor95(SSI13110AAS)
System Name:swor95
Interface address(es):
IPv4 Address: 192.168.0.95
Platform: N5K-C5010P-BF, Capabilities: Switch IGMP Filtering Supports-STP-Dispute
Interface: Ethernet1/29, Port ID (outgoing port): Ethernet1/19
Holdtime: 141 sec
 
Version:
Cisco Nexus Operating System (NX-OS) Software, Version 5.0(3)N2(1)
 
Advertisement Version: 2
Native VLAN: 1
Duplex: full
Physical Location: snmplocation
Mgmt address(es):
IPv4 Address: 192.168.0.95
 
switch#
 

This example shows how to display the CDP neighbors for the management interface:

switch# show cdp neighbors interface mgmt 0
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
V - VoIP-Phone, D - Remotely-Managed-Device,
s - Supports-STP-Dispute, M - Two-port Mac Relay
 
 
Device ID Local Intrfce Hldtme Capability Platform Port ID
savbu-qa-dist-120 mgmt0 126 S I WS-C3750E-24T Gig1/0/13
 
switch#
 

This example shows how to display the detailed information of the CDP neighbors for the management interface:

switch# show cdp neighbors interface mgmt 0 detail
----------------------------------------
Device ID:savbu-qa-dist-120
System Name:
Interface address(es):
IPv4 Address: 192.168.0.82
Platform: cisco WS-C3750E-24TD, Capabilities: Switch IGMP Filtering
Interface: mgmt0, Port ID (outgoing port): GigabitEthernet1/0/13
Holdtime: 179 sec
 
Version:
Cisco IOS Software, C3750E Software (C3750E-UNIVERSAL-M), Version 12.2(35)SE5, R
ELEASE SOFTWARE (fc1)
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Thu 19-Jul-07 16:17 by nachen
 
Advertisement Version: 2
Native VLAN: 16
VTP Management Domain:
Duplex: full
Mgmt address(es):
IPv4 Address: 192.168.0.82
 
switch#
 

This example shows how to display the detailed information of all CDP neighbors:

switch# show cdp neighbors detail
 

Related Commands

Command
Description
cdp
Enables CDP on the switch.