Skip to content

Instantly share code, notes, and snippets.

@thorr18
Created May 9, 2017 11:21
Show Gist options
  • Save thorr18/35636b853a1eabda80823a66f1a8c6e8 to your computer and use it in GitHub Desktop.
Save thorr18/35636b853a1eabda80823a66f1a8c6e8 to your computer and use it in GitHub Desktop.
UDLD
!UDLD sends frames to a special fake MAC address and it wants them echod back by the UDLD on the other device.
!A unidirectional fiber failure should be simulatable with a MAC address filter.
!UDLD only acts if a port enters bidirectional UDLD state before tranistioning to unidirectional.
!
!Wait for bidirectional state, then:
mac access-list extended UDLD_FILTER
deny any host 0100.0ccc.cccc
perm any
!
int G x/x
mac access-group UDLD_FILTER in
!
!
!However, on some models, the filter doesn't work. The packets get to UDLD via CPU too early.
!This is an alternate filter that works in at least some of those cases:
!
mac access-list extended UDLD_MATCH
permit any host 0100.0ccc.cccc
class-map UDLD_CLASS
match access-group name UDLD_MATCH
exit
policy-map UDLD_POLICY
class UDLD_CLASS
police 32000 conform-action drop exceed-action drop
exit
!Wait for bidirectional state, then:
int G x/x
service-policy input UDLD_POLICY
end
!
!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment