No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
VLAN

VLAN

Data Model

The data model file matching the VLAN is huawei-vlan.yang.

NOTE:

To configure the VLAN on the interface, you must ensure that the interface is a Layer 2 interface.

Table 3-48 Data model of VLAN

Object

Description

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

Indicates that the operation request (creating, deleting, and modifying) object is the VLAN-related configurations. It is only used to contain sub-objects, but does not have any data meaning.

huawei-vlan:vlans/vlan/id

Indicates that a VLAN is created and the VLAN view is displayed. If the VLAN already exists, the VLAN view is displayed directly.

The VLAN ID is an integer that ranges from 1 to 4094.

huawei-vlan:vlans/vlan/description

Indicates the VLAN description.

huawei-vlan:vlans/vlan/enabled

Indicates whether the VLAN is enabled. The value true indicates that the VLAN is enabled and the value false indicates that the VLAN is disabled.

ietf-interfaces:interfaces/interface/huawei-vlan:vlan/port-link-type

Indicates the link type of a specified interface.

ietf-interfaces:interfaces/interface/huawei-vlan:vlan/default-vlan

Indicates that the default VLAN of the interface is specified and the interface is added to the default VLAN.

The VLAN ID is an integer that ranges from 1 to 4094.

ietf-interfaces:interfaces/interface/huawei-vlan:vlan/trunk

Indicates that the link type of a specified interface is trunk.

ietf-interfaces:interfaces/interface/huawei-vlan:vlan/hybrid/untagged-vlan

Indicates the VLAN to which a hybrid interface is added. Untagged frames of the VLAN pass through the hybrid interface.

ietf-interfaces:interfaces/interface/huawei-vlan:vlan/hybrid/tagged-vlan

Indicates the VLAN to which a hybrid interface is added. Tagged frames of the VLAN pass through the hybrid interface.

Configuring the VLAN Where the Trunk Interface Is Added

Adding the Configuration of the VLAN Where the Trunk Interface Is Added

This section provides a sample of adding the configuration of the VLAN where the trunk Interface is added.

Table 3-49 Adding the configuration of the VLAN where the trunk interface is added

Operation

XPATH

edit-config:replace

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

Data Requirements
Table 3-50 Adding the configuration of the VLAN where the trunk interface is added

Item

Data

Description

VLAN ID

11

Create VLAN 11 on GigabitEthernet0/0/2, configure GigabitEthernet0/0/2 as the trunk interface, set the default VLAN to VLAN 11, and add GigabitEthernet0/0/2 to VLAN 11 and VLAN 16. Configure the VLAN description as vlan11 and the interface description as Ethernet0/0/1 config.

VLAN description

VLAN11

Interface name

GigabitEthernet0/0/2

Interface description

Ethernet0/0/1 config

Link type of the interface

trunk

Default VLAN of the trunk interface

11

VLAN that the trunk interface is added to

11

VLAN that the trunk interface is added to

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
     <description>vlan11</description>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="replace">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>Ethernet0/0/1 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
      <port-link-type>trunk</port-link-type>
      <default-vlan>11</default-vlan>
      <trunk>
       <trunk-vlan>11</trunk-vlan>
       <trunk-vlan>16</trunk-vlan>
      </trunk>
     </vlan>                 
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
 <ok/>
</rpc-reply> 
Modifying the Configuration of the VLAN Where the Trunk Interface Is Added

This section provides a sample of modifying the configuration of the VLAN where the trunk Interface is added.

Table 3-51 Modifying the configuration of the VLAN where the trunk interface is added

Operation

XPATH

edit-config:replace

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

Data Requirements
Table 3-52 Modifying the configuration of the VLAN where the trunk interface is added

Item

Data

Description

VLAN ID

11

Modify the configuration of GigabitEthernet0/0/2.

Interface name

GigabitEthernet0/0/2

Interface description

Ethernet0/0/1 config

Link type of the interface

trunk

Default VLAN of the trunk interface

11

VLAN that the trunk interface is added to

11

VLAN that the trunk interface is added to

17

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="replace">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>Ethernet0/0/1 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan"xc:operation="replace">
      <port-link-type>trunk</port-link-type>
      <default-vlan>11</default-vlan>
      <trunk>
       <trunk-vlan>11</trunk-vlan>
       <trunk-vlan>17</trunk-vlan>
      </trunk>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply>
Deleting the Configuration of the VLAN Where the Trunk Interface Is Added

This section provides a sample of deleting the configuration of the VLAN where the trunk Interface is added.

Table 3-53 Deleting the configuration of the VLAN where the trunk interface is added

Operation

XPATH

edit-config:remove

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

Data Requirements
Table 3-54 Deleting the configuration of the VLAN where the trunk interface is added

Item

Data

Description

VLAN ID

11

Delete the configuration of GigabitEthernet0/0/2.

VLAN description

VLAN11

Interface name

GigabitEthernet0/0/2

Interface description

Ethernet0/0/1 config

Link type of the interface

trunk

Default VLAN of the trunk interface

11

VLAN that the trunk interface is added to

11

VLAN that the trunk interface is added to

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
     <description>vlan11</description>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="remove">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>Ethernet0/0/1 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
      <port-link-type>trunk</port-link-type>
      <default-vlan>11</default-vlan>
      <trunk>
       <trunk-vlan>11</trunk-vlan>
       <trunk-vlan>16</trunk-vlan>
      </trunk>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">  
  <ok/>  
</rpc-reply>

Configuring the VLAN Where the Hybrid Interface Is Added in Untagged Mode

Adding the Configuration of the VLAN Where the Hybrid Interface Is Added in Untagged Mode

This section provides a sample of adding the configuration of the VLAN where the hybrid Interface is added in untagged mode.

Table 3-55 Adding the configuration of the VLAN where the hybrid interface is added in untagged mode

Operation

XPATH

edit-config:replace

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

Data Requirements
Table 3-56 Adding the configuration of the VLAN where the hybrid interface is added in untagged mode

Item

Data

Description

VLAN ID

11

Create VLAN 11 on GigabitEthernet0/0/2, configure GigabitEthernet0/0/2 as the hybrid interface, set the default VLAN to VLAN 11, and add GigabitEthernet0/0/2 to VLAN 12 and VLAN 16. Configure the interface description as GigabitEthernet0/0/2 config.

Interface name

GigabitEthernet0/0/2

Interface description

GigabitEthernet0/0/2 config

Link type of the interface

trunk

Default VLAN of the hybrid interface

11

VLAN that the hybrid interface is added to in untagged mode

11

VLAN that the hybrid interface is added to in untagged mode

12

VLAN that the hybrid interface is added to in untagged mode

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="replace">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>GigabitEthernet0/0/2 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan" >
      <port-link-type>hybrid</port-link-type>
      <default-vlan>11</default-vlan>
      <hybrid >
       <untagged-vlan>11</untagged-vlan>
       <untagged-vlan>12</untagged-vlan> 
       <untagged-vlan>16</untagged-vlan>
      </hybrid>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply>
Modifying the Configuration of the VLAN Where the Hybrid Interface Is Added in Untagged Mode

This section provides a sample of modifying the configuration of the VLAN where the hybrid Interface is added in untagged mode.

Table 3-57 Modifying the configuration of the VLAN where the hybrid interface is added in untagged mode

Operation

XPATH

edit-config:replace

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

Data Requirements
Table 3-58 Modifying the configuration of the VLAN where the hybrid interface is added in untagged mode

Item

Data

Description

VLAN ID

11

Modify the configuration of GigabitEthernet0/0/2.

Interface name

GigabitEthernet0/0/2

Interface description

GigabitEthernet0/0/2 config

Link type of the interface

trunk

Default VLAN of the hybrid interface

11

VLAN that the hybrid interface is added to in untagged mode

12

VLAN that the hybrid interface is added to in untagged mode

17

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="replace">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>GigabitEthernet0/0/2 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan" >
      <port-link-type>hybrid</port-link-type>
      <default-vlan>11</default-vlan>
      <hybrid >
       <untagged-vlan>11</untagged-vlan>
       <untagged-vlan>12</untagged-vlan> 
       <untagged-vlan>17</untagged-vlan>
      </hybrid>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply>
Deleting the Configuration of the VLAN Where the Hybrid Interface Is Added in Untagged Mode

This section provides a sample of deleting the configuration of the VLAN where the hybrid Interface is added in untagged mode.

Table 3-59 Deleting the configuration of the VLAN where the hybrid interface is added in untagged mode

Operation

XPATH

edit-config:remove

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

Data Requirements
Table 3-60 Deleting the configuration of the VLAN where the hybrid interface is added in untagged mode

Item

Data

Description

VLAN ID

11

Delete the configuration of GigabitEthernet0/0/2.

Interface name

GigabitEthernet0/0/2

Interface description

GigabitEthernet0/0/2 config

Link type of the interface

trunk

Default VLAN of the hybrid interface

11

VLAN that the hybrid interface is added to in untagged mode

11

VLAN that the hybrid interface is added to in untagged mode

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="remove">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>GigabitEthernet0/0/2 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan" >
      <port-link-type>hybrid</port-link-type>
      <default-vlan>11</default-vlan>
      <hybrid >
       <untagged-vlan>11</untagged-vlan>
       <untagged-vlan>12</untagged-vlan> 
       <untagged-vlan>16</untagged-vlan>
      </hybrid>
     </vlan>               
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply> 

Configuring the VLAN Where the Hybrid Interface Is Added in Tagged Mode

Adding the Configuration of the VLAN Where the Hybrid Interface Is Added in Tagged Mode

This section provides a sample of adding the configuration of the VLAN where the hybrid Interface is added in tagged mode.

Table 3-61 Adding the configuration of the VLAN where the hybrid interface is added in tagged mode

Operation

XPATH

edit-config: default

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

Data Requirements
Table 3-62 Adding the configuration of the VLAN where the hybrid interface is added in tagged mode

Item

Data

Description

VLAN ID

11

Create VLAN 11 on GigabitEthernet0/0/2, configure GigabitEthernet0/0/2 as the hybrid interface, set the default VLAN to VLAN 11, and add GigabitEthernet0/0/2 to VLAN 11 and VLAN 16. Configure the interface description as GigabitEthernet0/0/2 config.

Interface name

GigabitEthernet0/0/2

Interface description

GigabitEthernet0/0/2 config

Link type of the interface

trunk

Default VLAN of the hybrid interface

11

VLAN that the hybrid interface is added to in tagged mode

11

VLAN that the hybrid interface is added to in tagged mode

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>GigabitEthernet0/0/2 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
      <port-link-type>hybrid</port-link-type>
      <default-vlan>11</default-vlan>
      <hybrid>
       <tagged-vlan>11</tagged-vlan>
       <tagged-vlan>12</tagged-vlan> 
       <tagged-vlan>16</tagged-vlan>
      </hybrid>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply> 
Modifying the Configuration of the VLAN Where the Hybrid Interface Is Added in Tagged Mode

This section provides a sample of modifying the configuration of the VLAN where the hybrid Interface is added in tagged mode.

Table 3-63 Modifying the configuration of the VLAN where the hybrid interface is added in tagged mode

Operation

XPATH

edit-config:replace

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

Data Requirements
Table 3-64 Modifying the configuration of the VLAN where the hybrid interface is added in tagged mode

Item

Data

Description

VLAN ID

11

Modify the configuration of GigabitEthernet0/0/2.

Interface name

GigabitEthernet0/0/2

Interface description

GigabitEthernet0/0/2 config

Interface link type

trunk

The default VLAN of Hybrid interfaces

11

The VLAN that the Hybrid interface is added to in Tagged mode

11

The VLAN that the Hybrid interface is added to in Tagged mode

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="replace">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>GigabitEthernet0/0/2 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
      <port-link-type>hybrid</port-link-type>
      <default-vlan>11</default-vlan>
      <hybrid>
       <tagged-vlan>11</tagged-vlan>
       <tagged-vlan>12</tagged-vlan> 
       <tagged-vlan>16</tagged-vlan>
      </hybrid>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply>
Deleting the Configuration of the VLAN Where the Hybrid Interface Is Added in Tagged Mode

This section provides a sample of deleting the configuration of the VLAN where the hybrid Interface is added in tagged mode.

Table 3-65 Deleting the configuration of the VLAN where the hybrid interface is added in tagged mode

Operation

XPATH

edit-config:remove

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

Data Requirements
Table 3-66 Deleting the configuration of the VLAN where the hybrid interface is added in tagged mode

Item

Data

Description

VLAN ID

11

Delete the configuration of GigabitEthernet0/0/2.

Interface name

GigabitEthernet0/0/2

Interface description

Ethernet0/0/1 config

Interface link type

trunk

The default VLAN of Hybrid interfaces

11

The VLAN that the Hybrid interface is added to in Tagged mode

11

The VLAN that the Hybrid interface is added to in Tagged mode

16

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
     <id>11</id>
     <enabled>true</enabled>
    </vlan>
   </vlans>
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface xc:operation="remove">
     <name>GigabitEthernet0/0/2</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <enabled>true</enabled>
     <description>Ethernet0/0/1 config</description>
     <vlan xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
      <port-link-type>trunk</port-link-type>
      <default-vlan>11</default-vlan>
      <trunk>
       <trunk-vlan>11</trunk-vlan>
       <trunk-vlan>16</trunk-vlan>
      </trunk>
     </vlan>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_84771fcd2a93486790dcdb6101e7a8ef"> 
  <ok/> 
</rpc-reply> 
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8268

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next