NETCONF YANG API Reference

S9300 and S9300X V200R019C00

This document describes the NETCONF YANG API functions supported by the switch, including the data model and samples.

VXLAN Management

VXLAN Management

Data Model

The configuration model files matching VXLAN are huawei-bd.yang and huawei-vxlan.yang.

Table 2-385 BD

Object

Description

Value Range

Remarks

/huawei-bd/bridge-domains

Create a BD.

The value is an integer that ranges from 1 to 16777215.

NA

/huawei-bd/bridge-domains/bridge-domain

BD list

The value is an integer that ranges from 1 to 16777215.

NA

/huawei-bd/bridge-domains/bridge-domain/id

BD ID

The value is an integer that ranges from 1 to 16777215.

NA

/huawei-bd:bridge-domains/bridge-domain/description

BD description

The value is a string of 1 to 80 case-sensitive characters without spaces and question marks.

NA

/huawei-bd/bridge-domains/bridge-domain/members/vlan-id

Bind a global VLAN to a BD.

The value is an integer that ranges from 1 to 4094.

NA

/huawei-bd/bridge-domains/bridge-domain/members/interface-name

Interface name in default encapsulation

-

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-vlan

dot1q encapsulation

-

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-vlan/vlan-id

VLAN ID in dot1q encapsulation

The value is an integer that ranges from 2 to 4094.

NA

/huawei-bd:bridge-domains/bridge-domain /members/port-vlan/high-vlan-id

Endpoint VLAN ID of the VLAN segment in dot1q encapsulation

The value is an integer that ranges from 2 to 4094.

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-vlan/interface-name

Interface name in dot1q encapsulation

-

NA

/huawei-bd:bridge-domains/bridge-domain /members/port-vlan/rewrite-action/pop-action

Operation of removing VLAN tags from the packets received by Layer 2 sub-interfaces:
  • 1: none
  • 2: single
  • 3: double

-

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-qinq

QinQ encapsulation

-

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-qinq/c-vlan-id

Inner VLAN ID in QinQ encapsulation

The value is an integer that ranges from 1 to 4094.

NA

/huawei-bd:bridge-domains/bridge-domain/members/port-qinq/high-c-vlan-id

Endpoint VLAN ID of the inner VLAN segment in QinQ encapsulation

The value is an integer that ranges from 1 to 4094.

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-qinq/p-vlan-id

Outer VLAN ID in QinQ encapsulation

The value is an integer that ranges from 2 to 4094.

NA

/huawei-bd:bridge-domains/bridge-domain/members/port-qinq/high-p-vlan-id

Endpoint VLAN ID of the outer VLAN segment in QinQ encapsulation

The value is an integer that ranges from 2 to 4094.

NA

/huawei-bd/bridge-domains/bridge-domain/members/port-qinq/interface-name

Interface name in QinQ encapsulation

-

NA

/huawei-bd:bridge-domains/bridge-domain /members/port-vlan/rewrite-action/pop-action

Operation of removing VLAN tags from the packets received by Layer 2 sub-interfaces:
  • 1: none
  • 2: single
  • 3: double

-

NA

/huawei-bd:bridge-domains/bridge-domain/qos/storm-control/broadcast/cir

The committed information rate (CIR) of broadcast traffic, which is the allowed rate at which traffic can pass through.

The value is an integer that ranges from 0 to 10000000, in kbit/s.

NA

/huawei-bd:bridge-domains/bridge-domain/qos/storm-control/broadcast/cbs

The committed burst size (CBS) of broadcast traffic, which is the maximum size of traffic that can pass through.

The value is an integer that ranges from 10000 to 4294967295, in bytes.

NA

/huawei-bd:bridge-domains/bridge-domain/qos/storm-control/multicast/cir

The committed information rate (CIR) of multicast traffic

The value is an integer that ranges from 0 to 10000000, in kbit/s.

NA

/huawei-bd:bridge-domains/bridge-domain/qos/storm-control/multicast/cbs

The committed burst size (CBS) of multicast traffic

