< Home

Configuring LBDT to Detect Loops

This section provides a sample of configuring LBDT for loop detection using the edit-config method.

Table 1 Configuring LBDT to detect loops

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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic