ecmp prefer

Function

The ecmp prefer command configures whether the routes with a TE tunnel interface as the outbound interface or routes with an IPv4 interface as the outbound interface are preferentially selected to load-balance OSPF traffic.

The undo ecmp prefer restores the default configuration.

By default, routes are equally selected to load-balance OSPF traffic, regardless of whether the outbound interface is a TE tunnel interface or an IPv4 interface.

Format

ecmp prefer { te-tunnel | intact }

undo ecmp prefer

Parameters

Parameter Description Value
te-tunnel

Indicates that the routes with a TE tunnel interface as the outbound interface are preferentially selected to load-balance OSPF traffic.

-

intact

Indicates that the routes with a TE tunnel interface as the outbound interface and at least one route with an IPv4 interface as the outbound interface are selected to load-balance OSPF traffic.

-

Views

OSPF view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

In an OSPF TE scenario, ECMP load-balances traffic over multiple equal-cost paths to the same destination, regardless of bandwidth. When the link bandwidth values differ greatly, links with lower bandwidth may be congested with traffic, whereas links with higher bandwidth are relatively idle. To configure a next hop for an OSPF equal-cost route for load balancing, run the ecmp prefer command.

When an IGP Shortcut-enabled TE tunnel is configured on an OSPF network, you can specify one of the following parameters in the ecmp prefer command based on the network type.

  • te-tunnel: Specify this parameter when devices between the two routers connected by the TE tunnel do not support MPLS. If you specify this parameter, routes with a TE tunnel interface as the outbound interface are preferentially selected to load-balance OSPF traffic, which prevents MPLS traffic loss.
  • intact: Specify this parameter so that at least one route with an IPv4 interface as the outbound interface is selected along with routes with a TE tunnel interface as the outbound interface to load-balance OSPF traffic. If the TE tunnel fails, traffic can be forwarded along the route with an IPv4 interface as the outbound interface, which prevents traffic loss.

Prerequisites

An OSPF process has been created and the OSPF view has been displayed using the ospf command.

Example

# Configure the routes with a TE tunnel interface as the outbound interface to be preferentially selected to load-balance traffic in OSPF process 1.
<HUAWEI> system-view
[~HUAWEI] ospf 1
[*HUAWEI-ospf-1] ecmp prefer te-tunnel
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >