Tuesday, May 19, 2009

BGP VPNv4 Route Reflector


By default, the BGP configuration done under bgp routing process will be applicable for IPv4 Unicast AFI. On the below topology, R2 and R4 acts as PE routers with VPN COKE configured. R3 acts as Route reflector for R2 and R4.



R2 Configuration:

-----------------------

router bgp 100

no synchronization

bgp router-id 100.1.2.2

bgp log-neighbor-changes

neighbor 100.1.3.3 remote-as 100

neighbor 100.1.3.3 update-source Loopback0

neighbor 150.1.12.1 remote-as 200

no auto-summary

!

address-family vpnv4

neighbor 100.1.3.3 activate

neighbor 100.1.3.3 send-community extended

exit-address-family

!

address-family ipv4 vrf COKE

redistribute ospf 1 vrf COKE match internal external 1 external 2

no synchronization

exit-address-family


R4 Configuration:

---------------------

router bgp 100

no synchronization

bgp router-id 100.1.4.4

bgp log-neighbor-changes

neighbor 100.1.3.3 remote-as 100

neighbor 100.1.3.3 update-source Loopback0

no auto-summary

!

address-family vpnv4

neighbor 100.1.3.3 activate

neighbor 100.1.3.3 send-community both

exit-address-family

!

address-family ipv4 vrf COKE

redistribute ospf 1 vrf COKE match internal external 1 external 2

no synchronization

exit-address-family


R3 Configuration:

---------------------

router bgp 100

no synchronization

bgp router-id 100.1.3.3

bgp log-neighbor-changes

neighbor 100.1.2.2 remote-as 100

neighbor 100.1.2.2 update-source Loopback0

neighbor 100.1.2.2 route-reflector-client

neighbor 100.1.4.4 remote-as 100

neighbor 100.1.4.4 update-source Loopback0

neighbor 100.1.4.4 route-reflector-client

no auto-summary

!

address-family vpnv4

neighbor 100.1.2.2 activate

neighbor 100.1.2.2 send-community both

neighbor 100.1.4.4 activate

neighbor 100.1.4.4 send-community both

exit-address-family


The above configuration shows that R3 is configured as Route reflector with R2 and R4 as clients. It can be noted that, the route reflection is not configured under VPNv4 AFI. So R3 will reflect only IPv4 BGP updates from R4 and R2 and not VPNv4.


R4#

R4#conf t

Enter configuration commands, one per line. End with CNTL/Z.

R4(config)#router bgp 100

R4(config-router)#network 100.1.4.4 mask 255.255.255.255

R4(config-router)#end

R4# sh ip bgp

BGP table version is 2, local router ID is 100.1.4.4

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

*> 100.1.4.4/32 0.0.0.0 0 32768 i

R4#

R2#sh ip bgp

BGP table version is 3, local router ID is 100.1.2.2

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

r>i100.1.4.4/32 100.1.4.4 0 100 0 i

R2#


The VPNv4 routes in R4 will not be present in R2’s BGP table,


R4#show ip bgp vpnv4 all 10.1.58.0

BGP routing table entry for 100:1:10.1.58.0/24, version 11

Paths: (1 available, best #1, table COKE)

Advertised to update-groups:

1

Local

10.1.46.6 (via COKE) from 0.0.0.0 (100.1.4.4)

Origin incomplete, metric 97, localpref 100, weight 32768, valid, sourced, best

Extended Community: RT:100:1 OSPF DOMAIN ID:0x0005:0x000000010200

OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:10.1.46.4:512

mpls labels in/out 22/nolabel

R4#

R2#show ip bgp vpnv4 all 10.1.58.0

% Network not in table

R2#


Now configuring route reflection in VPNv4 AFI will enable R3 to reflect VPNv4 routes between the clients.


R3#

R3#conf t

Enter configuration commands, one per line. End with CNTL/Z.

R3(config)#router bgp 100

R3(config-router)#address-family vpnv4

R3(config-router-af)#neighbor 100.1.2.2 route-reflector-client

R3(config-router-af)#neighbor 100.1.4.4 route-reflector-client

R3(config-router-af)#end

R3#

R4#show ip bgp vpnv4 all 10.1.58.0

BGP routing table entry for 100:1:10.1.58.0/24, version 11

Paths: (1 available, best #1, table COKE)

Advertised to update-groups:

1

Local

10.1.46.6 (via COKE) from 0.0.0.0 (100.1.4.4)

Origin incomplete, metric 97, localpref 100, weight 32768, valid, sourced, best

Extended Community: RT:100:1 OSPF DOMAIN ID:0x0005:0x000000010200

OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:10.1.46.4:512

mpls labels in/out 22/nolabel

R4#

R2#show ip bgp vpnv4 all 10.1.58.0

BGP routing table entry for 100:1:10.1.58.0/24, version 30

Paths: (1 available, best #1, table COKE)

Flag: 0x820

Not advertised to any peer

Local

100.1.4.4 (metric 30) from 100.1.3.3 (100.1.3.3)

Origin incomplete, metric 97, localpref 100, valid, internal, best

Extended Community: RT:100:1 OSPF DOMAIN ID:0x0005:0x000000010200

OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:10.1.46.4:512

Originator: 100.1.4.4, Cluster list: 100.1.3.3

mpls labels in/out nolabel/22

R2#

1 comment:

  1. Very well explained!!
    Thank you so much \. Please keep posting.

    ReplyDelete