NAME the VRF as"vpnA"
Use rd 100:1 both R4 and R5
Use OSPF as Routing protocal between PE to CE
Use MPBGP AS 100 to exchange customer prefix. Source all the updates using loopback 0 address
Address the need MPLS introduces of connecting partitioned OSPF backbone.
R1 must prefer the MPLS backbone about the other prefixes originated from site-B, Not in the case of R3
Make sure that MPLS backbone is preferred over other link between R1 and R2. Use the network YY.YY.100.x/24 to facilitate this.
The router of MPLS network shuld have the reachable for YY.YY.0.0
Solution
R4
###MPLS###
mpls ip
mpls label protocol ldp
mpls ldp router-id loopback 0 force
int e0/1
mpls ip
ip vrf vpnA
rd 100:1
route-target both 100:1
int e0/0
ip vrf forverding vpnA
ip add 1.1.128.130 255.255.255.224
R5
mpls ip
mpls label protocol ldp
mpls ldp router-id loopback 0 force
int e0/0
mpls ip
ip vrf vpnA
rd 100:1
route-target both 100:1
int e0/1
ip vrf forverding vpnA
ip add 1.1.0.130 255.255.255.224
-------------------------------------
###VRF###
R4
conf t
router ospf 100 vrf vpnA
router-id 40.40.40.40
redistribute bgp 100 subnets
network 1.1.128.130 0.0.0.0 area 1
router bgp 100
bgp router-id 1.1.4.4
bgp log-neighbor-changes
neighbor 1.1.5.5 remote-as 100
neighbor 1.1.5.5 update-source Loopback0
!
address-family vpnv4
neighbor 1.1.5.5 activate
neighbor 1.1.5.5 send-community extended
exit-address-family
!
address-family ipv4 vrf vpnA
redistribute ospf 100 match internal external 1 external 2
exit-address-family
R5
conf t
router ospf 100 vrf vpnA
router-id 50.50.50.50
network 1.1.0.130 0.0.0.0 area 51
router bgp 100
bgp router-id 1.1.5.5
bgp log-neighbor-changes
neighbor 1.1.4.4 remote-as 100
neighbor 1.1.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 1.1.4.4 activate
neighbor 1.1.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf vpnA
redistribute ospf 100 match internal external 1 external 2
exit-address-family
###Redistribution###
R4-R5
router ospf 100 vrf vpnA
redistribute bgp 100 subnets
router bgp 100
redistribut ospf 100 vrf vpnA match internal external 1 external 2
############Shame Link##################
R4
conf t
interface Loopback100
ip vrf forwarding vpnA
ip address 40.40.40.40 255.255.255.255
router bgp 100
address-family ipv4 vrf vpnA
network 40.40.40.40 mask 255.255.255.255
router ospf 100 vrf vpnA
area 1 sham-link 40.40.40.40 50.50.50.50 cost 1
R5
interface Loopback100
ip vrf forwarding vpnA
ip address 50.50.50.50 255.255.255.255
router bgp 100
address-family ipv4 vrf vpnA
network 50.50.50.50 mask 255.255.255.255
router ospf 100 vrf vpnA
area 1 sham-link 50.50.50.50 40.40.40.40 cost 1
V####irtual link####
R5
conf t
router ospf 100 vrf vpnA
area 51 virtual-link 1.1.7.7
SW1
conf t
router ospf 10
area 51 virtual-link 50.50.50.50