< Home

Configuring VBST

This section provides a sample of configuring VBST using the edit-config method.

Table 1 Configuring VBST

Operation

XPATH

edit-config

/huawei-stp:stp/stp-vbst/vlan-vbst

/ietf-interfaces:interfaces/interface/huawei-stp:stp/stp-vbst/vlan-vbst

Data Requirements

Item

Data

Description

VLAN in which VBST is enabled

10

Enable VBST in VLAN 10.

Whether VBST is enabled in a VLAN

true

Enable VBST in a VLAN.

Priority of a switch in a VLAN

8192

Set the priority of a switch in a VLAN to 8192.

VLAN to which the interface belongs

20

Configure the interface to belong to VLAN 20.

Priority of a port

240

Set the port priority to 240.

Path cost of a port

3000

Set the path cost of the port to 3000.

Request Example

# Configure VBST in the system view.

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="11" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-stp:stp xmlns:huawei-stp="urn:huawei:params:xml:ns:yang:huawei-stp">
        <huawei-stp:stp-vbst>
          <huawei-stp:vlan-vbst>
            <huawei-stp:vlan-vbst-id>10</huawei-stp:vlan-vbst-id>
            <huawei-stp:vlan-enable>true</huawei-stp:vlan-enable>
            <huawei-stp:priority>8192</huawei-stp:priority>
          </huawei-stp:vlan-vbst>
        </huawei-stp:stp-vbst>
      </huawei-stp:stp>
    </config>
  </edit-config>
</rpc>

# Configure VBST in the interface view.

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="13" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/1</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <huawei-stp:stp xmlns:huawei-stp="urn:huawei:params:xml:ns:yang:huawei-stp">
            <huawei-stp:stp-vbst>
              <huawei-stp:vlan-vbst>
                <huawei-stp:vlan-vbst-id>20</huawei-stp:vlan-vbst-id>
                <huawei-stp:port-priority>240</huawei-stp:port-priority>
                <huawei-stp:cost>3000</huawei-stp:cost>
              </huawei-stp:vlan-vbst>
            </huawei-stp:stp-vbst>
          </huawei-stp:stp>
        </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="11">
  <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="11">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Wrong parameter.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="GigabitEthernet0/0/1"]/huawei-stp:stp/stp-vbst/vlan-vbst[vlan-vbst-id="20"]</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic