USD ($)
$
United States Dollar
India Rupee

What is CDP and LLDP? Easy Configuration Guide

Created by Deepak Sharma in CCNA 4 Nov 2024
Share
«Router on a Stick Configuration: ...

CDP (Cisco Discovery Protocol) and LLDP (Link Layer Discovery Protocol) are both network protocols used for discovering devices on a local network. CDP is Cisco-specific, providing information about directly connected Cisco devices, while LLDP is an open standard that works across various vendors, allowing for broader compatibility in multi-vendor environments.

In this article, we are going to discuss about CDP and LLDP. We will also look at steps to configure CDP and LLDP on Cisco devices and then verify their configuration. Learning about CDP and LLDP is an important task if preparing for any Cisco certification

What is Cisco Discovery Protocol (CDP)?

CDP is a Cisco proprietary protocol specifically used for Cisco devices to discover other connected Cisco devices in the network infrastructure. CDP operates at the data link layer of the OSI model and runs on Cisco devices by default.

It enables devices to discover neighboring Cisco devices directly connected to their interfaces. CDP exchanges information such as device IDs, IP addresses, interface details, platform information, and capabilities. CDP messages are periodically exchanged between the connected devices to maintain the CDP neighbor table. 

CCNA Live TrainingJoin live class for CCNA training.Explore course
custom banner static image

What is Link Layer Discovery Protocol (LLDP)?

LLDP is a vendor-neutral and standardized protocol defined by the IEEE 802.1AB standard. Similar to CDP, LLDP operates at the data link layer and provides a mechanism for discovering neighboring devices. LLDP can be used on a wide range of network devices, regardless of the vendor.

It allows devices to exchange information such as system and port identifiers, port descriptions, capabilities, and management addresses. LLDP is often used in multi-vendor environments, enabling devices from different manufacturers to discover and communicate with each other.

Both CDP and LLDP provide benefits such as network discovery, inventory management, and troubleshooting. They help network administrators gather information about the network topology, identify connected devices, and ensure proper configuration and compatibility.

By utilizing these protocols, administrators can gain visibility into their networks and facilitate effective network management and troubleshooting tasks.

Difference Between CDP and LLDP

Let's quickly check the CDP and LLDP differences. The table below shows key differences between CDP and LLDP highlighting their functionalities, usage scenarios, and configurations.

FeatureCDP (Cisco Discovery Protocol)LLDP (Link Layer Discovery Protocol)
Vendor SpecificityCisco proprietaryOpen standard, vendor-neutral
PurposeDiscovers Cisco devices and their capabilitiesDiscovers devices across different vendors
Information SharedDevice ID, IP address, capabilitiesDevice ID, port description, VLAN information
LayerOperates at Layer 2Operates at Layer 2
UsagePrimarily in Cisco environmentsUsed in multi-vendor environments
ConfigurationEnabled by default on Cisco devicesRequires manual configuration on devices
Security FeaturesLimited security featuresCan include security features like authentication

Topology Diagram

banner image

How to Configure CDP and LLDP in Cisco Devices

Let's look at the steps for CDP and LLDP configuration on Cisco devices. To practice these steps visit our CCNA virtual lab

Tasks

● Login to SW02, and confirm that Cisco Discovery Protocol (CDP) is globally enabled.

 ✓ if it is not enabled then enable it globally

● CDP should send its advertisement messages every 45 seconds and hold time to 135 seconds.

● Disable CDP on SW02 interfaces (E0/3 and E1/0) which are connecting to SW04 interfaces (E0/0 and E1/0)

● Enable Link Layer Discovery Protocol (LLDP) on SW02 and SW04 so that both switches can see each other as LLDP neighbors on both of their connected interfaces.

● Verify that R01, R02 and SW03 are the CDP neighbors of SW02 and SW04 is the LLDP neighbor of SW02.

Configuration and Verifications

SW02:

banner image

As you can see in the above output, CDP is enabled globally using the command "cdp run". The current cdp version is 2 and the frequency of sending cdp packets is 60 seconds with a hold time is 180 seconds. 

Note: "cdp run" is a hidden command so can be seen using "show run all" 

As per the task, cdp advertisements should be sent at 45 second intervals and holdtime should be 135 seconds. Also, disable CDP on SW02 interfaces (E0/3 and E1/0). Also, enable LLDP on SW02 and SW04.

!

configure terminal

!

cdp timer 45

cdp holdtime 135

!

lldp run

!

interface range E0/3, E1/0

 no cdp enable

!

end

!

write

!

banner image

SW04:

!

configure terminal

!

lldp run

!

interface range E0/0, E1/0

 no cdp enable

!

end

!

write

!

banner image

Verify the cdp neighbors of SW02 and lldp neighbors of SW04, cdp advertisement time has also changed to 45 seconds. It is also clearly seen in the output below that SW02 has SW03, R02 and R01 are the cdp neighbors and SW04 has only SW02 as lldp neighbor.

SW02:

banner image

SW04:

banner image

CCDP and LLDP Configurations - Summing Up!

In summary, CDP (Cisco Discovery Protocol) and LLDP (Link Layer Discovery Protocol) are essential for network device discovery. Both protocols share similar functionalities, but CDP is Cisco-specific while LLDP is vendor-neutral.

Configuring these protocols enhances network management by providing device information, improving troubleshooting, and ensuring efficient communication across diverse environments.

Understanding their differences and needs is crucial for effective network design and maintenance, especially in multi-vendor setups where LLDP's compatibility offers significant advantages. To learn more such concepts check out our IT infrastructure courses.

Cisco Port Channel Configuration: Steps»
Deepak Sharma

He is a senior solution network architect and currently working with one of the largest financial company. He has an impressive academic and training background. He has completed his B.Tech and MBA, which makes him both technically and managerial proficient. He has also completed more than 450 online and offline training courses, both in India and ...

More... | Author`s Bog | Book a Meeting

Related Articles

#Explore latest news and articles

CCNA Course Syllabus: Topics Explained 11 Nov 2024

CCNA Course Syllabus: Topics Explained

Examine the latest Cisco CCNA course syllabus and understand the details of each 200-301 exam topics with practical on lab devices. Start Now!
Cisco: Configure Trunk Port & Native VLAN 30 Aug 2024

Cisco: Configure Trunk Port & Native VLAN

Learn Cisco, configure trunk ports on switches including native VLAN and configure access port for Voice and Data VLANs.
4 Basic Ethernet Cable Troubleshooting and Easy Fixes 9 Nov 2024

4 Basic Ethernet Cable Troubleshooting and Easy Fixes

Explore techniques for network cabling troubleshooting, focusing on common Ethernet cable issues and methods to troubleshoot Ethernet ports.

FAQ

CDP and LLDP are used for discovering and sharing information about directly connected network devices, enabling efficient network management and troubleshooting.
LLDP can include security features like authentication, making it potentially more secure than CDP, which has limited security features.
Yes, you can run LLDP and CDP simultaneously on Cisco devices, as they operate independently and provide complementary information about connected devices.
CDP configuration involves enabling Cisco Discovery Protocol on a device to discover neighboring Cisco devices and gather information such as device capabilities and IP addresses. This is typically done using the command cdp run in global configuration mode.

Comments (0)

Share

Share this post with others

Contact learning advisor

Captcha image
Cisco SD-WAN Training – Starts Nov 23rd at 10 AM IST
Cisco SD-WAN Training – Starts Nov 23rd at 10 AM IST
Boost Your Networking Career with Expert-Led Cisco SD-WAN Training with Lab Access.
Day
Hr
Min
Sec
Register Now