CDP & LLDP
Cisco Discovery Protocol (CDP)
Section titled “Cisco Discovery Protocol (CDP)”CDP is a Layer 2, media- and protocol-independent protocol used by Cisco devices to advertise and discover directly connected neighbors. It operates over interfaces that support SNAP headers and is enabled by default on most Cisco platforms.
Key Points
Section titled “Key Points”- Devices send CDP advertisements every 60 seconds to the multicast MAC address
01:00:0C:CC:CC:CC. - Each advertisement includes a Time-To-Live (TTL) value, indicating how long the information should be retained.
- CDP never forwards packets beyond the local segment.
- CDP supports TLVs (Type-Length-Value structures) to carry various device information.
- CDP is Cisco proprietary. Use LLDP for multi-vendor environments.
CDP Configuration
Section titled “CDP Configuration”! Enable CDP globallycdp run
! Disable CDP on a specific interfaceinterface Ethernet1/1 no cdp enable
! Adjust advertisement interval and hold time (in seconds)cdp timer 5cdp holdtime 10
! Disable version 2 advertisement extensionsno cdp advertise-v2
! Define a TLV filter group (use '?' to view available TLVs)cdp tlv-list GROUP_1 ?
! Apply TLV filter to restrict CDP advertisementscdp filter-tlv-list GROUP_1
! Apply TLV filter to a specific interfaceinterface Ethernet1/1 cdp filter-tlv-list GROUP_1Link Layer Discovery Protocol (LLDP)
Section titled “Link Layer Discovery Protocol (LLDP)”LLDP is the IEEE standard (802.1AB) for Layer 2 device discovery. It functions similarly to CDP but is supported across multi-vendor environments. It also uses TLVs for information exchange.
Key Points
Section titled “Key Points”- LLDP is not enabled by default on some platforms — you must enable it globally and per interface.
- LLDP advertisements include a TTL and are multicast locally on each supported interface.
- LLDP supports selective TLV advertisement using
tlv-select.
LLDP Configuration
Section titled “LLDP Configuration”! Enable LLDP globallylldp run
! Disable LLDP on a specific interfaceinterface Ethernet1/1 no lldp enable
! Adjust advertisement interval and hold time (in seconds)lldp timer 5lldp holdtime 10
! View or restrict TLVs from being advertisedno lldp tlv-select ?
! Disable specific TLVs on an interfaceinterface Ethernet1/1 no lldp tlv-select ?