The CDP and LLDP protocols are Level 2 network discovery protocols.
They allow active equipment to warn its directly connected neighbors of its existence.
Our equipment that uses one of these two protocols will send a message of this type on all these interfaces:
I said, "Hello! My name is switch-01! I own IP addresses 192.168.0.254 and 192.168.1.254. I'm a Cisco 2950 switch, my IOS is in 12.4, my VTP domain is VTP-EDF, my native VLAN is the VLAN 3 and I'm administerable via IP 10.10.10.1. We are interconnected via my GigabithEthernet 0/1 port. Have a good day!"
This message will be sent every 60 seconds!
If a piece of equipment receives this type of message and uses this protocol, it will keep this information in memory.
CDP (Cisco Discovery Protocol).
– Owner Cisco
– enabled by default on Cisco equipment
– CDP message sent every 60 seconds
LLDP (Link Layer Discovery Protocol)
– standardized protocol IEEE 802.AB
– deactivated by default on Cisco equipment
Setting up the CDP protocol
Activate the CDP protocol:
switch cdp run
Turn off the CDP protocol:
switch no cdp run
The following commands are used to check the status of this protocol:
switch show cdp Global CDP information: Sending CDP packets every 60 seconds< Envoi toute les 60s ces infos envoi="" toute="" les="" 60s="" ces=""></ Envoi toute les 60s ces infos> Sending a holdtime value of 180 seconds< Ces infos sont valide 180s ces="" infos="" sont="" valide=""></ Ces infos sont valide 180s> Sending CDPv2 advertisements is enabled
Switch show cdp interface fastethernet 0/1 FastEthernet0/1 is up, line protocol is up ARPA encapsulation Sending CDP packets every 60 seconds Holdtime is 180 seconds
Switch show cdp traffic CDP counters: Total packets output: 304, Input: 305 Hdr syntax: 0, Chksum error: 0, Encaps failed: 0 No memory: 0, Invalid packet: 0, CDP version 1 advertisements output: 0, Input: 0 CDP version 2 advertisements output: 304, Input: 305
Information learned by the CDP protocol
When the CDP protocol is activated, it sends the following information about all these ports:
– Device ID: The hostname of equipment
– Entry address: IP addresses present on the team
– Platform: The equipment model
– Capabilities: Type of equipment (switch/router)
– Interface: Physical interface where this equipment is plugged in
– Port ID: Physical interface of the interconnection on the equipment in question
– Version: Version of IOS
– Advertisement version: Version of the CDP protocol
– VTP Management Domain: VTP Domain
– Native VLAN:VLAN native (by default, any port is in access mode and is part of this famous VLAN)
– Management address: IP management address
Some orders to check the information learned:
This order will allow us to know in summary the information collected via the CDP protocol.
switch show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Bridge Road Source S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, D - Remote, C - CVTA, M - Two-port Mac Relay Device ID Local Intrfce Holdtme Capability Platform Port ID SWITCH1 Gig 0/2 170 S I WS-C2960- Gig 0/1 ROUTEUR1 Fas 0/13 136 R S I CISCO2901 Gig 0/1
This order will allow us to know in detail the information collected via the CDP protocol.
switch show cdp neighbors detail Device ID: SWITCH1 Entry address: IP address: 172.16.1.1 Platform: cisco WS-C2960-24TT-L, Capabilities: Switch IGMP Interface: GigabitEthernet0/2, Port ID (outgoing port): GigabitEthernet0/1 Holdtime: 161 sec version: Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(1)SE3, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Wed 30-May-12 14:26 by prod-rel-team advertisement version: 2 Hello Protocol: YES-0x00000C, Protocol ID-0x0112; payload len-27, value-0000000FFFFFF010221FF00000000000183339D7B0E80FF00000 VTP Management Domain: '' Native VLAN: 1 Duplex: full Management address: IP address: 172.16.1.1 Device ID: ROUTEUR1 Etc.....
This order will allow us to know in detail the information collected via the CDP protocol for specific equipment.
switch show cdp entry SWITCH1
LLDP, TLV, LLDP-MED, LLDPDU … Lots of complicated words for not much 🙂 So we're going to try to clear that up. 🙂
LLDP is protocol! It sends LLDPDU frames to communicate.
In the LLDPDU, we find TLVs (Type – Length – Value).
TLVs contain information (Chassis ID, Port ID, TTL TLV and many others)
LLDP-MED (LLDP – Media End Point ) is an extension of the LLDP protocol.
The LLDP-MED was created to obtain more information on terminal equipment (PoE, VOIP, etc. … )
The CDP protocol was created before there was a standardized protocol. LLDP was very much inspired by the CDP protocol. At the control line level, just put "LLDP" instead of "CDP."
Turn it on with the command:
Switch lldp run
Personally, I've never used it. For your CCNA exam, just know the structure of the LLDP. If you want more details, I invite you to look at the official CISCO documentation below:
These protocols give far too much information about our equipment.
From a security point of view, IT MUST THE DISON.
Hoping this article has been helpful to you!
Don't hesitate to let me know!!