balance as-path-relax

Use balance as-path-relax to enable load balancing for routes that have different AS_PATH attributes of the same length.

Use undo balance as-path-relax to restore the default.

Syntax

balance as-path-relax

undo balance as-path-relax

Default

BGP cannot perform load balancing for routes that have different AS_PATH attributes of the same length.

Views

BGP IPv4 unicast address family view

BGP-VPN IPv4 unicast address family view

BGP IPv6 unicast address family view

BGP-VPN IPv6 unicast address family view

BGP IPv4 multicast address family view

BGP IPv6 multicast address family view

Predefined use roles

network-admin

Usage guidelines

For BGP to perform load balancing for routes with different AS_PATH attributes of the same length, you must use this command together with the balance command.

If you configure both the balance as-path-relax and balance as-path-neglect commands, the balance as-path-neglect command takes effect.

After this command is executed, BGP ignores the AS_PATH attributes in the routes for load balancing and changes the attributes of the advertised routes to those of the optimal route. This might cause routing loops and affect Netstream statistics. Therefore, use this command with caution.

Examples

# In BGP IPv4 unicast address family view, enable load balancing for routes that have different AS_PATH attributes of the same length.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] balance as-path-relax