1.1.b Layer 2 protocols

1.1.b i CDP, LLDP

This should be another slam-dunk topic. CDP is pretty straightforward. It has to be running globally and on individual interfaces.

SW1: CDP Not enabled.

conf t
cdp run
inter gig 1/0/1
cdp enable

One more thing worth mentioning is that you can customize your TLV (type-length-value) lists that are sent with CDP. An example might be if we want to create a physical address entry and include it with CDP.
conf t
location civic-location identifier host
city Scranton
state PA
cdp tlv-list TLV_LIST
location
cdp filter-tlv-list TLV_LIST !This enables the TLV List on all interfaces. Optionally we could have applied it at the interface level.

Reference: Understanding and Configuring CDP

Let’s have a little more fun with LLDP. We’ll tweak the settings a little bit. We can set an interface to send only or receive only if we want to. Doing a show lldp gives us some options we can alter.

An obscure task could be, “Setup Router1 to receive LLDP updates on gig 0/0, but not send LLDP updates. Received updates should be stored for five minutes before discarding. Router 2 should wait 5 seconds before initializing LLDP. Updates should be sent every 60 seconds.”

Router1
conf t
lldp run
lldp holdtime 300
interface gig 0/0/0
no lldp transmit
(Transmit and Receive are enabled by default, so we’ll need to disable transmit to accomplish the task.)

Router2
conf t
lldp run
lldp reinit 5
lldp timer 60

Reference: Configuring LLDP and LLDP-MED

1.1.b ii UDLD

We talked about UDLD a bit in the STP post. It serves the same basic purpose as Loop Guard, which is to prevent an issue where a link can only transmit and not receive (or vice-versa, depending on your perspective). There are two modes, Normal and Aggressive. Normal mode doesn’t err-disable the link when it triggers.

Task: Enable UDLD on all fiber ports so that unidirectional link failure puts the port in err-disabled state:
conf t
udld aggressive

Task: Enable UDLD on interface Gig0/0/0 so that any link failure will not err-disable the link.
conf t
int gi0/0/0
udld port

We can view the port states with show udld.

Reference: Understanding and Configuring the Unidirectional Link Detection Protocol Feature

Published by Gregory Leeson

(CCIE Security, #60398). A Cisco networking nut.

Leave a comment