< Home

Example for Configuring the ECMP Load Balancing Mode

This section provides a sample of configuring the ECMP load balancing mode using the edit-config method.

Table 1 Configuring the ECMP load balancing mode

Operation

XPATH

edit-config

/huawei-route-management:route-manage/load-balance/flow

Data Requirements

Item

Data

Description

ECMP load balancing mode

src-dst-ip

Configure ECMP load balancing based on the source and destination IP addresses.

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 xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <hw-route-management:route-manage xmlns:hw-route-management="urn:huawei:yang:huawei-route-management">
        <hw-route-management:load-balance>
          <hw-route-management:flow>src-dst-ip</hw-route-management:flow>
        </hw-route-management:load-balance>
      </hw-route-management:route-manage>
    </config>
  </edit-config>
</rpc>

Default Configuration Restoration 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 xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <hw-route-management:route-manage xmlns:hw-route-management="urn:huawei:yang:huawei-route-management">
        <hw-route-management:load-balance nc:operation="remove">
          <hw-route-management:flow>src-dst-ip</hw-route-management:flow>
        </hw-route-management:load-balance>
      </hw-route-management:route-manage>
    </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>Load balancing based on the destination IP address only is not supported.</error-message>
    <error-info>Error on node /huawei-route-management:route-manage/load-balance</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic