cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3935
Views
0
Helpful
1
Replies

bgp bestpath as-path ignore

Hi, what does this command do?

1 Reply 1

Hello,

 

the AS_PATH attribute is the fourth in the list of BGP best path selection criteria. Have a look at the output of the BGP topology table below. There are two paths for network 5.5.5.5, and the one with the shortest path is selected:

 

R1#sh ip bgp topology *
For address family: IPv4 Unicast

BGP table version is 13, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 3.3.3.3/32 192.168.13.3 0 0 3 i
*> 5.5.5.5/32 192.168.12.2 0 2 5 i
*                    192.168.13.3 0 3 4 5 i

 

Now after entering the 'bgp bestpath as-path ignore' command (which is a hidden command I think), the as path no longer matters, and BGP looks at other attributes (such as the path with the lowest router id:

 

R1#sh ip bgp topology *
For address family: IPv4 Unicast

BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
*> 2.2.2.2/32 192.168.13.3 0 3 4 5 2 i
* 192.168.12.2 0 0 2 i
*> 3.3.3.3/32 192.168.13.3 0 0 3 i
* 192.168.12.2 0 2 5 4 3 i
*> 5.5.5.5/32 192.168.13.3 0 3 4 5 i
*                     192.168.12.2 0 2 5 i