Cisco Discovery Protocol (CDP)
CDP is a Cisco proprietary Layer 2 protocol used to share information with other directly connected Cisco equipment, such as OS version and IP address. It allows administrators to map out how Cisco devices are connected to each other, and is a protocol that is enabled by default.
Note
Because it works at Data-Link Layer, it is not necessary for the device to have an IP address.
It allows us to use commands such as show CDP neighbor to see the devices detected at Layer 2 that are plugged in to that device. That is to say, it does not necessarily include a next-hop map.
CDP Commands
Device(config)# cdp run
Device(config)# no cdp run
Device(config-if)# no cdp enable
Device# show cdp
Device# show cdp neighbors
Device# show cdp neighbors detailLink Layer Discovery Protocol
LLDP is an open standard protocol that provides similar information to Cisco Discovery Protocol (CDP) (it is also significantly newer). The main differences with CDP are:
- It may be disabled by default depending on the switch version
- It is only supported on physical interfaces
- It can only discover up to one device per port
- It can discover Linux servers
LLDP Commands
Device(config)# lldp run
Device(config)# no lldp run
Device(config-if)# no lldp transmit
Device(config-if)# no lldp receive
Device# show lldp
Device# show lldp neighbors
Device# show lldp neighbors detail