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

RESTful API Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes the OPS APIs supported by the device, including OPS-supported operations, request examples, elements in the requests, response examples, elements in the responses, and response status codes.
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).
Trunk Attributes

Trunk Attributes

Query a Trunk Interface's Attributes

Operation

URI

Description

GET

/ifmtrunk/TrunkIfs/TrunkIf

Query a trunk interface's attributes.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
    <TrunkIfs>
        <TrunkIf/>
    </TrunkIfs>

    Table 3-85 describes elements in requests.

    Table 3-85  Elements

    Element

    Description

    TrunkIf

    Specifies a trunk interface's attributes.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <TrunkIfs>
          <TrunkIf>
              <ifName>Eth-Trunk1</ifName>
              <minUpNum>1</minUpNum>
              <maxUpNum>32</maxUpNum>
              <trunkType>EthTrunk</trunkType>
              <hashType>IP</hashType>
              <workMode>Manual</workMode>
              <upMemberIfNum>0</upMemberIfNum>
              <memberIfNum>1</memberIfNum>
              <maxBandWidth>100000000</maxBandWidth>
              <ifMac>38ba-4c54-4102</ifMac>
              <lagID>1</lagID>
              <TrunkMemberIfs>
                <TrunkMemberIf>
                  <memberIfName>10GE1/0/1</memberIfName>
                  <lacpPort>27</lacpPort>
                  <memberIfState>Down</memberIfState>
                </TrunkMemberIf>
              </TrunkMemberIfs>
          </TrunkIf>
    </TrunkIfs>

    Table 3-86 describes elements in responses.

    Table 3-86  Elements

    Element

    Description

    ifName

    Specifies a trunk interface name.

    minUpNum

    Specifies the allowable minimum number of trunk member links that are in the Up state.

    maxUpNum

    Specifies the maximum number of member links that determine the bandwidth of a Layer 2 Eth-Trunk interface.

    trunkType

    Specifies the type of a trunk interface, which can be Eth-Trunk or IP-Trunk.

    hashType

    Specifies a hash algorithm for traffic forwarding.

    workMode

    Specifies a mode in which a trunk interface works.

    upMemberIfNum

    Specifies the number of member interfaces that are in the Up state.

    memberIfNum

    Specifies the number of a trunk interface's member interfaces.

    maxBandWidth

    Specifies the maximum bandwidth of a trunk interface.

    ifMac

    Specifies the MAC address of a trunk interface. The format of the MAC address is HH-HH-HH.

    lagID

    Specifies a trunk ID.

    TrunkMemberIfs

    Specifies a trunk interface's member interfaces.

    Table 3-87 describes status codes in responses.

    Table 3-87  Status codes

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Query Trunk Members' Attributes

Operation

URI

Description

GET

/ifmtrunk/TrunkIfs/TrunkIf/TrunkMemberIfs

Query trunk members' attributes.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
    <TrunkIfs>
        <TrunkIf>
            <TrunkMemberIfs/>
        </TrunkIf>
    </TrunkIfs>

    Table 3-88 describes elements in requests.

    Table 3-88  Elements

    Element

    Description

    TrunkMemberIfs

    Specifies trunk members' attributes.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <TrunkIfs>
          <TrunkIf>
              <ifName>Eth-Trunk1</ifName>
              <TrunkMemberIfs>
                <TrunkMemberIf>
                  <memberIfName>10GE1/0/1</memberIfName>
                  <lacpPort>27</lacpPort>
                  <memberIfState>Down</memberIfState>
                </TrunkMemberIf>
              </TrunkMemberIfs>
          </TrunkIf>
    </TrunkIfs>

    Table 3-89 describes elements in responses.

    Table 3-89  Elements

    Element

    Description

    ifName

    Specifies a trunk interface name.

    TrunkMemberIfs

    Specifies a trunk interface's member interfaces.

    TrunkMemberIf

    Specifies one of the trunk interface's member interfaces.

    memberIfName

    Specifies the name of a trunk interface's member interface.

    lacpPort

    Specifies an interface LACP priority.

    memberIfState

    Specifies the status of the trunk interface's member interface.

    Table 3-90 describes status codes in responses.

    Table 3-90  Status codes

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Create a Trunk Interface

Operation

URI

Description

POST

/ifmtrunk/TrunkIfs

Create a trunk interface.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>  
    <TrunkIfs> 
     <TrunkIf operation="create"> 
          <ifName>Eth-Trunk1</ifName> 
     </TrunkIf> 
    </TrunkIfs>

    Table 3-91 describes elements in requests.

Table 3-91  Elements in requests

Element

Description

TrunkIfs

Specifies a trunk interface list.

TrunkIf

Specifies the trunk interface information.

ifName

Specifies a trunk interface name. The value is a string of 1 to 63 characters.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>  
    <ok/>

    Table 3-92 describes status codes in responses.

Table 3-92  Description of status codes in responses

Status Code

Description

200 OK

The operation succeeds.

400 Bad Request

The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

500 Internal Server Error

Internal errors in services cause a request failure or an unidentified request.

Delete a Trunk Interface

Operation

URI

Description

DELETE

