VBST Management
This section describes the configuration model of VBST management and provides examples of XML packets.
Data Model
The configuration model file matching VBST management is huawei-stp.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-stp:stp/stp-vbst/vlan-vbst/vlan-vbst-id |
Indicates the VLAN where VBST is enabled. |
The value is an integer in the range from 1 to 4094. |
N/A |
/huawei-stp:stp/stp-vbst/vlan-vbst/vlan-enable |
Indicates whether VBST is enabled in a VLAN. |
The value is of the Boolean type:
By default, VBST is enabled in a VLAN. |
N/A |
/huawei-stp:stp/stp-vbst/vlan-vbst/priority |
Indicates the priority of a switch in a VLAN. |
The value is a multiple of 4096 in the range from 0 to 61440, such as 0, 4096, and 8192. The default value is 32768. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-stp:stp/stp-vbst/vlan-vbst/vlan-vbst-id |
Indicates the VLAN to which the interface belongs. |
The value is an integer in the range from 1 to 4094. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-stp:stp/stp-vbst/vlan-vbst/port-priority |
Indicates the priority of a port. |
The value is a multiple of 16 in the range from 0 to 240, such as 0, 16, and 32. The default value is 128. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-stp:stp/stp-vbst/vlan-vbst/cost |
Indicates the path cost of an interface. |
The value is an integer in the range from 1 to 200,000,000, in IEEE 802.1t standard. |
N/A |
Configuring VBST
This section provides a sample of configuring VBST using the edit-config method.
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>GigabitEthernet1/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="GigabitEthernet1/0/1"]/huawei-stp:stp/stp-vbst/vlan-vbst[vlan-vbst-id="20"]</error-info>
</rpc-error>
</rpc-reply>