The value is an integer that ranges from 10000 to 4294967295, in bytes.

NA

/huawei-bd:bridge-domains/bridge-domain/qos/storm-control/unknown-unicast/cir

The committed information rate (CIR) of unicast traffic

The value is an integer that ranges from 0 to 10000000, in kbit/s.

NA

/huawei-bd:bridge-domains/bridge-domain/qos/storm-control/unknown-unicast/cbs

The committed burst size (CBS) of unicast traffic

The value is an integer that ranges from 10000 to 4294967295, in bytes.

NA

Table 2-386 VXLAN tunnel

Object

Description

Value Range

Remarks

/huawei-vxlan/vxlan/nve

Create an NVE interface.

The value is 1.

NA

/huawei-vxlan/vxlan/nve/id

NVE interface number

The value is 1.

NA

/huawei-vxlan/vxlan/nve/local-address

IP address of the source VTEP

The value is in dotted decimal notation.

NA

/huawei-vxlan/vxlan/nve/local-ipv6-address

IPv6 address of the source VTEP

The address is a 32-bit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

NA

/huawei-vxlan/vxlan/nve/vni-config

Configure a VNI.

The value is an integer that ranges from 1 to 16777215.

NA

/huawei-vxlan/vxlan/nve/vni-config/vni

VNI ID

The value is an integer that ranges from 1 to 16777215.

NA

/huawei-vxlan/vxlan/nve/vni-config/peer-address

Configure an IP address for the destination VTEP

  • IPv4: The value is in dotted decimal notation.
  • IPv6: The address is a 32-bit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

NA

/huawei-vxlan/vxlan/nve/vni-config/bgp

VXLAN Layer 2 tunnels are dynamically established through the BGP routing protocol.

-

NA

/huawei-vxlan/vxlan/nve/vni-config/vni-attachment

VNI association mode

-

NA

/huawei-vxlan/vxlan/nve/vni-config/vni-attachment/layer2

Layer 2 mode

-

NA

/huawei-vxlan/vxlan/nve/vni-config/vni-attachment/layer2/bdid

Associated BD ID

The value is an integer that ranges from 1 to 16777215.

NA

/huawei-vxlan/vxlan/global-attribute/exact-route-subscribe

Precise route status subscription of the VXLAN tunnel destination:
  • true: Enable
  • false: Disable

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state

View VXLAN tunnel information, which cannot be configured

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state/vxlan-tunnels

VXLAN tunnel

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state/nve-addresses

The IP address for a source VXLAN Tunnel Endpoint (VTEP)

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state/vxlan-tunnels/vxlan-tunnel

VXLAN tunnel ID

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state/vxlan-tunnels/vxlan-tunnel/local-address

Source IP address of the VXLAN tunnel

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state/vxlan-tunnels/vxlan-tunnel/peer-address

Destination IP address of the VXLAN tunnel

-

NA

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state/vxlan-tunnels/vxlan-tunnel/vxlan-tunnel-state

VXLAN tunnel status

-

NA

Create a BD

This section describes how to create a BD using the rpc method.

Table 2-387 Create a BD

Operation

XPATH

edit-config:merge

/huawei-bd/bridge-domains

Data requirement

Table 2-388 Create a BD

Item

Data

Description

BD ID

10

Create BD 10.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd">
        <bd:bridge-domain>
          <bd:id>10</bd:id>
        </bd:bridge-domain>
      </bd:bridge-domains>
    </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="0">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Execute failed reason: Wrong parameter found at '^' position.</error-message>
    <error-info>Error on node /huawei-bd:bridge-domains/bridge-domain[id="10"]/id</error-info>
  </rpc-error>
</rpc-reply>

Configuring the MAC Address of a VBDIF Interface

This section provides a sample of configuring the MAC address of a VBDIF interface using the config method.

Table 2-389 Configuring the MAC address of a VBDIF interface

Operation

XPATH

config

/ietf-interfaces:interfaces/interface/huawei-interfaces:common/phys-address

Data Requirements

Table 2-390 Configuring the MAC address of a VBDIF interface

Item

Data

Description

MAC address

0000-5e00-0101

Set the MAC address of the VBDIF interface to 0000-5e00-0101.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
 <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd">
        <bd:bridge-domain>
          <bd:id>3</bd:id>
        </bd:bridge-domain>
      </bd:bridge-domains>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>Vbdif3</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type>
          <huawei-interfaces:common xmlns:huawei-interfaces="urn:huawei:params:xml:ns:yang:huawei-interfaces">           <huawei-interfaces:phys-address>00:00:5e:00:01:01</huawei-interfaces:phys-address>
          </huawei-interfaces:common>
        </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="7">
  <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="7">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message> The MAC address configured on the interface ranges from 0000-5e00-0100 to 0000-5e00-01ff.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="Vbdif3"]/huawei-interfaces:common/phys-address</error-info>
  </rpc-error>
</rpc-reply>

Add a Global VLAN to a BD

This section describes how to add a global VLAN to a BD using the rpc method.

Table 2-391 Add a global VLAN to a BD

Operation

XPATH

edit-config:merge

/huawei-bd/bridge-domains/bridge-domain/members/vlan-id

Data requirement

Table 2-392 Add a global VLAN to a BD

Item

Data

Description

VLAN ID

50

Add global VLAN 50 to a BD.

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-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
       <huawei-vlan:vlan>
        <huawei-vlan:id>50</huawei-vlan:id>
       </huawei-vlan:vlan>
      </huawei-vlan:vlans>
      <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd">
        <bd:bridge-domain xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
          <bd:id>10</bd:id>
          <bd:members>
            <bd:vlan-id>50</bd:vlan-id>
          </bd:members>
        </bd:bridge-domain>
      </bd:bridge-domains>
    </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="5">
  <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="0">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Execute failed reason: The vlanif has been created, delete it first.</error-message>
    <error-info>Error on node /huawei-bd:bridge-domains/bridge-domain[id="10"]/members/vlan-id[.="50"]</error-info>
  </rpc-error>
</rpc-reply>

Add a Layer 2 Sub-interface in default Encapsulation Mode to a BD

This section describes how to add a Layer 2 sub-interface in default encapsulation mode to a BD using the rpc method.

Table 2-393 Add a Layer 2 sub-interface in default encapsulation mode to a BD

Operation

XPATH

edit-config:merge

/huawei-bd/bridge-domains/bridge-domain/members/interface-name

Data requirement

Table 2-394 Add a Layer 2 sub-interface in default encapsulation mode to a BD

Item

Data

Description

Interface name

XGigabitEthernet1/0/3

Add a Layer 2 sub-interface in default encapsulation mode to a BD.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" 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>XGigabitEthernet1/0/3</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 xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
         <huawei-vlan:port-link-type>trunk</huawei-vlan:port-link-type>
        </huawei-vlan:vlan>
       </if:interface>
      </if:interfaces> 
      <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd">
        <bd:bridge-domain xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
          <bd:id>10</bd:id>
          <bd:members>
            <bd:interface-name>XGigabitEthernet1/0/3</bd:interface-name>
          </bd:members>
        </bd:bridge-domain>
      </bd:bridge-domains>
    </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="5">
  <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>Execute failed reason: Wrong parameter found at '^' position.</error-message>
    <error-info>Error on node /huawei-bd:bridge-domains/bridge-domain[id="10"]/members/interface-name[.="XGigabitEthernet1/0/3"]</error-info>
  </rpc-error>
</rpc-reply>

Add a Layer 2 Sub-interface in dot1q Encapsulation Mode to a BD

This section describes how to add a Layer 2 sub-interface in dot1q encapsulation mode to a BD using the rpc method.

Table 2-395 Add a Layer 2 sub-interface in dot1q encapsulation mode to a BD

Operation

XPATH

edit-config:merge

/huawei-bd/bridge-domains/bridge-domain/members/port-vlan

Data requirement

Table 2-396 Add a Layer 2 sub-interface in dot1q encapsulation mode to a BD

Item

Data

Description

VLAN ID in dot1q encapsulation

500

Add a Layer 2 sub-interface in dot1q encapsulation mode with VLAN ID 500 to a BD.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="2" 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>XGigabitEthernet1/0/3</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 xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
         <huawei-vlan:port-link-type>trunk</huawei-vlan:port-link-type>
        </huawei-vlan:vlan>
       </if:interface>
      </if:interfaces> 
      <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
        <bd:bridge-domain xc:operation="merge">
          <bd:id>10</bd:id>
          <bd:members>
            <bd:port-vlan>
              <bd:vlan-id>500</bd:vlan-id>
              <bd:interface-name>XGigabitEthernet1/0/3</bd:interface-name>
            </bd:port-vlan>
          </bd:members>
        </bd:bridge-domain>
      </bd:bridge-domains>
    </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="2">
  <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-app-tag>-1</error-app-tag>
    <error-message>Execute failed reason: Wrong parameter found at '^' position.</error-message>
    <error-info>Error on node /huawei-bd:bridge-domains/bridge-domain[id="10"]/members/port-vlan[vlan-id="500",interface-name="XGigabitEthernet1/0/3"]</error-info>
  </rpc-error>
</rpc-reply>

Add a Layer 2 Sub-interface in QinQ Encapsulation Mode to a BD

This section describes how to add a Layer 2 sub-interface in QinQ encapsulation mode to a BD using the rpc method.

Table 2-397 Add a Layer 2 sub-interface in QinQ encapsulation mode to a BD

Operation

XPATH

edit-config:merge

/huawei-bd/bridge-domains/bridge-domain/members/port-qinq

Data requirement

Table 2-398 Add a Layer 2 sub-interface in QinQ encapsulation mode to a BD

Item

Data

Description

Inner and outer VLAN IDs in QinQ encapsulation

100, 200

Add a Layer 2 sub-interface in QinQ encapsulation mode with inner VLAN ID 100 and outer VLAN ID 200 to a BD.

Request 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>
       <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
        <if:name>XGigabitEthernet1/0/3</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 xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
         <huawei-vlan:port-link-type>trunk</huawei-vlan:port-link-type>
        </huawei-vlan:vlan>
       </if:interface>
      </if:interfaces> 
      <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
        <bd:bridge-domain xc:operation="merge">
          <bd:id>10</bd:id>
          <bd:members>
            <bd:port-qinq>
              <bd:c-vlan-id>100</bd:c-vlan-id>
              <bd:p-vlan-id>200</bd:p-vlan-id>
              <bd:interface-name>XGigabitEthernet1/0/3</bd:interface-name>
            </bd:port-qinq>
          </bd:members>
        </bd:bridge-domain>
      </bd:bridge-domains>
    </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="3">
  <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="3">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Execute failed reason: Wrong parameter found at '^' position.</error-message>
    <error-info>Error on node /huawei-bd:bridge-domains/bridge-domain[id="10"]/members/port-qinq[c-vlan-id="100",p-vlan-id="200",interface-name="XGigabitEthernet1/0/3"]</error-info>
  </rpc-error>
</rpc-reply>

Configure a VXLAN Tunnel

This section describes how to configure a VXLAN tunnel using the rpc method.

Table 2-399 Configure a VXLAN tunnel

Operation

XPATH

edit-config:merge

/huawei-vxlan/vxlan

Data requirement

Table 2-400 Configure a VXLAN tunnel

Item

Data

Description

NVE interface number

1

Create an NVE interface numbered 1.

IP address of the source VTEP

10.2.2.2

Set the IP address of the source VTEP to 10.2.2.2.

VNI ID

10

Set the VNI ID to 10.

IP address of the source VTEP

10.3.3.3

Set the IP address of the destination VTEP to 10.3.3.3.

BD ID

10

Set the associated BD ID to 10.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <hw-vxlan:vxlan xmlns:hw-vxlan="urn:huawei:params:xml:ns:yang:huawei-vxlan" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
        <hw-vxlan:nve>
          <hw-vxlan:id>1</hw-vxlan:id>
          <hw-vxlan:local-address>10.2.2.2</hw-vxlan:local-address>
          <hw-vxlan:vni-config>
            <hw-vxlan:vni>10</hw-vxlan:vni>
            <hw-vxlan:peer-address>10.3.3.3</hw-vxlan:peer-address>
            <hw-vxlan:bdid>10</hw-vxlan:bdid>
          </hw-vxlan:vni-config>
        </hw-vxlan:nve>
      </hw-vxlan:vxlan>
    </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="0">
  <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>Service process failed.</error-message>
    <error-info>Error on node /huawei-vxlan:vxlan/nve[id="1"]/vni-config[vni="10"]/bdid</error-info>
  </rpc-error>
</rpc-reply>

Configuring Traffic Suppression in a BD

This section provides a sample of configuring traffic suppression in a BFD using the rpc method.

Table 2-401 Configuring traffic suppression in a BD

Operation

XPATH

edit-config:merge

/huawei-bd:bridge-domains/bridge-domain

Data Requirements

Table 2-402 Configuring traffic suppression in a BD

Item

Data

Description

BD

10

Configure a BD 10.

Broadcast traffic CIR

100

Set the broadcast traffic CIR to 100 kbit/s.

Broadcast traffic CBS

2000000

Set the broadcast traffic CBS to 2000000 bytes.

Multicast traffic CIR

100

Set the multicast traffic CIR to 100 kbit/s.

Multicast traffic CBS

2000000

Set the multicast traffic CBS to 2000000 bytes.

Unicast traffic CIR

100

Set the unicast traffic CIR to 100 kbit/s.

Unicast traffic CBS

2000000

Set the unicast traffic CBS to 2000000 bytes.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd">
        <bd:bridge-domain xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
          <bd:id>10</bd:id>
          <bd:qos>
            <bd:storm-control xc:operation="merge">
              <bd:broadcast>
                <bd:cir>100</bd:cir>
                <bd:cbs>2000000</bd:cbs>
              </bd:broadcast>
              <bd:multicast>
                <bd:cir>100</bd:cir>
                <bd:cbs>2000000</bd:cbs>
              </bd:multicast>
              <bd:unknown-unicast>
                <bd:cir>100</bd:cir>
                <bd:cbs>2000000</bd:cbs>
              </bd:unknown-unicast>
            </bd:storm-control>
          </bd:qos>
        </bd:bridge-domain>
      </bd:bridge-domains>
    </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="2">
  <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="0">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path>/huawei-bd:bridge-domains/bridge-domain[id='NEED-A-VALUE-FOR-KEY-NODE!']/id</error-path>
    <error-message>parse rpc config error.(Invalid value in "id" element.).</error-message>
  </rpc-error>
</rpc-reply>

View VXLAN Tunnel Information

This section describes how to view VXLAN tunnel information using the rpc method.

Table 2-403 View VXLAN tunnel information

Operation

XPATH

get

/huawei-vxlan/huawei-vxlan:vxlan/vxlan-state

Data requirement

None

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <hw-vxlan:vxlan xmlns:hw-vxlan="urn:huawei:params:xml:ns:yang:huawei-vxlan">
        <hw-vxlan:vxlan-state>
          <hw-vxlan:vxlan-tunnels/>
        </hw-vxlan:vxlan-state>
      </hw-vxlan:vxlan>
    </filter>
  </get>
</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="0">
  <data>
    <vxlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vxlan">
      <vxlan-state>
        <vxlan-tunnels>
          <vxlan-tunnel>
            <local-address>10.2.2.2</local-address>
            <peer-address>10.3.3.3</peer-address>
            <vxlan-tunnel-state>down</vxlan-tunnel-state>
          </vxlan-tunnel>
        </vxlan-tunnels>
      </vxlan-state>
    </vxlan>
  </data>
</rpc-reply>

Sample of failed response

None

Translation
Favorite
Download
Update Date:2022-02-09
Document ID:EDOC1100116544
Views:61648
Downloads:88
Average rating:0.0Points

Digital Signature File

digtal sigature tool