CDP & LLDP Flashcards
What is CDP ?
CDP is a Cisco proprietary protocol for Layer 2 discovery. It’s enabled on Cisco devices by default. It shares hostname, ip address, device type, etc.
What is LLDP ?
CDP is an industry standard protocol (802.1ab) for Layer 2 discovery. It shares hostname, ip address, device type, etc.
How are CDP messages sent ?
Multicast MAC address 0100.0ccc.ccc
The message is processed by the recieving deviced then discarded, not forwarded so devices can only become neighbors with devices directly connected. They are sent every 60 seconds. By default the CDP holdtime is 180 seconds so if another message isn’t recieved in that time the neighbor is removed from the CDP table. Today only CDPv2 is used.
How to disable CDP ?
globally:
R1(config)# no cdp run
on an interface:
R1(config-if)# no cdp enable
How to set CDP/LLDP timer and holdtime ?
R1(config)# [cdp | lldp] timer [seconds]
R1(config)# [cdp | lldp] holdtime [seconds]
Can you run CDP and LLDP at trhe same time ?
Yes
How are LLDP messages sent?
LLDP is disabled by default so it must be enabled globally then on each interface.
R1(config)# lldp run
R1(config-if)# lldp transmit
R1(config-if)# lldp recieve
They are sent to multicast MAC address 0180.c200.000e
The message is processed by the recieving deviced then discarded, not forwarded so devices can only become neighbors with devices directly connected. They are sent every 30 seconds. By default the LLDP holdtime is 120 seconds so if another message isn’t recieved in that time the neighbor is removed from the LLDP table.
CDP & LDP commands to view information
R1# show [cdp | lldp]
Shows basic info (timers, version, etc)
R1# show [cdp | lldp] traffic
Shows how many messages have been sent/recieved
R1# show [cdp | lldp] interface
Displays which interfaces its enabled on
R1# show [cdp | lldp] neighbors
Lists neighbors and basic ifo about neighbors
R1# show [cdp | lldp] neighbors detail
Lists more detailed info about neighbors
R1# show [cdp | lldp] entry [name]
Displays specific info for a specific neighbor