CDP Commands

This chapter contains the following sections:

cdp advertise-v2

To specify version 2 of transmitted CDP packets, use the cdp advertise-v2 command in Global Configuration mode. To specify version 1, use the no form of this command.

Syntax

cdp advertise-v2

no cdp advertise-v2

Default Configuration

Version 2.

Command Mode

Global configuration mode

Example

switchxxxxxx(config)# cdp run
switchxxxxxx(config)# cdp advertise-v2

cdp appliance-tlv enable

To enable sending of the Appliance TLV, use the cdp appliance-tlv enable command in Global Configuration mode. To disable the sending of the Appliance TLV, use the no form of this command.

Syntax

cdp appliance-tlv enable

no cdp appliance-tlv enable

Default Configuration

Enabled

Command Mode

Global Configuration mode

User Guidelines

This MIB specifies the Voice Vlan ID (VVID) to which this port belongs:

  • 0—The CDP packets transmitting through this port contain Appliance VLAN-ID TLV with value of 0. VoIP and related packets are expected to be sent and received with VLAN-ID=0 and an 802.1p priority.

  • 1..4094—The CDP packets transmitting through this port contain Appliance VLAN-ID TLV with N. VoIP and related packets are expected to be sent and received with VLAN-ID=N and an 802.1p priority.

  • 4095—The CDP packets transmitting through this port contain Appliance VLAN-ID TLV with value of 4095. VoIP and related packets are expected to be sent and received untagged without an 802.1p priority.

  • 4096—The CDP packets transmitting through this port do not include Appliance VLAN-ID TLV; or, if the VVID is not supported on the port, this MIB object will not be configurable and will return 4096.

Example

switchxxxxxx(config)# cdp appliance-tlv enable

cdp device-id format

To specify the format of the Device-ID TLV, use the cdp device-id format command in Global Configuration mode. To return to default, use the no form of this command.

Syntax

cdp device-id format {mac | serial-number | hostname}

no cdp device-id format

Parameters

  • mac—Specifies that the Device-ID TLV contains the device’s MAC address.

  • serial-number—Specifies that Device-ID TLV contains the device’s hardware serial number.

  • hostname—Specifies that Device-ID TLV contains the device’s hostname.

Default Configuration

MAC address is selected by default.

Command Mode

Global Configuration mode

Example

switchxxxxxx(config)# cdp device-id format serial-number

cdp enable

Tp enable CDP on interface, use the cdp enable command in Interface (Ethernet) Configuration mode. To disable CDP on an interface, use the no form of the CLI command.

Syntax

cdp enable

Default Configuration

Enabled

Command Mode

Interface (Ethernet) Configuration mode

User Guidelines

For CDP to be enabled on an interface, it must first be enabled globally using cdp advertise-v2.

Example

switchxxxxxx(config)# cdp run
switchxxxxxx(config-if)# interface gi1/0/1
switchxxxxxx(config-if)# cdp enable

cdp holdtime

To specify a value of the Time-to-Live field into sent CDP messages, use the cdp holdtime command in Global Configuration mode. To return to default, use the no form of this command.

Syntax

cdp holdtime seconds

no cdp holdtime

Parameters

seconds—Value of the Time-to-Live field in seconds. The value should be greater than the value of the Transmission Timer.

Parameters range

seconds—10 - 255.

Default Configuration

180 seconds.

Command Mode

Global Configuration mode

Example

switchxxxxxx(config)# cdp holdtime 100

cdp log mismatch duplex

To enable validating that the duplex status of a port received in a CDP packet matches the ports actual configuration and generation the SYSLOG duplex mismatch messages if they do not match, use the cdp log mismatch duplex command in Global Configuration mode and Interface (Ethernet) Configuration mode. To disable the generation of the SYSLOG messages, use the no form of the CLI command.

Syntax

cdp log mismatch duplex

no cdp log mismatch duplex

Default Configuration

The switch reports duplex mismatches from all ports.

Command Mode

Global Configuration mode

Interface (Ethernet) Configuration mode

Example

switchxxxxxx(config)# interface gi1/0/1
switchxxxxxx(config-if)# cdp log mismatch duplex

cdp log mismatch native

To enable validating that the native VLAN received in a CDP packet matches the actual native VLAN of the port and generation the SYSLOG VLAN native mismatch messages if they do not match, use the cdp log mismatch native Global and Interface Configuration mode command in Global Configuration mode and Interface (Ethernet) Configuration mode. To disable the generation of the SYSLOG messages, use the no format of the CLI command.

Syntax

cdp log mismatch native

no cdp log mismatch native

Default Configuration

The switch reports native VLAN mismatches from all ports.

Command Mode

Global Configuration mode

Interface (Ethernet) Configuration mode

Example

switchxxxxxx(config)# interface gi1/0/1
switchxxxxxx(config-if)# cdp log mismatch native

cdp log mismatch voip

To enable validating that the VoIP status of the port received in a CDP packet matches its actual configuration and generation the SYSLOG voip mismatch messages if they do not match, use the cdp log mismatch voip Global and Interface Configuration mode command in Global Configuration mode and Interface (Ethernet) Configuration mode. To disable the generation of the SYSLOG messages, use the no format of the CLI command.

Syntax

cdp log mismatch voip

no cdp log mismatch voip

Default Configuration

The switch reports VoIP mismatches from all ports.

Command Mode

Global Configuration mode

Interface (Ethernet) Configuration mode

Example

switchxxxxxx(config)# interface gi1/0/1
switchxxxxxx(config-if)# cdp log mismatch voip

cdp mandatory-tlvs validation

To validate that all mandatory (according to the CDP protocol) TLVs are present in received CDP frames, use the cdp mandatory-tlvs validation command in Global Configuration mode. To disables the validation, use the no form of this command.

Syntax

cdp mandatory-tlvs validation

no cdp mandatory-tlvs validation

Default Configuration

Disabled

Command Mode

Global Configuration mode

User Guidelines

Use the command to delete CDP packets not including all the mandatory TLVs.

Example

This example turns off mandatory TLV validation:

switchxxxxxx(config)# no cdp mandatory-tlvs validation

cdp pdu

To specify CDP packets handling when CDP is globally disabled, use the cdp pdu command in Global Configuration mode. To return to default, use the no form of this command.

Syntax

cdp pdu [filtering | bridging | flooding]

no cdp pdu

Parameters

  • filtering—Specify that when CDP is globally disabled, CDP packets are filtered (deleted).

  • bridging—Specify that when CDP is globally disabled, CDP packets are bridged as regular data packets (forwarded based on VLAN).

  • flooding—Specify that when CDP is globally disabled, CDP packets are flooded to all the ports in the product that are in STP forwarding state, ignoring the VLAN filtering rules.

Default Configuration

bridging

Command Mode

Global Configuration mode

User Guidelines

When CDP is globally enabled, CDP packets are filtered (discarded) on CDP-disabled ports.

In the flooding mode, VLAN filtering rules are not applied, but STP rules are applied. In case of MSTP, the CDP packets are classified to instance 0.

Example

switchxxxxxx(config)# cdp run
switchxxxxxx(config)# cdp pdu flooding

cdp run

To enable CDP globally, use the cdp run command in Global Configuration mode. To disable CDP globally, use the no form of this command.

Syntax

cdp run

no cdp run

Default Configuration

Enabled.

Command Mode

Global Configuration mode

User Guidelines

CDP is a link layer protocols for directly-connected CDP/LLDP-capable devices to advertise themselves and their capabilities. In deployments where the CDP/LLDP capable devices are not directly connected and are separated with CDP/LLDP incapable devices, the CDP/LLDP capable devices may be able to receive the advertisement from other device(s) only if the CDP/LLDP incapable devices flood the CDP/LLDP packets they receives. If the CDP/LLDP incapable devices perform VLAN-aware flooding, then CDP/LLDP capable devices can hear each other only if they are in the same VLAN. It should be noted that a CDP/LLDP capable device may receive advertisement from more than one device if the CDP/LLDP incapable devices flood the CDP/LLDP packets.

To learn and advertise CDP information, it must be globally enabled (it is so by default) and also enabled on interfaces (also by default).

Example

switchxxxxxx(config)# cdp run

cdp source-interface

To specify the CDP source port used for source IP address selection, use the cdp source-interface command in Global Configuration mode. To delete the source interface, use the no form of this command.

Syntax

cdp source-interface interface-id

no cdp source-interface

Parameters

interface-id—Source port used for Source IP address selection.

Default Configuration

No CDP source interface is specified.

Command Mode

Global Configuration mode

User Guidelines

Use the cdp source-interface command to specify an interface whose minimal IP address will be advertised in the TVL instead of the minimal IP address of the outgoing interface.

Example

switchxxxxxx(config)# cdp source-interface gi1/0/1

cdp timer

To specify how often CDP packets are transmitted, use the cdp timer command in Global Configuration mode. To return to default, use the no form of this command.

Syntax

cdp timer seconds

no cdp timer

Parameters

seconds—Value of the Transmission Timer in seconds. Range: 5-254 seconds.

Default Configuration

60 seconds.

Command Mode

Global Configuration mode

Example

switchxxxxxx(config)# cdp timer 100

clear cdp counters

To reset the CDP traffic counters to 0, use the clear cdp counters command in Privileged EXEC mode.

Syntax

clear cdp counters [global | interface-id]

Parameters

  • global—Clear only the global counters.

  • interface-id—Specifies the interface identifier of the counters that should be cleared.

Command Mode

Privileged EXEC mode

User Guidelines

Use the command clear cdp counters without parameters to clear all the counters.

Use the clear cdp counters global to clear only the global counters.

Use the clear cdp counters interface-id command to clear the counters of the given interface.

Example

Example 1. The example clears all the CDP counters:

switchxxxxxx# clear cdp couters

Example 2. The example clears the CDP global counters.

switchxxxxxx# clear cdp couters global

Example 3. The example clears the CDP counters of Ethernet port gi1/0/1:

switchxxxxxx# clear cdp couters interface gi1/0/1

clear cdp table

To delete the CDP Cache tables, use the clear cdp table command in Privileged EXEC mode.

Syntax

clear cdp table

Command Mode

Privileged EXEC mode

Example The example deletes all entries from the CDP Cache tables:

switchxxxxxx# clear cdp table

show cdp

To display the interval between advertisements, the number of seconds the advertisements are valid and version of the advertisements, use the show cdp Privileged EXEC mode command in Privileged EXEC mode.

Syntax

show cdp

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show cdp
Global CDP information:
   cdp is globally enabled
   cdp log duplex mismatch is globally enabled
   cdp log voice VLAN mismatch is globally enabled
   cdp log native VLAN mismatch is globally disabled
   Mandatory TLVs are
     Device-ID TLV (0x0001
     Address TLV (0x0002)
     Port-ID TLV (0x0003)
     Capabilities TLV (0x0004)
     Version TLV (0x0005)
     Platform TLV (0x0006)
   Sending CDPv2 advertisements is enabled
   Sending Appliance TLV is enabled
   Device ID format is Serial Number
   Sending CDP packets every 60 seconds
   Sending a holdtime value of 180 seconds

show cdp entry

To display information about specific neighbors, use the show cdp entry command in Privileged EXEC mode.

Syntax

show cdp entry {* | device-name} [protocol | version]

Parameters

  • *—Specifies all neighbors

  • device-name—Specifies the name of the neighbor.

  • protocol—Limits the display to information about the protocols enabled on neighbors.

  • version—Limits the display to information about the version of software running on the neighbors.

Default Configuration

All of the entry information is display if the protocol and version keywords are not specified.

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show cdp entry
Device-ID: Site1-C1300-Stack-10
Advertisement version: 2
Platform: Cisco C1300-24P-4X (PID:C1300-24P-4X)-VSD
Capabilities: Router Switch IGMP 
Interface: gi10, Port ID (outgoing port): gi2/0/20
Holdtime: 129
Version: 4.1.0.68
Duplex: full
Native VLAN: 1
Application: VoIP using VLAN 114
SysName: Site1-C1300-Stack-10
Addresses:
          IP 172.16.1.31
          IPv6 fe80::e64e:2dff:fe4a:32eb (link-local)
Site1-C1200-8T-16#

Site1-C1200-8T-16#sh cdp entry Site1-C1300-Stack-10 protocol 
---------------------------------------------
Device-ID: Site1-C1300-Stack-10
Addresses:
          IP 172.16.1.31
          IPv6 fe80::e64e:2dff:fe4a:32eb (link-local)
Site1-C1200-8T-16#
Site1-C1200-8T-16#
Site1-C1200-8T-16#sh cdp entry Site1-C1300-Stack-10 version 
---------------------------------------------
Device-ID: Site1-C1300-Stack-10
Version: 4.0.0.81
Site1-C1200-8T-16#

 
switchxxxxxx# show cdp entry device.cisco.com version
Device-ID: Site1-C1300-Stack-10
Advertisement version: 2
Platform: Cisco C1300-24P-4X (PID:C1300-24P-4X)-VSD
Capabilities: Router Switch IGMP 
Interface: gi10, Port ID (outgoing port): gi2/0/20
Holdtime: 129
Version: 4.1.0.68
Duplex: full
Native VLAN: 1
Application: VoIP using VLAN 114
SysName: Site1-C1300-Stack-10
Addresses:
          IP 172.16.1.31
          IPv6 fe80::e64e:2dff:fe4a:32eb (link-local)
Site1-C1200-8T-16#
Site1-C1200-8T-16#sh cdp entry Site1-C1300-Stack-10 protocol 
---------------------------------------------
Device-ID: Site1-C1300-Stack-10
Addresses:
          IP 172.16.1.31
          IPv6 fe80::e64e:2dff:fe4a:32eb (link-local)
Site1-C1200-8T-16#
Site1-C1200-8T-16#
Site1-C1200-8T-16#sh cdp entry Site1-C1300-Stack-10 version 
---------------------------------------------
Device-ID: Site1-C1300-Stack-10
Version: 4.0.0.81
Site1-C1200-8T-16#
 
switchxxxxxx# show cdp entry device.cisco.com protocol
Device-ID: Site1-C1300-Stack-10
Addresses:
          IP 172.16.1.31
          IPv6 fe80::e64e:2dff:fe4a:32eb (link-local)
Site1-C1200-8T-16#
Site1-C1200-8T-16#
Site1-C1200-8T-16#sh cdp entry Site1-C1300-Stack-10 version 
 
switchxxxxxx# show cdp entry device.cisco.com version
Device-ID: Site1-C1300-Stack-10
Version: 4.0.0.81
Site1-C1200-8T-16#
 

show cdp interface

To display information about ports on which CDP is enabled, use the show cdp interface command in Privileged EXEC mode.

Syntax

show cdp interface interface-id

Parameters

interface-id—Port ID.

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show cdp interface gi1/0/1
CDP is globally enabled
CDP log duplex mismatch
  Globally is enabled
  Per interface is enabled
CDP log voice VLAN mismatch
  Globally is enabled
  Per interface is enabled
CDP log native VLAN mismatch
  Globally is disabled
  Per interface is enabled
gi1/0/1 is Down, CDP is enabled
Sending CDP packets every 60 seconds
Holdtime is 180 seconds

show cdp neighbors

To display information about neighbors kept in the main or secondary cache, use the show cdp neighbors command in Privileged EXEC mode.

Syntax

show cdp neighbors [interface-id] [detail | secondary]

Parameters

  • interface-id—Displays the neighbors attached to this port.

  • detail—Displays detailed information about a neighbor (or neighbors) from the main cache including network address, enabled protocols, hold time, and software version.

  • secondary—Displays information about neighbors from the secondary cache.

Default Configuration

If an interface ID is not specified, the command displays information for the neighbors of all ports.

If detail or secondary are not specified, a summary table of all neighbors is displayed.

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,P - VoIP Phone,
M - Remotely-Managed Device, C - CAST Phone Port, W - Two-Port MAC Relay
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - VoIP Phone
                  M - Remotely-Managed Device, C - CAST Phone Port,
                  W - Two-Port MAC Relay
    Device ID       Local      Adv  Time To Capability   Platform     Port ID
                    Interface  Ver. Live
------------------ ----------- ---- ------- ---------- ------------ -----------
PTK-SW-A-86.company   gi48      2     147      S I     Company        gi3/39
l.com                                                  XX-10R-E
    ESW-520-8P        gi48      2     153     S I M    ESW-520-8P     g1
    ESW-540-8P        gi48      2     146     S I M    ESW-540-8P     g9
   003106131611       gi48      2     143      S I     Company        fa2/1
                                                       XX-23R-E
   001828100211       gi48      2     173      S I     Company        fa2/2
                                                       XX-23R-E
    c47d4fed9302       gi48      2     137      S I    Company        fa2/5
                                                       XX-23R-E
switchxxxxxx# show cdp neighbors detail
-------------------------
Device ID: lab-7206
Advertisement version: 2
Entry address(es):
IP address: 172.19.169.83
Platform: company x5660, Capabilities: Router
Interface: Ethernet0, Port ID (outgoing port): gi1/0/0
Time To Live : 123 sec
Version :
Company Network Operating System Software
NOS (tm) x5660 Software (D5660-I-N), Version 18.1(10.4), MAINTENANCE INTERIM
SOFTWARE
Copyright (c) 1986-1997 by company Systems, Inc.
Compiled Mon 07-Apr-97 19:51 by xxdeeert
Duplex: half
-------------------------
Device ID: lab-as5300-1
Entry address(es):
IP address: 172.19.169.87
Platform: company TD6780, Capabilities: Router
Device ID: SEP000427D400ED
Advertisement version: 2
Entry address(es):
IP address: 1.6.1.81
Platform: Company IP Phone x8810, Capabilities: Host
Interface: gi1/0/1, Port ID (outgoing port): Port 1
Time To Live: 150 sec
Version :
P00303020204
Duplex: full
sysName: a-switch
Power drawn: 6.300 Watts
switchxxxxxx# show cdp neighbors secondary
Interface gi1/0/1, Port ID (outgoing port): gi2/0/20
MAC Address: 00:00:01:23:86:9c
Holdtime: 157
Capabilities: Router Switch
VLAN-ID: 10
Platform: 206VXRYC
Device-ID: 00000123869c
Addresses: IP 60.0.0.5, IPv6 2020::2020
nterface gi1/0/2, Port ID (outgoing port): gi2/0/21
MAC Address: 00:00:01:53:86:9c
Holdtime: 163
Capabilities: Router Switch
VLAN-ID: 10
Platform: ABCD-VSD
Device-ID: 00000153869c
Addresses: IP 61.0.0.4
Power Available: 30000
Request-ID: 1
Power management-ID: 234
Management-Power-Level is 0xFFFFFFFF
Interface gi1/0/3, Port ID (outgoing port): gi2/0/25
MAC Address: 00:00:22:23:86:9c
Holdtime: 144
Capabilities: Router Switch
VLAN-ID: 1210
Platform: bbbb
Device-ID: 00002223869c
Addresses: IP 70.0.0.4
4-wire Power-via-MDI (UPOE) TLV:
4-pair PoE Supported: Yes
Spare pair Detection/Classification required: Yes
PD Spare Pair Desired State: Disabled
PSE Spare Pair Operational State: Disabled
Power Available: 154000
Request-ID: 5
Power management-ID: 969
Management-Power-Level is 0xFFFFFFFF
Interface gi1/0/3, Port ID (outgoing port): gi1/0/11
MAC Address: 00:00:01:2c:86:9c
Holdtime: 120
Capabilities: Switch
VLAN-ID: 1005
Platform: CAT-3000
Device-ID: 0000012c869c
Addresses: IP 70.0.0.5

Field Definitions:

  • Advertisement version—The version of CDP being used for CDP advertisements.

  • Capabilities—The device type of the neighbor. This device can be a router, a bridge, a transparent bridge, a source-routing bridge, a switch, a host, an IGMP device, or a repeater.

  • COS for Untrusted Ports—The COS value with which all packets received on an untrusted port should be marked by a simple switching device which cannot itself classify individual packets.

  • Device ID—The name of the neighbor device and either the MAC address or the serial number of this device.

  • Duplex—The duplex state of connection between the current device and the neighbor device.

  • Entry address(es)—A list of network addresses of neighbor devices.

  • Extended Trust—The Extended Trust.

  • External Port-ID—Identifies the physical connector port on which the CDP packet is transmitted. It is used in devices, such as those with optical ports, in which signals from multiple hardware interfaces are multiplexed through a single physical port. It contains the name of the external physical port through which the multiplexed signal is transmitted.

  • Interface—The protocol and port number of the port on the current device.

  • IP Network Prefix—It is used by On Demand Routing (ODR). When transmitted by a hub router, it is a default route (an IP address). When transmitted by a stub router, it is a list of network prefixes of stub networks to which the sending stub router can forward IP packets.

  • Management Address—When present, it contains a list of all the addresses at which the device will accept SNMP messages, including those it will only accept when received on interface(s) other than the one over which the CDP packet is being sent.

  • MTU—The MTU of the interface via which the CDP packet is sent.

  • Native VLAN—The ID number of the VLAN on the neighbor device.

  • Physical Location—A character string indicating the physical location of a connector which is on, or physically connected to, the interface over which the CDP packet containing this TLV is sent.

  • Platform—The product name and number of the neighbor device. In the case of the Secondary Cache only the 8 last characters of the value are printed.

  • Power Available—Every switch interface transmits information in the Power Available TLV, which permits a device which needs power to negotiate and select an appropriate power setting. The Power Available TLV includes four fields.

  • Power Consumption—The maximum amount of power, in milliwatts, expected to be obtained and consumed from the interface over which the CDP packet is sent.

  • Power Drawn—The maximum requested power.

    Note: For IP Phones the value shown is the maximum requested power (6.3 Watts). This value can be different than the actual power supplied by the routing device (generally 5 watts; shown using the show power command).

  • Protocol-Hello—Specifies that a particular protocol has asked CDP to piggyback its "hello" messages within transmitted CDP packets.

  • Remote Port_ID—Identifies the port the CDP packet is sent on

  • sysName—An ASCII string containing the same value as the sending device's sysName MIB object.

  • sysObjectID—The OBJECT-IDENTIFIER value of the sending device's sysObjectID MIB object.

  • Time To Live—The remaining amount of time, in seconds, the current device will hold the CDP advertisement from a transmitting router before discarding it.

  • Version—The software version running on the neighbor device.

  • Voice VLAN-ID—The Voice VLAN-ID.

  • VTP Management Domain—A string that is the name of the collective group of VLANs associated with the neighbor device.

show cdp tlv

To display information about TLVs sent by CDP on all ports or on a specific port, use the show cdp tlv command in Privileged EXEC mode.

Syntax

show cdp tlv [interface-id]

Parameters

interface-id—Port ID.

Default Configuration

TLVs for all ports.

Command Mode

Privileged EXEC mode

User Guidelines

You can use the show cdp tlv command to verify the TLVs configured to be sent in CDP packets. The show cdp tlv command displays information for a single port if specified or for all ports if not specified. Information for a port is displayed if only CDP is really running on the port, i.e. CDP is enabled globally and on the port, which is UP.

Examples

Example 1 - In this example, CDP is disabled and no information is displayed.

switchxxxxxx# show cdp tlv
cdp globally is disabled

Example 2 - In this example, CDP is globally enabled but disabled on the port and no information is displayed.

switchxxxxxx# show cdp tlv gi1/0/2
cdp globally is enabled
Capability Codes: R - Router,T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
P - VoIP Phone,M - Remotely-Managed Device,
C - CAST Phone Port, W - Two-Port MAC Relay
Interface TLV: gi1/0/2
CDP is disabled on gi1/0/2

Example 3 - In this example, CDP is globally enabled and enabled on the port, but the port is down and no information is displayed.

switchxxxxxx# show cdp tlv interface gi1/0/2
cdp globally is enabled
Capability Codes: R - Router,T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
P - VoIP Phone,M - Remotely-Managed Device,
C - CAST Phone Port, W - Two-Port MAC Relay
Interface TLV: gi1/0/3
CDP is enabled on gi1/0/3
Ethernet gi1/0/3 is down

Example 4 - In this example, CDP is globally enabled, and no ports are specified, so information is displayed for all ports on which CDP is enabled who are up.

switchxxxxxx# show cdp tlv interface
cdp globally is enabled
Capability Codes: R - Router,T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
P - VoIP Phone,M - Remotely-Managed Device,
C - CAST Phone Port, W - Two-Port MAC Relay
Interface TLV: gi1/0/1
CDP is enabled
Ethernet gi1/0/1 is up,
Device ID TLV: type is MAC address; Value is 00:11:22:22:33:33:44:44
Address TLV: IPv4:  1.2.2.2 IPv6:
Port_ID TLV: gi1/0/1
Capabilities: S, I
Version TLV: 1 and 2
Platform TLV: VSD Ardd
Native VLAN TLV: 1
Full/Half Duplex TLV: full-duplex
Appliance VLAN_ID TLV: Appliance-ID is 1; VLAN-ID is 100
COS for Untrusted Ports TLV: 1
sysName: a-switch
4-wire Power-via-MDI (UPOE) TLV:
                     4-pair PoE Supported: No
Power Available TLV: Request-ID is 1 Power management-ID is 1;
                                     Available-Power is 15.4;
                                     Management-Power-Level is 0xFFFFFFFF
Interface TLV: gi1/0/2
CDP is disabled on gi1/0/2
Interface TLV: gi1/0/3
CDP is enabled on gi1/0/3
Ethernet gi1/0/3 is down

Example 5 - In this example, CDP is globally enabled and enabled on the PSE PoE port, which is up and information is displayed.

switchxxxxxx# show cdp tlv interface gi1/0/1
cdp globally is enabled
Capability Codes: R - Router,T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
P - VoIP Phone,M - Remotely-Managed Device,
C - CAST Phone Port, W - Two-Port MAC Relay
Interface TLV: gi1/0/1
CDP is enabled
Ethernet gi1/0/1 is up,
Device ID TLV: type is MAC address; Value is 00:11:22:22:33:33:44:44
Address TLV: IPv4:  1.2.2.2 IPv6:
Port_ID TLV: gi1/0/1
Capabilities: S, I
Version TLV: 1 and 2
Platform TLV: VSD Ardd
Native VLAN TLV: 1
Full/Half Duplex TLV: full-duplex
Appliance VLAN_ID TLV: Appliance-ID is 1; VLAN-ID is 100
COS for Untrusted Ports TLV: 1
sysName: a-switch
Power Available TLV: Request-ID is 1 Power management-ID is 1;
                                     Available-Power is 15.4;
                                     Management-Power-Level is 0xFFFFFFFF
4-wire Power-via-MDI (UPOE) TLV:
                     4-pair PoE Supported: Yes
                     Spare pair Detection/Classification required: Yes
                     PD Spare Pair Desired State: Disabled
                     PSE Spare Pair Operational State: Disabled
Request-ID is 1 Power management-ID is 1;
                                     Available-Power is 15.4;
                                     Management-Power-Level is 0xFFFFFFFF

show cdp traffic

To display the CDP counters, including the number of packets sent and received and checksum errors, use the show cdp traffic command in Privileged EXEC mode.

Syntax

show cdp traffic [global | interface-id]

Parameters

  • global—Display only the global counters

  • interaface-id—Port for which counters should be displayed.

Command Mode

Privileged EXEC mode

User Guidelines

Use the command show cdp traffic without parameters to display all the counters.

Use the show cdp traffic global to display only the global counters.

Use the show cdp traffic interface-id command to display the counters of the given port.

Example

switchxxxxxx# show cdp traffic
CDP Global counters:
     Total packets output: 81684,  Input: 81790
     Hdr syntax:  0, Chksum error: 0, Invalid packet: 0
     No memory in main cache: 0, in secondary cache: 0
     CDP version 1 advertisements output:  100,    Input  0
     CDP version 2 advertisements output:  81784,  Input  0
gi1/0/1
     Total packets output: 81684,  Input: 81790
     Hdr syntax:  0, Chksum error: 0, Invalid packet: 0
     No memory in main cache: 0, in secondary cache: 0
     CDP version 1 advertisements output:  100,    Input  0
     CDP version 2 advertisements output:  81784,  Input  0
gi1/0/2
     Total packets output: 81684,  Input: 81790
     Hdr syntax:  0, Chksum error: 0, Invalid packet: 0
     No memory in main cache: 0, in secondary cache: 0
     CDP version 1 advertisements output:  100,    Input  0
     CDP version 2 advertisements output:  81784,  Input  0

Field Definition:

  • Total packets output—The number of CDP advertisements sent by the local device. Note that this value is the sum of the CDP Version 1 advertisements output and CDP Version 2 advertisements output fields.

  • Input—The number of CDP advertisements received by the local device. Note that this value is the sum of the CDP Version 1 advertisements input and CDP Version 2 advertisements input fields.

  • Hdr syntax—The number of CDP advertisements with bad headers, received by the local device.

  • Chksum error—The number of times the checksum (verifying) operation failed on incoming CDP advertisements.

  • No memory—The number of times the local device did not have enough memory to store the CDP advertisements in the advertisement cache table when the device was attempting to assemble advertisement packets for transmission and parse them when receiving them.

  • Invalid—The number of invalid CDP advertisements received.

  • CDP version 1 advertisements output — The number of CDP Version 1 advertisements sent by the local device.

  • CDP version 1 advertisements Input—The number of CDP Version 1 advertisements received by the local device.

  • CDP version 2 advertisements output—The number of CDP Version 2 advertisements sent by the local device.

  • CDP version 2 advertisements Input—The number of CDP Version 2 advertisements received by the local device.