The issue with iBGP VPNv4 routes with route-reflector

Hi @Network_Eric

i`m using this simple topology
iBGP peering with VPNv4
R1 and R4 are both an ibgp peerings

R2 and R4 are both an ibgp peerings

R1 configuration

R1#show running-config
ip vrf cust-a
rd 1:1
route-target export 1:1
route-target import 1:1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
ip vrf forwarding cust-a
ip address 192.168.1.100 255.255.255.255
!
interface FastEthernet0/0
no ip address
!
interface FastEthernet0/0.14
encapsulation dot1Q 14
ip address 10.1.14.1 255.255.255.0
!
router bgp 1
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf cust-a
redistribute connected route-map ine
exit-address-family
!
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0.14 10.1.14.4
!
!
ip prefix-list test seq 5 permit 192.168.1.100/32
no cdp log mismatch duplex
!
route-map ine permit 10
match ip address prefix-list test
set metric 111
R2 configuration

R2#show running-config
ip vrf cust-b
rd 2:1
route-target export 1:1
route-target import 1:1
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
ip vrf forwarding cust-b
ip address 192.168.1.100 255.255.255.255
!interface FastEthernet0/0.24
encapsulation dot1Q 24
ip address 10.1.24.2 255.255.255.0
!
router bgp 1
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf cust-b
redistribute connected route-map ine
exit-address-family
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0.24 10.1.24.4
!
!
ip prefix-list test seq 5 permit 192.168.1.100/32
route-map ine permit 10
match ip address prefix-list test
set metric 222
!
and R4 configuration

R4#show running-config
ip vrf cust-a
rd 1:1
route-target export 1:1
route-target import 1:1
!
ip vrf cust-b
rd 2:1
route-target export 1:1
route-target import 1:1
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0.14
encapsulation dot1Q 14
ip address 10.1.14.4 255.255.255.0
!
interface FastEthernet0/0.24
encapsulation dot1Q 24
ip address 10.1.24.4 255.255.255.0
!
router bgp 1
bgp router-id 4.4.4.4
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
ip route 1.1.1.1 255.255.255.255 FastEthernet0/0.14 10.1.14.1
ip route 2.2.2.2 255.255.255.255 FastEthernet0/0.24 10.1.24.2
!
so far so good.

R4#show ip bgp vpnv4 all
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf cust-a)

  • i 192.168.1.100/32 2.2.2.2 222 100 0 ?
    *>i 1.1.1.1 111 100 0 ?
    Route Distinguisher: 2:1 (default for vrf cust-b)
  • i 192.168.1.100/32 2.2.2.2 222 100 0 ?
    *>i 1.1.1.1 111 100 0 ?
    R4 learned 192.168.1.100/32 on both vrf cust-a because i configred import 1:1 on vrf cust-a and vrf cust-b becauase i also configured that vrf with RT import 1:1

and the best path selection process is happened on each vrf independently.

but the question is, why the best path on R4 for 192.168.1.100/32 is R1 for both vrf cust-a and vrf cust-b on R4 ? is that because R4 learned this ibgp update from R1 first ?i mean is that because of the timing ?

================

R4#show ip bgp vpnv4 all 192.168.1.100/32
BGP routing table entry for 1:1:192.168.1.100/32, version 18
Paths: (2 available, best #2, table cust-a)
Not advertised to any peer
Refresh Epoch 1
Local, imported safety path from 2:1:192.168.1.100/32
2.2.2.2 from 2.2.2.2 (2.2.2.2)
Origin incomplete, metric 222, localpref 100, valid, internal
Extended Community: RT:1:1
mpls labels in/out nolabel/16
Refresh Epoch 1
Local
1.1.1.1 from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 111, localpref 100, valid, internal, best
Extended Community: RT:1:1
mpls labels in/out nolabel/16
BGP routing table entry for 2:1:192.168.1.100/32, version 17
Paths: (2 available, best #2, table cust-b)
Not advertised to any peer
Refresh Epoch 1
Local
2.2.2.2 from 2.2.2.2 (2.2.2.2)
Origin incomplete, metric 222, localpref 100, valid, internal
Extended Community: RT:1:1
mpls labels in/out nolabel/16
Refresh Epoch 1
Local, imported path from 1:1:192.168.1.100/32
1.1.1.1 from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 111, localpref 100, valid, internal, best
Extended Community: RT:1:1
mpls labels in/out nolabel/16
R4#
in this output, what is the meaning of “…imported safety path from”?

================

what is the difference between

“…imported safety path from”

vs.

“…imported path from” ?

where is the “safety” keyword?

====================

after i configured R4 to be RR-server

R4(config)#router bgp 1

R4(config-router)# neighbor 2.2.2.2 route-reflector-client

R4(config-router)# neighbor 1.1.1.1 route-reflector-client

R1#show ip bgp vpnv4 all
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf cust-a)
*> 192.168.1.100/32 0.0.0.0 111 32768 ?
why R4 does not reflected 192.168.1.100/32 on R2 and send it to R1 ?

Hey Major,

The safety path is because you actual have a secondary route stored for the path. This is because you have a different RD, so it’s essentially a backup path.

For the reason this is not working, it’s because you placed the RR config under the BGP process, which defaults to the ipv4 address family. RR configuration needs to be don under the vpnv4 address family when working with VPNv4.

1 Like

@Network_Eric
R4(config)#router bgp 1
R4(config-router)#no neighbor 2.2.2.2 route-reflector-client
R4(config-router)#no neighbor 1.1.1.1 route-reflector-client

R4(config-router)# address-family vpnv4
R4(config-router-af)# neighbor 1.1.1.1 route-reflector-client
R4(config-router-af)# neighbor 2.2.2.2 route-reflector-client

R1#show ip bgp vpnv4 all
BGP table version is 4, local router ID is 1.1.1.1
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf cust-a)
*> 192.168.1.100/32 0.0.0.0 111 32768 ?

R2#show ip bgp vpnv4 all
BGP table version is 5, local router ID is 2.2.2.2

 Network          Next Hop            Metric LocPrf Weight Path

Route Distinguisher: 1:1
*>i 192.168.1.100/32 1.1.1.1 111 100 0 ?
Route Distinguisher: 2:1 (default for vrf cust-b)

  • i 192.168.1.100/32 1.1.1.1 111 100 0 ?
    *> 0.0.0.0 222 32768 ?

R4 reflects 192.168.1.100/32 to R2 . but why he didn`t reflects it to R1?