02-08-2021 12:17 AM
As per the below topology, I increased local preference from R9 toward R6 for outbound traffic. But it is not reflected on R6.
Below is the output for R9 and R6:
R9#sh run | s route-map LP
neighbor 192.168.1.2 route-map LP in
route-map LP permit 10
set local-preference 500
route-map LP permit 20
R9#sh ip bgp
BGP table version is 9, local router ID is 9.9.9.9
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 9.9.9.9/32 0.0.0.0 0 32768 i
*>i10.10.10.10/32 17.0.0.1 0 100 0 4755 200 i
*>i16.0.0.0/30 192.168.1.2 0 500 0 i
*>i17.0.0.0/30 192.168.1.3 0 100 0 i
*>i28.0.0.0/30 17.0.0.1 0 100 0 4755 200 i
*>i38.0.0.0/30 17.0.0.1 0 100 0 4755 200 i
*>i172.31.1.0/30 17.0.0.1 0 100 0 4755 200 i
*> 192.168.1.0/29 0.0.0.0 0 32768 i
R9:
R6#sh ip bgp
BGP table version is 24, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i9.9.9.9/32 192.168.1.1 0 100 0 i
* 10.10.10.10/32 16.0.0.1 0 4755 200 i
*>i 17.0.0.1 0 100 200 4755 200 i
*> 16.0.0.0/30 0.0.0.0 0 32768 i
*>i17.0.0.0/30 192.168.1.3 0 100 200 i
* 28.0.0.0/30 16.0.0.1 0 4755 200 i
*>i 17.0.0.1 0 100 200 4755 200 i
* 38.0.0.0/30 16.0.0.1 0 4755 200 i
*>i 17.0.0.1 0 100 200 4755 200 i
* 172.31.1.0/30 16.0.0.1 0 4755 200 i
*>i 17.0.0.1 0 100 200 4755 200 i
r>i192.168.1.0/29 192.168.1.1 0 100 0 i
R6#sh ip bgp neigh 192.168.1.1 received-routes
BGP table version is 24, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i9.9.9.9/32 192.168.1.1 0 100 0 i
r>i192.168.1.0/29 192.168.1.1 0 100 0 i
Total number of prefixes 2
Solved! Go to Solution.
02-08-2021 01:38 AM - edited 02-08-2021 01:39 AM
Hello @Rinam Shah ,
what you see is normal because R6 is actually the neighbor for whom you rise the local preference on R9.
on R9 it works:
*>i16.0.0.0/30 192.168.1.2 0 500 0 i
Now the route 16.0.0.0/30 is injected into BGP on R6, as a result of this the locally injected route has weight 32,768
>> *> 16.0.0.0/30 0.0.0.0 0 32768 i
On the other hand R9 will not send back the advertisement to R6 as it has learned the prefix from it, however even if R9 would do it, R6 would still prefer the locally injected route as Cisco weight is a criteria considered first then local preference in the BGP best path selection.
Hope to help
Giuseppe
02-08-2021 12:31 AM
Could you post the output on R6, R7, and R9 of the command show ip bgp neighbor
02-08-2021 01:38 AM - edited 02-08-2021 01:39 AM
Hello @Rinam Shah ,
what you see is normal because R6 is actually the neighbor for whom you rise the local preference on R9.
on R9 it works:
*>i16.0.0.0/30 192.168.1.2 0 500 0 i
Now the route 16.0.0.0/30 is injected into BGP on R6, as a result of this the locally injected route has weight 32,768
>> *> 16.0.0.0/30 0.0.0.0 0 32768 i
On the other hand R9 will not send back the advertisement to R6 as it has learned the prefix from it, however even if R9 would do it, R6 would still prefer the locally injected route as Cisco weight is a criteria considered first then local preference in the BGP best path selection.
Hope to help
Giuseppe
02-08-2021 05:43 AM
Thanks Giuseppe.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide