Hands-On Lab: Configuring UDLD

This hands-on lab configures UDLD in aggressive mode on a fiber link between two switches, simulating a unidirectional fiber failure and verifying UDLD detects the mismatch and shuts down the affected port before a Layer 2 loop can form.

UDLD Aggressive ModeUnidirectional Fiber DetectionErr-Disable from UDLD

~3 min read · Updated Sep 23, 2026

Lab Objective

Enable UDLD in aggressive mode on a fiber link between two switches, simulate a unidirectional fiber failure where only one strand fails, and verify UDLD detects the mismatch and places the affected port into err-disabled state.

Lab Purpose

Loop Guard, covered in the previous lab, protects against a unidirectional failure by relying on the absence of BPDUs. UDLD takes a more direct approach, specifically designed for fiber links where a single strand can fail while the other keeps working, causing traffic to flow in only one direction — a scenario Ethernet's normal link-state detection cannot see at all, since the physical link layer still reports up.

Lab Topology

Switch1 ---- Gi1/0/10 (fiber) ---- Gi1/0/10 ---- Switch2

Fiber link uses separate TX/RX strands,
allowing a single-strand failure to occur
independently of the other direction

Task 1: Enable UDLD Aggressive Mode on Both Switches

Configure UDLD aggressive mode on the fiber interface on both switches.

Task 2: Verify Normal UDLD Operation

Confirm both switches report the link as bidirectional and healthy.

Task 3: Simulate a Unidirectional Fiber Failure

Simulate one strand failing (traffic can only flow Switch1 to Switch2, not the reverse), which Ethernet's normal link-state detection would not notice.

Task 4: Verify UDLD Detects the Failure

Confirm UDLD aggressive mode detects the unidirectional condition and shuts down the affected port.

Task 5: Verify the Port Status

Confirm the port shows err-disabled specifically due to UDLD, distinct from other err-disable causes covered in earlier labs.

Solution and Verification

Switch1(config)# interface gigabitethernet1/0/10
Switch1(config-if)# udld port aggressive

Switch2(config)# interface gigabitethernet1/0/10
Switch2(config-if)# udld port aggressive

Switch1# show udld gigabitethernet1/0/10

Interface Gi1/0/10
---
Port enable administrative configuration setting: Enabled / in aggressive mode
Current bidirectional state: Bidirectional
Neighbor state: Bidirectional
-- Normal, healthy state before the
-- simulated failure

-- Simulated: one fiber strand fails,
-- Switch2 can still send to Switch1, but
-- Switch1's transmissions never reach
-- Switch2 (or vice versa, depending on
-- which strand failed)

-- Notably, the interface itself would
-- normally still show "up/up" from a basic
-- link-state perspective, since fiber
-- optics can maintain a light signal on
-- one strand even if the other has failed

Switch1# show udld gigabitethernet1/0/10

Interface Gi1/0/10
---
Current bidirectional state: Unidirectional
-- UDLD's periodic hello exchange detected
-- that its own hellos are not being
-- acknowledged back by the neighbor,
-- something plain link-state monitoring
-- could never reveal on its own

Switch1# show interfaces gigabitethernet1/0/10 status

Gi1/0/10   err-disabled

Switch1# show interfaces gigabitethernet1/0/10 | include err-disable

Interface Gi1/0/10 is down (UDLD Port Disabled)
-- Confirms this specific err-disabled state
-- was caused by UDLD, distinct from the
-- port security or BPDU Guard err-disable
-- causes covered in earlier labs

Key Takeaway

UDLD aggressive mode solves a blind spot that neither basic Ethernet link-state detection nor Spanning Tree can address on their own: a fiber link that appears physically up and even passes some traffic, but is genuinely broken in one direction — a failure mode that could otherwise allow a Layer 2 loop to form silently, or cause intermittent, hard-to-diagnose connectivity issues depending on which direction of traffic happens to be affected.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring Loop Guard

This hands-on lab configures Loop Guard on a switch's non-designated ports to prevent a unidirectional link failure from causing a Layer 2 loop, simulating a one-way BPDU loss and verifying the affected port enters a loop-inconsistent blocking state rather than incorrectly transitioning to forwarding.

Continue

Hands-On Lab: Configuring BPDU Guard and BPDU Filter

This hands-on lab configures BPDU Guard globally for PortFast-enabled ports and demonstrates the distinct, riskier behavior of BPDU Filter, comparing how each responds when a switch is connected to an access port that should only ever see end-user devices.

Continue

Hands-On Lab: Configuring Root Guard

This hands-on lab configures Root Guard on switch ports facing access-layer switches to prevent an unauthorized or misconfigured switch from becoming the Spanning Tree root, verifying the port enters a root-inconsistent state when a superior BPDU is received.

Continue

Hands-On Lab: Comprehensive Troubleshooting Challenge

This hands-on lab presents a multi-layer connectivity failure across VLANs, trunking, routing, and NAT simultaneously, requiring systematic bottom-up troubleshooting to identify and correct three independent faults before full connectivity is restored.

Continue

Hands-On Lab: Configuring Enhanced Object Tracking with HSRP

This hands-on lab configures IP SLA-based object tracking on an HSRP-enabled router, automatically lowering its priority when its WAN uplink fails, forcing failover to the standby router without requiring a full interface shutdown.

Continue

Hands-On Lab: Configuring Basic DMVPN (mGRE with NHRP)

This hands-on lab configures a basic single-hub DMVPN topology using a multipoint GRE tunnel and NHRP, demonstrating how a spoke dynamically registers its physical address with the hub without requiring a separate point-to-point tunnel per spoke.

Continue