< Home

Configuring Selective QinQ

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

Table 1 Configuring selective QinQ

Operation

XPATH

edit-config

/ietf-interfaces:interfaces/interface/huawei-vlan:vlan-translation-enable/huawei-vlan:translation-enable

/ietf-interfaces:interfaces/interface/huawei-vlan:vlan-translation/huawei-vlan:stacking

Data Requirements

Item

Data

Description

VLAN ID in a received tagged frame

3..7

Configure VLANs 3 to 7 to be contained in tagged frames.

Outer VLAN ID added to a frame

22

Set the outer VLAN ID added to a frame to 22.

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>
      <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-vlan:vlan-translation-enable xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
              <huawei-vlan:translation-enable>true</huawei-vlan:translation-enable>
             </huawei-vlan:vlan-translation-enable>
             <huawei-vlan:vlan-translation xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
              <huawei-vlan:stacking>
               <huawei-vlan:vlan>3..7</huawei-vlan:vlan>
               <huawei-vlan:stack-vlan>22</huawei-vlan:stack-vlan>
            </huawei-vlan:stacking>
          </huawei-vlan:vlan-translation>
        </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> This command is only supported on a trunk or hybrid port.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="GigabitEthernet0/0/1"]/huawei-vlan:vlan-translation-enable/translation-enable</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >