< Home

bestroute as-path-ignore (BGP)

Function

The bestroute as-path-ignore command configures BGP to ignore the AS_Path when selecting the optimal route.

The undo bestroute as-path-ignore command restores to the default setting.

By default, BGP considers AS_Path as a condition when selecting the optimal route.

Format

bestroute as-path-ignore

undo bestroute as-path-ignore

Parameters

None

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv6 unicast address family view, BGP-IPv4 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the bestroute as-path-ignore command is used, BGP does not compare the AS_Path lengths of routes. By default, the route with the shortest AS_Path is preferred.

Configuration Impact

After the bestroute as-path-ignore command is run, the AS_Path attribute is not used as one of the BGP route selection rules.

Example

# Configure BGP to ignore the AS_Path when selecting the optimal route.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] bestroute as-path-ignore
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >