UDLD Configuration


UDLD (Unidirectional Link Detection) using for detecting optical fiber unidirectional link. It supports two modes of operation: normal mode(the default) and aggressive mode. In normal mode, UDLD can detect unidirectional links due to mis-connected interfaces. In aggressive mode, UDLD can also detect unidirectional links due to one-way traffic, twisted-pair links, and mis-connected interfaces. You can enable UDLD globally or on specific ports. When UDLD detectes uni-directional fault, the port status will be setted Disabled(UDLD) and down, and there is no udld neighbor. In addition, UDLD can detect the self loop port and disable this port. Self loop means TX links to RX on the same port. 

Caution:

  • For the case of TX-RX (RX indicates the receiving end, and TX indicates the sending end) self-loops on one ethernet port, the port status will be set to Disabled (UDLD) and down, and there will be no UDLD neighbor.
  • Do not configure up-mode with UDLD, as this may cause the peer interface to be disabled unexpectedly by UDLD.


Configure UDLD normal mode on global

admin@XorPlus# set protocols udld disable false
admin@XorPlus# commit 
Commit OK.
Save done.

Configure UDLD aggressive mode on global

admin@XorPlus# set protocols udld disable false
admin@XorPlus# set protocols udld aggressive true
admin@XorPlus# commit 
Commit OK.
Save done.

Configure UDLD normal mode on Specific Port

admin@XorPlus# set protocols udld interface te-1/1/27 disable false
admin@XorPlus# commit 
Commit OK.
Save done.

Configure UDLD aggressive mode on Specific Port

admin@XorPlus# set protocols udld interface te-1/1/27 disable false
admin@XorPlus# set protocols udld interface te-1/1/27 aggressive true
admin@XorPlus# commit 
Merging the configuration.
Commit OK.
Save done.

Configure UDLD Message-interval

admin@XorPlus# set protocols udld message-interval 20
admin@XorPlus# commit 
Commit OK.
Save done.

UDLD status as follows when the link is good

admin@Xorplus# run show udld neighbors 
  Port       Device Name     Device ID        Port ID     state
--------     -----------    -----------    ------------   ---------------
te-1/1/27    3295           QTFQXI10700003  te-1/1/49      bi-directional

admin@Xorplus# run show udld interface te-1/1/27
Interface te-1/1/27
----------------------------------------
Udld enabled, aggressive mode
Current bidirectional state: bi-directional
Current phase: advertisement
Message interval: 15s
Timeout interval: 5s
    neighbor 1
    ------------------
    Expiration time: 43.58s
    Device ID: QTFQXI10700003
    Port ID: te-1/1/49
    Message interval: 20s
    Timeout interval: 5s
    Device name: 3295

UDLD status as follows when UDLD detect uni-directional fault

admin@Xorplus# run show udld neighbors 
  Port       Device Name     Device ID        Port ID     state
--------     -----------    -----------    ------------   ---------------

admin@Xorplus# run show udld interface te-1/1/27
Interface te-1/1/27
----------------------------------------
Udld enabled
Current bidirectional state: uni-directional
Current phase: linkdown
Message interval: 7s
Timeout interval: 5s
 
admin@XorPlus# run show interface gigabit-ethernet te-1/1/27
Physical interface: te-1/1/27, Enabled, error-discard True(UDLD), Physical link is Down
Interface index: 27, SFP type: SR/850
Description: 
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Full
Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Enabled
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Interface rate limit  ingress:unlimited, egress:unlimited
Interface burst limit ingress:unlimited, egress:unlimited
Current address: 00:90:4c:06:a5:73, Hardware address: 00:90:4c:06:a5:73
Traffic statistics:
  5 sec input rate 0 bits/sec, 0 packets/sec
  5 sec output rate 0 bits/sec, 0 packets/sec
  Input Packets............................16
  Output Packets...........................1360
  Input Octets.............................1797
  Output Octets............................157178

UDLD status when self loop link

The example is that tx connect with rx on the same port te-1/1/27. The udld status will be transmit-to-receive loop, and the port status will be setted Disabled(UDLD) and down, and there is no udld neighbor.

admin@Xorplus# run show udld neighbors
  Port       Device Name     Device ID        Port ID     state
--------     -----------    -----------    ------------   ---------------

admin@Xorplus# run show udld interface te-1/1/27
Interface te-1/1/27
----------------------------------------
Udld enabled, aggressive mode
Current bidirectional state: transmit-to-receive loop
Current phase: linkdown
Message interval: 7s
Timeout interval: 5s

admin@XorPlus# run show interface gigabit-ethernet te-1/1/27
Physical interface: te-1/1/27, Disabled(UDLD), error-discard False, Physical link is Down
Interface index: 27, SFP type: SR/850
Description: 
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Full
Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Enabled
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Interface rate limit  ingress:unlimited, egress:unlimited
Interface burst limit ingress:unlimited, egress:unlimited
Precision Time Protocol mode:none
Current address: 00:90:4c:06:a5:73, Hardware address: 00:90:4c:06:a5:73
Traffic statistics:
  5 sec input rate 0 bits/sec, 0 packets/sec
  5 sec output rate 0 bits/sec, 0 packets/sec
  Input Packets............................16
  Output Packets...........................1360
  Input Octets.............................1797
  Output Octets............................157178

Recover port status Disabled(UDLD)

You can through down, up the port to recover the status Disabled(UDLD)

admin@XorPlus# set interface gigabit-ethernet te-1/1/27 disable true
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# set interface gigabit-ethernet te-1/1/27 disable false
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# run show interface gigabit-ethernet te-1/1/27
Physical interface: te-1/1/27, Enabled, error-discard False, Physical link is Up
Interface index: 27, SFP type: SR/850
Description: 
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Full
Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Enabled
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Interface rate limit  ingress:unlimited, egress:unlimited
Interface burst limit ingress:unlimited, egress:unlimited
Precision Time Protocol mode:none
Current address: 00:90:4c:06:a5:73, Hardware address: 00:90:4c:06:a5:73
Traffic statistics:
  5 sec input rate 0 bits/sec, 0 packets/sec
  5 sec output rate 0 bits/sec, 0 packets/sec
  Input Packets............................16
  Output Packets...........................1360
  Input Octets.............................1797
  Output Octets............................157178

Or you can using follow command to recover the status Disabled(UDLD)

admin@XorPlus# run clear udld
admin@XorPlus# run show interface gigabit-ethernet te-1/1/27
Physical interface: te-1/1/27, Enabled, error-discard False, Physical link is Up
Interface index: 27, SFP type: SR/850
Port mode: access
Description: 
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Full
Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Enabled
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Interface rate limit  ingress:unlimited, egress:unlimited
Interface burst limit ingress:unlimited, egress:unlimited
Precision Time Protocol mode:none
Current address: 00:90:4c:06:a5:73, Hardware address: 00:90:4c:06:a5:73
Traffic statistics:
  5 sec input rate 0 bits/sec, 0 packets/sec
  5 sec output rate 0 bits/sec, 0 packets/sec
  Input Packets............................16
  Output Packets...........................1360
  Input Octets.............................1797
  Output Octets............................157178


Copyright © 2024 Pica8 Inc. All Rights Reserved.