Table of Contents Link to heading
- Discovery Protocol
- Cisco Discovery Protocol (CDP)
- Link Layer Discovery Protocol (LLDP)
- Main Differences
Discovery Protocol Link to heading
Neighbouring information shows the ID/IP address of devices, types of devices connected, the router interfaces they are connected to, the interfaces used to make the connections, and the model numbers of the devices.
Two systems can learn about each other, even if they are using different network layer protocols.
Cisco Discovery Protocol (CDP) Link to heading
To enable CDP globally on the router (enabled by default):
Router(config)# cdp run
To enable CDP on an interface:
Router(config-if)# cdp enable
Obtaining Information with CDP Link to heading
- The primary use of CDP is to discover all Cisco devices that are directly connected to a local device.
- A CDP frame can be small, yet can retrieve many useful information about neighbouring routers and switches.
Router# show cdp entry device_name
Showing CDP Neighbours Link to heading
- CDP provides information about each CDP neighbour device by transmitting Type Length Values (TLVs).
- TLVs are blocks of information embedded in CDP advertisements.
- CDP advertisements are periodic messages that are sent and received on each of its active interfaces.
Router# show cdp neighbors [detail]
Information included in a device TLV include:
- Device ID
- Local Interface
- Holdtime
- Capability
- Platform
- Port ID
- VTP Management Domain Name (CDPv2 only)
- Native VLAN (CDPv2 only)
- Full/Half-Duplex (CDPv2 only)
To obtain CDP information about a device that is not directly connected, the administrator needs to telnet to a router that is directly connected to that device.
This example shows the benefit of exploring CDP as it helps to gain full knowledge about the devices that are on the network, which provides a better understanding of the physical topology.
Disabling and Troubleshooting CDP Link to heading
Sometimes, it might be helpful to disable CDP for security purposes when you do not want information made available about a particular device.
Cisco IOS Command | Description |
---|---|
clear cdp table | Deletes the CDP table of information about neighbours |
clear cdp counters | Resets the traffic counters to zero |
show cdp traffic | Displays CDP counters, including the number of packets sent and received and checksum errors |
show debugging | Displays information about the types of debugging that are enabled for your router |
debug cdp adjacency | Displays information about CDP neighbours |
debug cdp events | Displays information about CDP events |
debug cdp ip | Displays information about CDP IP information |
debug cdp packets | Displays information about CDP packet-related information |
cdp timers | Specifies how often Cisco IOS Software sends CDP updates |
cdp holdtime | Specifies the holdtime the receiving device should hold a CDP packet from your router before discarding |
show cdp | Displays information about CDP update packets |
Link Layer Discovery Protocol (LLDP) Link to heading
LLDP is a more powerful and flexible protocol than CDP:
- Simplifies network management and troubleshooting in a multi-vendor environment.
- Supports optional system name, description, and management address.
- Has an extension called LLDP-MED that provides support for voice over IP (VoIP) applications.
Main Differences Link to heading
- CDP is a proprietary protocol, whereas LLDP is a open-standard protocol.
- CDP is enabled on an interface using two commands, whereas LLDP requires only one command.
- CDP is always enabled by default on Cisco routers and switches, but with LLDP, it depends on the switch and version, whether it will be enabled or disabled by default.
- CDP can gather information from routers, switches, and wireless APs, whereas LLDP can only gather information from routers and switches.
- CDP can obtain both Layer 2 and Layer 3 information, whereas LLDP can only obtain Layer 2 information.