/ifmtrunk/TrunkIfs

Delete a trunk interface.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>  
    <TrunkIfs> 
     <TrunkIf operation="delete"> 
          <ifName>Eth-Trunk1</ifName> 
     </TrunkIf> 
    </TrunkIfs>

    Table 3-93 describes elements in requests.

Table 3-93  Elements in requests

Element

Description

TrunkIfs

Specifies a trunk interface list.

TrunkIf

Specifies the trunk interface information.

ifName

Specifies a trunk interface name. The value is a string of 1 to 63 characters.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>  
    <ok/>

    Table 3-94 describes status codes in responses.

Table 3-94  Description of status codes in responses

Status Code

Description

200 OK

The operation succeeds.

400 Bad Request

The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

500 Internal Server Error

Internal errors in services cause a request failure or an unidentified request.

Configure Trunk Interface Attributes

Operation

URI

Description

PUT

/ifmtrunk/TrunkIfs

Configure trunk interface attributes.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>  
    <TrunkIfs> 
     <TrunkIf operation="merge"> 
          <ifName>Eth-Trunk1</ifName> 
          <minUpNum>1</minUpNum> 
          <maxUpNum>32</maxUpNum> 
          <workMode>Manual</workMode> 
     </TrunkIf> 
    </TrunkIfs>

    Table 3-95 describes elements in requests.

Table 3-95  Elements in requests

Element

Description

TrunkIfs

Specifies a trunk interface list.

TrunkIf

Specifies the trunk interface information.

ifName

Specifies a trunk interface name. The value is a string of 1 to 63 characters.

minUpNum

Specifies the minimum number of trunk links in the Up state.

The value is an integer. The default value is 1. The value range is determined by the number of LAGs that can be manually configured.

The value ranges from 1 to 64 if a maximum of 256 LAGs can be configured.

The value ranges from 1 to 32 if a maximum of 512 LAGs can be configured.

The value ranges from 1 to 16 if a maximum of 1024 LAGs can be configured.

maxUpNum

Specifies the maximum number of links that affect the actual bandwidth of the Layer 2 Eth-Trunk interface.

The value is an integer. The value range is determined by the number of LAGs that can be manually configured.

If a maximum of 256 LAGs can be configured, the value ranges from 1 to 64, and the default value is 64.

If a maximum of 512 LAGs can be configured, the value ranges from 1 to 32, and the default value is 32.

If a maximum of 1024 LAGs can be configured, the value ranges from 1 to 16, and the default value is 16.

hashType

Specifies a hash algorithm for the traffic forwarding table. The value is an enumerated type and case-sensitive.

IP: Data flows are differentiated based on IP addresses of packets to ensure that the packets of the same data flow are transmitted over the same member link.

MAC: Data flows are differentiated based on MAC addresses of packets to ensure that the packets of the same data flow are transmitted over the same member link.

Enhanced: enhanced template-based load balancing mode.

Desip: The system obtains the specified three bits from each of the destination IP address and the outbound TCP/UDP port number to perform the exclusive OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.

Desmac: The system obtains the specified three bits from each of the destination MAC address, VLAN ID, Ethernet type, and inbound interface information to perform the exclusive OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.

Sourceip: The system obtains the specified three bits from each of the source IP address and the inbound TCP/UDP port number to perform the exclusive OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.

Sourcemac: The system obtains the specified three bits from each of the source MAC address, VLAN ID, Ethernet type, and inbound interface information to perform the exclusive OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.

The default value is IP.

workMode

Specifies a trunk interface working mode. The value is an enumerated type and case-sensitive.

Manual: Manual load balancing mode is a basic link aggregation mode. In this mode, trunk establishment, member interface addition, and active interfaces are manually configured, without the participation of LACP.

Dynamic: In dynamic LACP mode, if an Eth-Trunk interface in dynamic LACP mode is configured only on one of two connected devices and the directly connected physical interfaces are both Up, LACP will set Eth-Trunk member interfaces to Indep, indicating the physical interfaces of the two devices are independent. The physical interfaces of the device where dynamic LACP is configured can send data to the other device.

Static: In static LACP mode, Eth-Trunk establishment and member interface addition are manually configured. Different from link aggregation in manual load balancing mode, active member interfaces are selected by sending LACPDUs in static LACP mode.

The default value is Manual.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>  
    <ok/>

    Table 3-96 describes status codes in responses.

Table 3-96  Description of status codes in responses

Status Code

Description

200 OK

The operation succeeds.

400 Bad Request

The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

500 Internal Server Error

Internal errors in services cause a request failure or an unidentified request.

Add an Interface to a Trunk Interface

Operation

URI

Description

POST

/ifmtrunk/TrunkIfs/TrunkIf/TrunkMemberIfs

Add an interface to a trunk interface.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <TrunkIfs> 
     <TrunkIf> 
          <ifName>Eth-Trunk1</ifName> 
          <TrunkMemberIfs> 
              <TrunkMemberIf operation="create"> 
                  <memberIfName>10GE1/0/1</memberIfName> 
              </TrunkMemberIf> 
          </TrunkMemberIfs> 
     </TrunkIf> 
    </TrunkIfs>

    Table 1 describes elements in requests.

