Local Preference Attribute and Route reflector


Hello Rene & Team,
The above topology was designed with Router reflector connecting towards multiple clients.
In our scenario R2 is the route reflector and R1,R3,R4 and R5 are clients. From R4 and R5 there was two ebgp connections towards AS-6.And we have advertised few networks from R6 belongs to AS -6 towards R4 and R5. Router 5 has configured with local preference value as 110 for two specific networks (6.6.6.6/32 and 7.7.7.7/32).And here the question is about the local preference attribute propagation with routes tagged within the AS-6 (local AS).
Configuration pasted below.

R5#show run | sec bgp
router bgp 5
 bgp router-id 5.5.5.5
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 5
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 192.168.56.2 remote-as 6
 !
 address-family ipv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 next-hop-self
  neighbor 2.2.2.2 additional-paths receive
  neighbor 192.168.56.2 activate
  neighbor 192.168.56.2 route-map PRIMARY_LINK in
 exit-address-family

R5#show run | sec route-map PRIMARY_LINK
  neighbor 192.168.56.2 route-map PRIMARY_LINK in
route-map PRIMARY_LINK permit 10
 match ip address 30
 set local-preference 110
route-map PRIMARY_LINK permit 20

R5#show access-lists 30   ----------->> This access list only permits the two networks with LP tagged.
Standard IP access list 30
    10 permit 6.6.6.6 (2 matches)       
    20 permit 7.7.7.7 



R4#show run | sec bgp
router bgp 5
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 5
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 2.2.2.2 additional-paths receive
 neighbor 192.168.46.2 remote-as 6
R4#
R4#
R4#

Router 6 bgp table has advertised three networks below mentioned.

 *>   6.6.6.6/32       0.0.0.0                  0         32768 i
 *>   7.7.7.7/32       0.0.0.0                  0         32768 i
 *>   8.8.8.8/32       0.0.0.0                  0         32768 i

So as per our configuration the first two networks will tagged with 110 and get injected inside the AS -5 or router 5 right? Then as usual it will propagate within the AS-5.Here the stuck i am facing.
Please check the below BGP tables of R4 ,R5 and R2

R4:

R4#show ip bgp

*>i  6.6.6.6/32       5.5.5.5                  0    110      0 6 i        ------- See this /this is received via R2 right?  
*                     192.168.46.2             0             0 6 i               =----- How this invalid and it is supposed to reach at RR -R2 right? Local preference comparison will done at which router R4 or R2?
*>i  7.7.7.7/32       5.5.5.5                  0    110      0 6 i
*                     192.168.46.2             0             0 6 i
* i  8.8.8.8/32       5.5.5.5                  0    100      0 6 i
*>                    192.168.46.2             0             0 6 i

BGP table of R5:

R5#

 *>   6.6.6.6/32       192.168.56.2             0    110      0 6 i
 *>   7.7.7.7/32       192.168.56.2             0    110      0 6 i
 *>   8.8.8.8/32       192.168.56.2             0             0 6 i

R2 bgp table:-

*>i  6.6.6.6/32       5.5.5.5                  0    110      0 6 i
*>i  7.7.7.7/32       5.5.5.5                  0    110      0 6 i
* ia 8.8.8.8/32       5.5.5.5                  0    100      0 6 i      --- leave about this Additional path.
*>i                   4.4.4.4                  0    100      0 6 i

Why the first two entries via 5.5.5.5 is only showing in R2?

R4 BGP table :

*>i  6.6.6.6/32       5.5.5.5                    0    110      0 6 i
*                     192.168.46.2               0             0 6 i          -----why these routes are not showing in R2?
*>i  7.7.7.7/32       5.5.5.5                    0    110      0 6 i
*                     192.168.46.2               0             0 6 i         ----- """"" SAME above

Can u please explain how the LP comparison flow happens based on this scenario?
Correct me if i am wrong .

Reagrds
Unni

Hello Unni

Like I stated in this post, BGP only shares the best path with its neighbors. R2 will not have all of the paths installed nor will it learn about all of the paths, even through it is the RR. R4 will have paths via R5 and directly via R6 installed in its routing table because one is learned via iBGP and the other via eBGP. Even so, R2 will only learn of the path via R5 since only the best path is shared, which is that via R5.

I hope this has been helpful!

Laz