LLDP and CDP neighbor data

With both LLDP and (read-only) CDP enabled on a switch port, the port can read both LLDP and CDP advertisements, and stores the data from both types of advertisements in its neighbor database. (The switch stores only CDP data that has a corresponding field in the LLDP neighbor database.) The neighbor database itself can be read by either LLDP or CDP methods or by using the show lldp commands. Take note of the following rules and conditions:

  • If the switch receives both LLDP and CDP advertisements on the same port from the same neighbor, the switch stores this information as two separate entries if the advertisements have different chassis ID and port ID information.

  • If the chassis and port ID information are the same, the switch stores this information as a single entry. That is, LLDP data overwrites the corresponding CDP data in the neighbor database if the chassis and port ID information in the LLDP and CDP advertisements received from the same device is the same.

  • Data read from a CDP packet does not support some LLDP fields, such as "System Descr," "SystemCapSupported," and "ChassisType." For such fields, LLDP assigns relevant default values. Also:
    • The LLDP "System Descr" field maps to CDP's "Version" and "Platform" fields.

    • The switch assigns "ChassisType" and "PortType" fields as "local" for both the LLDP and the CDP advertisements it receives.

    • Both LLDP and CDP support the "System Capability" TLV. However, LLDP differentiates between what a device is capable of supporting and what it is actually supporting, and separates the two types of information into subelements of the System Capability TLV. CDP has only a single field for this data. Thus, when CDP System Capability data is mapped to LLDP, the same value appears in both LLDP System Capability fields.

    • System Name and Port Descr are not communicated by CDP, and thus are not included in the switch's Neighbors database.

NOTE:

Because switches do not generate CDP packets, they are not represented in the CDP data collected by any neighbor devices running CDP.

A switch with CDP disabled forwards the CDP packets it receives from other devices, but does not store the CDP information from these packets in its own MIB.

LLDP data transmission/collection and CDP data collection are both enabled in the switch's default configuration. In this state, an SNMP network management application designed to discover devices running either CDP or LLDP can retrieve neighbor information from the switch regardless of whether LLDP or CDP is used to collect the device-specific information.

Protocol state

Packet generation

Inbound data management

Inbound packet forwarding

CDP Enabled

N/A

Store inbound CDP data.

No forwarding of inbound CDP packets.

CDP Disabled

N/A

No storage of CDP data from neighbor devices.

Floods inbound CDP packets from connected devices to outbound ports.

LLDP Enabled1

Generates and transmits LLDP packets out all ports on the switch.

Store inbound LLDP data.

No forwarding of inbound LLDP packets.

LLDP Disabled

No packet generation.

No storage of LLDP data from neighbor devices.

No forwarding of inbound LLDP packets.