Table 3-97  Elements in requests

Element

Description

TrunkIfs

Specifies a trunk interface list.

TrunkIf

Specifies the trunk interface information.

ifName

Specifies a trunk interface name. The value is a string of 1 to 63 characters.

TrunkMemberIfs

Specifies a trunk member interface list.

TrunkMemberIf

Specifies a trunk member interface.

memberIfName

Specifies the name of an interface to be added to the trunk interface. The value is a string of 1 to 63 characters.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>  
    <ok/>

    Table 2 describes status codes in responses.

Table 3-98  Description of status codes in responses

Status Code

Description

200 OK

The operation succeeds.

400 Bad Request

The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

500 Internal Server Error

Internal errors in services cause a request failure or an unidentified request.

Delete an Interface from a Trunk Interface

Operation

URI

Description

DELETE

/ifmtrunk/TrunkIfs/TrunkIf/TrunkMemberIfs

Delete an interface from a trunk interface.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <TrunkIfs> 
     <TrunkIf> 
          <ifName>Eth-Trunk1</ifName> 
          <TrunkMemberIfs> 
              <TrunkMemberIf operation="delete"> 
                  <memberIfName>10GE1/0/1</memberIfName> 
              </TrunkMemberIf> 
          </TrunkMemberIfs> 
     </TrunkIf> 
    </TrunkIfs>

    Table 1 describes elements in requests.

Table 3-99  Elements in requests

Element

Description

TrunkIfs

Specifies a trunk interface list.

TrunkIf

Specifies the trunk interface information.

ifName

Specifies a trunk interface name. The value is a string of 1 to 63 characters.

TrunkMemberIfs

Specifies a trunk member interface list.

TrunkMemberIf

Specifies a trunk member interface.

memberIfName

Specifies the name of an Eth-Trunk member interface. The value is a string of 1 to 63 characters.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>  
    <ok/>

    Table 2 describes status codes in responses.

Table 3-100  Description of status codes in responses

Status Code

Description

200 OK

The operation succeeds.

400 Bad Request

The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

500 Internal Server Error

Internal errors in services cause a request failure or an unidentified request.

Configuring the LACP Attribute of a Trunk Interface

Operation

URI

Description

PUT

/ifmtrunk/TrunkIfs/TrunkIf/lacpTrunk

Configure the LACP attribute of a trunk interface.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <TrunkIfs>
       <TrunkIf operation="merge">
          <ifName>Eth-Trunk1</ifName>
          <lacpTrunk>               
             <rcvTimeoutType>Fast</rcvTimeoutType> 
          </lacpTrunk> 
       </TrunkIf>
    </TrunkIfs>

    Table 3-101 describes elements in a request.

    Table 3-101  Elements

    Element

    Description

    TrunkIfs

    Indicates a trunk interface list.

    TrunkIf

    Indicates trunk interface information.

    ifName

    Specifies the name of a trunk interface. The value is a string of 1 to 63 characters.

    rcvTimeoutType

    Specifies the timeout period of an LACP protocol packet. Fast indicates the short period, while Slow indicates the long period. The default value is Slow.

    The value is an enumerated type and case-sensitive. The value can be:

    • Slow: The timeout for receiving a packet is 90 seconds, and the peer sends LACP packets every 30 seconds. The response is slow, but few resources are consumed.
    • Fast: The timeout period for receiving a packet is 3 seconds by default, and the peer sends LACP packets every second. The response is fast, but many resources are consumed.

    The default value is Slow.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <ok/>

    Table 3-102 describes status codes in a response.

    Table 3-102  Status codes

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Querying the LACP Attribute of a Trunk Interface

Operation

URI

Description

GET

/ifmtrunk/TrunkIfs/TrunkIf/lacpTrunk

Query the LACP attribute of a trunk interface.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
    <TrunkIfs>
        <TrunkIf>
            <ifName>Eth-Trunk10</ifName>             
            <lacpTrunk>               
                <rcvTimeoutType></rcvTimeoutType>  
             </lacpTrunk> 
        </TrunkIf>
    </TrunkIfs>

    Table 3-103 describes elements in a request.

    Table 3-103  Elements

    Element

    Description

    rcvTimeoutType

    Specifies the timeout period of an LACP protocol packet. Fast indicates the short period, while Slow indicates the long period. The default value is Slow.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <TrunkIfs>
        <TrunkIf>
            <ifName>Eth-Trunk10</ifName>             
            <lacpTrunk>               
                <rcvTimeoutType>Fast</rcvTimeoutType>  
             </lacpTrunk> 
        </TrunkIf>
    </TrunkIfs>

    Table 3-104 shows elements in responses.

    Table 3-104  Description of elements in response

    Element

    Description

    ifName

    Specifies the name of a trunk interface.

    rcvTimeoutType

    Specifies the timeout period of an LACP protocol packet. Fast indicates the short period, while Slow indicates the long period. The default value is Slow.

    Table 3-105 describes status codes in a response.

    Table 3-105  Status codes

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166567

Views: 27780

Downloads: 123

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