The bestroute as-path-ignore command configures BGP to ignore the AS_Path attribute when it selects the optimal route.
The undo bestroute as-path-ignore command restores the default configuration.
By default, BGP uses the AS_Path attribute as one of route selection rules.
BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view
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.
Precautions
After the bestroute as-path-ignore command is run, the AS_Path attribute is not used as one of the BGP route selection rules.