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

S600-E V200R011C10 NETCONF YANG API Reference

This document describes the NETCONF API functions supported by the switch, including the data model and samples.
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).
Eth-Trunk Management

Eth-Trunk Management

This section describes the configuration model of Eth-Trunk management and provides examples of XML packets.

Data Model

The configuration model file matching Eth-Trunk management is huawei-eth-trunk.yang.

Table 2-155  Eth-Trunk management

Object

Description

Value

Remarks

/ietf-interfaces:interfaces/interface/huawei-eth-trunk:eth-trunk/trunk-work-mode

Indicates the Eth-Trunk mode.

The value is of the enumerated type:
  • lacp
  • manual

N/A

/ietf-interfaces:interfaces/interface/huawei-eth-trunk:eth-trunk/assign-interface

Indicates the Eth-Trunk member interface.

The value is the type and number of a member interface.

N/A

Configuring an Eth-Trunk

This section provides a sample of configuring the Eth-Trunk working mode and adding a member interface using the rpc method.

Table 2-156  Configuring an Eth-Trunk

Operation

XPATH

rpc

/ietf-interfaces:interfaces/interface/huawei-eth-trunk:eth-trunk/trunk-work-mode

/ietf-interfaces:interfaces/interface/huawei-eth-trunk:eth-trunk/assign-interface

Data Requirements

Table 2-157  Configuring an Eth-Trunk

Item

Data

Description

Working mode of an Eth-Trunk

lacp

Set the working mode of an Eth-Trunk to LACP.

Member interface

GigabitEthernet0/0/1

Add GigabitEthernet0/0/1 to Eth-Trunk1.

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>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>Eth-Trunk1</if:name>
          <if:type>ethernetCsmacd</if:type>
          <hw-eth-trunk:eth-trunk xmlns:hw-eth-trunk="urn:huawei:params:xml:ns:yang:huawei-eth-trunk">
            <hw-eth-trunk:trunk-work-mode>lacp</hw-eth-trunk:trunk-work-mode>
            <hw-eth-trunk:assign-interface>GigabitEthernet0/0/1</hw-eth-trunk:assign-interface>
          </hw-eth-trunk:eth-trunk>
        </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="6">
  <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="12">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>The port GigabitEthernet0/0/1 has other configurations. Please clear configuration first.The error port is GigabitEthernet0/0/1.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="Eth-Trunk1"]/huawei-eth-trunk:eth-trunk/assign-interface[.="GigabitEthernet0/0/1"]</error-info>
  </rpc-error>
</rpc-reply>
Translation
Download
Updated: 2019-09-23

Document ID: EDOC1000178028

Views: 4955

Downloads: 0

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