LBDT Management
This section describes the configuration model of LBDT management and provides examples of XML packets.
Data Model
The configuration model file matching LBDT management is huawei-loopback-detect.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/hw-loopback-detect:loopback-detect/hw-loopback-detect:auto-detection/hw-loopback-detect:enabled |
Indicates whether automatic LBDT is enabled. |
The value is of the Boolean type:
|
N/A |
/hw-loopback-detect:loopback-detect/hw-loopback-detect:auto-detection/hw-loopback-detect:action |
Indicates the action that is taken when automatic LBDT is triggered to detect loops in the VLAN where MAC address flapping is detected. |
The value is of the enumerated type:
|
Currently, only alarm and quitvlan are supported. |
/hw-loopback-detect:loopback-detect/hw-loopback-detect:transmit-interval-time |
Indicates the interval between sending loopback detection packets. |
The value is an integer in the range from 1 to 300, in seconds. By default, the interval between sending loopback detection packets is 5 seconds. |
N/A |
/hw-loopback-detect:loopback-detect/hw-loopback-detect:untagged-packet-mac-address |
Indicates the destination MAC address of untagged loopback detection packets. |
The value is in HH:HH:HH:HH:HH:HH format. An H is a hexadecimal number of 1 digit. By default, the destination MAC address of untagged loopback detection packets is 0180-C200-000A. |
The destination MAC address can only be a broadcast MAC address or a multicast MAC address. |
/if:interfaces/if:interface/hw-loopback-detect:augment/hw-loopback-detect:loopback-detect/hw-loopback-detect:enabled |
Indicates whether loopback detection is enabled on an interface. |
The value is of the Boolean type:
|
N/A |
/if:interfaces/if:interface/hw-loopback-detect:augment/hw-loopback-detect:loopback-detect/hw-loopback-detect:action |
Indicates the action to be taken when a loopback is detected on an interface. |
The value is of the Boolean type:
|
This object can be configured only when /if:interfaces/if:interface/hw-loopback-detect:augment/hw-loopback-detect:loopback-detect/hw-loopback-detect:enabled is set to true. |
/if:interfaces/if:interface/hw-loopback-detect:augment/hw-loopback-detect:loopback-detect/hw-loopback-detect:detect-vlans/hw-loopback-detect:vlan-id |
Indicates the VLAN ID of loopback detection packets on an interface. |
The value is an integer in the range from 1 to 4094. |
Each interface can send detection packets with a maximum of eight VLAN IDs. |
/if:interfaces/if:interface/hw-loopback-detect:augment/hw-loopback-detect:loopback-detect/hw-loopback-detect:recovery-time |
Indicates the interface recovery time after a loopback is detected. |
The value is an integer in the range from 1 to 1000, in seconds. The default recovery time is three times the loopback detection interval. |
N/A |
Configuring LBDT to Detect Loops
This section provides a sample of configuring LBDT for loop detection using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
/huawei-loopback-detect:loopback-detect /ietf:interfaces/ietf:interface/huawei-loopback-detect:loopback-detect |
Data Requirements
Item |
Data |
Description |
---|---|---|
Whether automatic LBDT is enabled |
false |
Disable automatic LBDT. |
Action that is taken when automatic LBDT is triggered to detect loops in the VLAN where MAC address flapping is detected |
quitvlan |
Remove the interface from the VLAN where MAC address flapping is detected. |
Interval between sending loopback detection packets |
300 |
Set the interval between sending loopback detection packets to 300 seconds. |
Destination MAC address of untagged loopback detection packets |
ff:ff:ff:ff:ff:ff |
Set the destination MAC address of untagged loopback detection packets to ff:ff:ff:ff:ff:ff. |
Whether loopback detection is enabled on an interface |
true |
Enable loopback detection on an interface. |
Action to be taken when a loopback is detected on an interface |
nolearn |
Disable MAC address learning on an interface when a loopback is detected on the interface. |
VLAN ID of loopback detection packets on an interface |
5 |
Set the VLAN ID of loopback detection packets on an interface to 5. |
Interface recovery time after a loopback is detected |
1000 |
Set the interface recovery time after a loopback is detected to 1000 seconds. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <edit-config> <target> <running/> </target> <config> <hw-loopback-detect:loopback-detect nc:operation="merge" xmlns:hw-loopback-detect="urn:huawei:yang:huawei-loopback-detect" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <hw-loopback-detect:transmit-interval-time>300</hw-loopback-detect:transmit-interval-time> <hw-loopback-detect:untagged-packet-mac-address>ff:ff:ff:ff:ff:ff</hw-loopback-detect:untagged-packet-mac-address> <hw-loopback-detect:auto-detection> <hw-loopback-detect:enabled>false</hw-loopback-detect:enabled> <hw-loopback-detect:action>quitvlan</hw-loopback-detect:action> </hw-loopback-detect:auto-detection> </hw-loopback-detect:loopback-detect> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" nc:operation="merge" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <if:interface nc:operation="merge"> <if:name>Eth-Trunk1</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type> <hw-loopback-detect:loopback-detect nc:operation="merge" xmlns:hw-loopback-detect="urn:huawei:yang:huawei-loopback-detect"> <hw-loopback-detect:enabled nc:operation="merge">true</hw-loopback-detect:enabled> <hw-loopback-detect:action nc:operation="merge">nolearn</hw-loopback-detect:action> <hw-loopback-detect:recovery-time>1000</hw-loopback-detect:recovery-time> <hw-loopback-detect:detect-vlans> <hw-loopback-detect:vlan-id>5</hw-loopback-detect:vlan-id> </hw-loopback-detect:detect-vlans> </hw-loopback-detect:loopback-detect> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Deletion Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <edit-config> <target> <running/> </target> <config> <hw-loopback-detect:loopback-detect nc:operation="remove" xmlns:hw-loopback-detect="urn:huawei:yang:huawei-loopback-detect" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <hw-loopback-detect:transmit-interval-time>300</hw-loopback-detect:transmit-interval-time> <hw-loopback-detect:untagged-packet-mac-address>ff:ff:ff:ff:ff:ff</hw-loopback-detect:untagged-packet-mac-address> <hw-loopback-detect:auto-detection> <hw-loopback-detect:enabled>false</hw-loopback-detect:enabled> <hw-loopback-detect:action>quitvlan</hw-loopback-detect:action> </hw-loopback-detect:auto-detection> </hw-loopback-detect:loopback-detect> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" nc:operation="merge" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <if:interface nc:operation="remove"> <if:name>Eth-Trunk1</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type> <hw-loopback-detect:loopback-detect nc:operation="merge" xmlns:hw-loopback-detect="urn:huawei:yang:huawei-loopback-detect"> <hw-loopback-detect:enabled nc:operation="merge">true</hw-loopback-detect:enabled> <hw-loopback-detect:action nc:operation="merge">nolearn</hw-loopback-detect:action> <hw-loopback-detect:recovery-time>1000</hw-loopback-detect:recovery-time> <hw-loopback-detect:detect-vlans> <hw-loopback-detect:vlan-id>5</hw-loopback-detect:vlan-id> </hw-loopback-detect:detect-vlans> </hw-loopback-detect:loopback-detect> </if:interface> </if:interfaces> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
Sample of failed response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>VLAN list is full.</error-message> <error-info>Error on node /ietf-interfaces:interfaces/interface[name="Eth-Trunk1"]/huawei-loopback-detect:loopback-detect/detect-vlans</error-info> </rpc-error> </rpc-reply>