Day 36 Slides - CDP & LLDP
Day 36 Slides - CDP & LLDP
●
Cisco Discovery Protocol (CDP)
●
Link Layer Discovery Protocol (LLDP)
Layer 2 Discovery Protocols
●
Layer 2 discovery protocols such as CDP and LLDP share information with and discover
information about neighboring (connected) devices.
●
The shared information includes host name, IP address, device type, etc.
●
CDP is a Cisco proprietary protocol.
●
LLDP is an industry standard protocol (IEEE 802.1AB).
●
Because they share information about the devices in the network, they can be considered a
security risk and are often not used. It is up to the network engineer/admin to decide if they
want to use them in the network or not. Hi, I’m R1. I’m a router.
You’re connected to my G0/1 interface.
My IP address on this interface is 10.0.0.1.
...
R1 SW1
●
When a device receives a CDP message, it processes and discards the message. It does
NOT forward it to other devices.
●
By default, CDP messages are sent once every 60 seconds.
●
By default, the CDP holdtime is 180 seconds. If a message isn’t received from a neighbor for
180 seconds, the neighbor is removed from the CDP neighbor table.
●
CDPv2 messages are sent by default.
Cisco Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
Cisco Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
Cisco Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
Cisco Discovery Protocol
Cisco Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
CDP show commands summary
● R1# show cdp
→shows basic information about CDP (timers, version)
● R1# show cdp traffic
→displays how many CDP messages have been sent and received
● R1# show cdp interface
→displays which interfaces CDP is enabled on
● R1# show cdp neighbors
→lists CDP neighbors and some basic information about each neighbor
● R1# show cdp neighbors detail
→lists each CDP neighbor with more detailed information
● R1# show cdp entry name
→displays the same info as above, but for the specified neighbor only
CDP Configuration Commands
●
CDP is globally enabled by default.
●
CDP is also enabled on each interface by default.
●
To enable/disable CDP globally: R1(config)# [no] cdp run
●
To enable/disable CDP on specific interfaces: R1(config-if)# [no] cdp enable
●
Configure the CDP timer: R1(config)# cdp timer seconds
●
Configure the CDP holdtime: R1(config)# cdp holdtime seconds
●
Enable/disable CDPv2: R1(config)# [no] cdp advertise-v2
Link Layer Discovery Protocol
●
LLDP is an industry standard protocol (IEEE 802.1AB).
●
It is usually disabled on Cisco devices by default, so it must be manually enabled.
●
A device can run CDP and LLDP at the same time.
●
When a device receives an LLDP message, it processes and discards the message. It does
NOT forward it to other devices.
●
By default, LLDP messages are sent once every 30 seconds.
●
By default, the LLDP holdtime is 120 seconds.
●
LLDP has an additional timer called the ‘reinitialization delay’. If LLDP is enabled (globally or
on an interface), this timer will delay the actual initialization of LLDP. 2 seconds by default.
LLDP Configuration Commands
●
LLDP is usually globally disabled by default.
●
LLDP is also disabled on each interface by default.
●
To enable LLDP globally: R1(config)# lldp run
●
To enable LLDP on specific interfaces (tx): R1(config-if)# lldp transmit
●
To enable LLDP on specific a interface (rx): R1(config-if)# lldp receive
●
Configure the LLDP timer: R1(config)# lldp timer seconds
●
Configure the LLDP holdtime: R1(config)# lldp holdtime seconds
●
Configure the LLDP reinit timer: R1(config)# lldp reinit seconds
Link Layer Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
Link Layer Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
Link Layer Discovery Protocol
Link Layer Discovery Protocol
R1 R2
10.0.0.0/30
.1 .2
G0/1 G0/0
G0/0 .254 G0/1 .254
G0/0 192.168.1.0/24 G0/0 192.168.2.0/24
SW1 SW2
LLDP show commands summary
● R1# show lldp
→shows basic information about LLDP (timers, version)
● R1# show lldp traffic
→displays how many LLDP messages have been sent and received
● R1# show lldp interface
→displays which interfaces LLDP tx/rx is enabled on
● R1# show lldp neighbors
→lists LLDP neighbors and some basic information about each neighbor
● R1# show lldp neighbors detail
→lists each LLDP neighbor with more detailed information
● R1# show lldp entry name
→displays the same info as above, but for the specified neighbor only
Wireshark Captures
Wireshark Captures
Things we’ll cover
●
Intro to Layer 2 discovery protocols
●
Cisco Discovery Protocol (CDP)
●
Link Layer Discovery Protocol (LLDP)
Quiz 1
Which of the following commands show the configured CDP timers? (select two)
a) R1#show cdp
c) R1(config-if)#cdp enable
d) R1(config)#cdp timer 60
Quiz 3
You issue the show lldp entry SW1 command on R1. R1’s neighbor SW1 is a multilayer
switch. What do you expect to see in the ‘system capabilities’ field of the output?
a) System Capabilities: B
c) System Capabilities: S
a) G0/0
b) G0/1
c) G0/2
d) G0/3
Supplementary Materials
●
Review flash cards
(link in the description)
●
Packet Tracer lab
JCNP-Level Channel Members