< Home

Configuring BPDU Protection

This section provides a sample of delivering BPDU protection configurations to the device using the rpc method.

Table 1 Configuring BPDU protection

Operation

XPATH

rpc

/huawei-stp:stp/bpdu-protection

Data Requirements

Table 2 Configuring BPDU protection

Item

Data

Description

BPDU protection

true

Enable BPDU protection.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="5" 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:bpdu-protection>true</huawei-stp:bpdu-protection>
      </huawei-stp:stp>
    </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="2">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path>/huawei-stp:stp/bpdu-protection</error-path>
    <error-message>parse rpc config error.(Invalid value "true1" in "bpdu-protection" element.).</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >