< Home

Configuring a Reserved VLAN for a Stack

This section describes how to configure a reserved VLAN for a stack using the config method.

Table 1 Configuring a reserved VLAN for a stack

Operation

XPATH

edit-config:config

/huawei-vlan:vlans/hw-stack:stacking-vlan

Data requirement 1

Table 2 Configuring a reserved VLAN for a stack

Item

Data

Description

Reserved VLAN ID of a stack

4001

Changes the reserved VLAN ID of a stack from the default value 4093 to 4001.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
        <hw-stack:stacking-vlan xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack">4001</hw-stack:stacking-vlan>
      </huawei-vlan:vlans>
    </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="8">
  <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="9">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Data requirement 2

Table 3 Changing the reserved VLAN ID of a stack

Item

Data

Description

Reserved VLAN ID of a stack

4002

Changes the reserved VLAN ID of a stack from 4001 to 4002.

Replacement 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-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
        <hw-stack:stacking-vlan xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">4002</hw-stack:stacking-vlan>
      </huawei-vlan:vlans>
    </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="8">
  <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="9">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Data requirement 3

Table 4 Deleting the default reserved VLAN ID of a stack

Item

Data

Description

Reserved VLAN ID of a stack

4002

Restores the reserved VLAN ID of a stack from 4002 to the default value 4093.

Deletion example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
        <hw-stack:stacking-vlan xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">4002</hw-stack:stacking-vlan>
      </huawei-vlan:vlans>
    </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="8">
  <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="9">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >