Another Security Blog

A place to show my mad skills

TidBits Walkthroughs Resources Projects View on GitHub
28 May 2025

TB - GNS3 Lab: UDLD

by C. Casquatch

Simulating UDLD Failure in GNS3 Without MAC ACL Support

You can find the lab here: (https://gns3vault.com/switching/switch-svi-interface-and-routing)

๐Ÿ” Objective

In this lab, we simulate a unidirectional link failure using UDLD (Unidirectional Link Detection) in Cisco switches within GNS3. Our goal is to:


๐Ÿงช Lab Topology

Screenshot topology


๐Ÿ”ง Step 1: Enable UDLD in Aggressive Mode

On both SW1 and SW2:

SW1(config)# udld enable
SW1(config)# interface gi0/0
SW1(config-if)# udld port aggressive
SW1(config-if)# no shutdown

SW2(config)# udld enable
SW2(config)# interface gi0/0
SW2(config-if)# udld port aggressive
SW2(config-if)# no shutdown

Screenshot 1


๐Ÿšง Step 2: Attempt MAC ACL Filtering (And Why It Failed)

I originally tried to simulate a unidirectional failure by filtering UDLD packets using a MAC access-list:

SW2(config)# mac access-list extended BLOCK_UDLD
SW2(config-mac-acl)# deny host 0100.0ccc.cccc any
SW2(config-mac-acl)# permit any any
SW2(config)# interface gi0/0
SW2(config-if)# mac access-group BLOCK_UDLD in

However, when we tried to verify it with:

SW2# show mac access-list BLOCK_UDLD

We got:

% Invalid input detected at '^' marker.

๐Ÿ’ก Conclusion: The IOSvL2 switch image in GNS3 does not support MAC ACLs properly.


Since MAC filtering failed, we used a more reliable method: manually disabling one side of the link.

โœ” Method: Shut Down the Port on SW2

SW2(config)# interface gi0/0
SW2(config-if)# shutdown

Leave SW1โ€™s port up. After a few seconds, SW1 (running UDLD in aggressive mode) detects the failure:

%UDLD-4-UDLD_PORT_DISABLED: UDLD disabled interface gi0/0, unidirectional link detected

Verify with:

SW1# show udld interface gi0/0
SW1# show interface status err-disabled

Screenshot 2


๐Ÿ›  Optional: Enable Auto-Recovery

To automatically recover from UDLD err-disable state:

SW1(config)# errdisable recovery cause udld
SW1(config)# errdisable recovery interval 30

At the bottom of this screenshot we can see there are no more status updates for the err-disabled state: Screenshot 3


๐Ÿ“Œ Summary

Step Description
1 Enable UDLD aggressive mode on both switches
2 Attempted MAC ACL filtering โ€” unsupported in IOSvL2
3 Used port shutdown to simulate unidirectional failure
4 Observed UDLD detecting failure and err-disabling the port

So easy, a caveman can do it.


Happy labbing ๐Ÿ”ง

tags: GNS3 - udld - Networking - switching