Ad Home

MPLS - BGP - VRF - Route Reflector Lab

Share:
R4_PE1

hostname R4_PE1
!
!Creacion de la vrf
ip vrf Cust_A
 description Customer-A
 rd 1:100
 route-target export 1:100
 route-target import 1:100
!
interface Loopback0
 ip address 10.0.0.4 255.255.255.255
!
! interfaces hablando mpls contra los Route Reflector
interface FastEthernet0/0
 ip address 10.14.0.4 255.255.255.0
 mpls ip
!
interface FastEthernet0/1
 ip address 10.24.0.4 255.255.255.0
 mpls ip
!
! inyectar esta subred en la tabla de ruteo de la VRF Cust_A
interface FastEthernet1/0
 ip vrf forwarding Cust_A
 ip address 10.34.0.4 255.255.255.0
!
! inyectar el proceso OSPF en tabla de ruteo de la VRF Cust_A
router ospf 192 vrf Cust_A
 log-adjacency-changes
 redistribute connected
 redistribute bgp 1 subnets
 network 10.34.0.4 0.0.0.0 area 0
!
! proceso OSPF para identificar las loopbacks de los PEs que hablan BGP
router ospf 1
 log-adjacency-changes
 network 10.0.0.4 0.0.0.0 area 0
 network 10.14.0.4 0.0.0.0 area 0
 network 10.24.0.4 0.0.0.0 area 0
!
! proceso BGP contra los Route reflector
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.0.0.1 remote-as 1
 neighbor 10.0.0.1 update-source Loopback0
 neighbor 10.0.0.2 remote-as 1
 neighbor 10.0.0.2 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 10.0.0.1 activate
 neighbor 10.0.0.1 send-community both
 neighbor 10.0.0.2 activate
 neighbor 10.0.0.2 send-community both
 exit-address-family
 !
 address-family ipv4 vrf Cust_A
 redistribute connected
 redistribute static
 redistribute ospf 192 vrf Cust_A
 no synchronization
 exit-address-family
!
end


R3_CE1

hostname R3_CE1
!
interface Loopback0
 ip address 10.0.0.3 255.255.255.255
!         
interface Loopback10
 ip address 192.168.10.1 255.255.255.0
!
interface Loopback20
 ip address 192.168.20.1 255.255.255.0
!
interface Loopback30
 ip address 192.168.30.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.34.0.3 255.255.255.0
!
router ospf 192
 log-adjacency-changes
 network 10.0.0.3 0.0.0.0 area 0
 network 10.34.0.3 0.0.0.0 area 0
 network 192.168.10.1 0.0.0.0 area 0
 network 192.168.20.1 0.0.0.0 area 0
 network 192.168.30.1 0.0.0.0 area 0
!
ip route 0.0.0.0 0.0.0.0 10.34.0.4
!
end


R5_PE2

hostname R5_PE2
!
ip vrf Cust_A
 description Customer-A
 rd 1:100
 route-target export 1:100
 route-target import 1:100
!
interface Loopback0
 ip address 10.0.0.5 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.15.0.5 255.255.255.0
 mpls ip
!
interface FastEthernet0/1
 ip address 10.25.0.5 255.255.255.0
 mpls ip
!
interface FastEthernet1/0
 ip vrf forwarding Cust_A
 ip address 10.56.0.5 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.5 0.0.0.0 area 0
 network 10.15.0.5 0.0.0.0 area 0
 network 10.25.0.5 0.0.0.0 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.0.0.1 remote-as 1
 neighbor 10.0.0.1 update-source Loopback0
 neighbor 10.0.0.2 remote-as 1
 neighbor 10.0.0.2 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 10.0.0.1 activate
 neighbor 10.0.0.1 send-community both
 neighbor 10.0.0.2 activate
 neighbor 10.0.0.2 send-community both
 exit-address-family
 !
 address-family ipv4 vrf Cust_A
 redistribute connected
 redistribute static
 no synchronization
 exit-address-family
!
end


R6_CE2

hostname R6_CE2
!
interface Loopback0
 ip address 10.0.0.6 255.255.255.255
!         
interface FastEthernet0/0
 ip address 10.56.0.6 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 10.56.0.5
!
end

R1_RR1

hostname R1_RR1
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
!         
interface FastEthernet0/0
 ip address 10.14.0.1 255.255.255.0
 mpls ip
!
interface FastEthernet0/1
 ip address 10.15.0.1 255.255.255.0
 mpls ip
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.1 0.0.0.0 area 0
 network 10.14.0.1 0.0.0.0 area 0
 network 10.15.0.1 0.0.0.0 area 0
!
router bgp 1
 bgp log-neighbor-changes
 neighbor RR1 peer-group
 neighbor RR1 remote-as 1
 neighbor 10.0.0.4 peer-group RR1
 neighbor 10.0.0.5 peer-group RR1
 !
 address-family ipv4
 no neighbor 10.0.0.4 activate
 no neighbor 10.0.0.5 activate
 no auto-summary
 no synchronization
 exit-address-family
 !
 address-family vpnv4
 neighbor RR1 send-community extended
 neighbor RR1 route-reflector-client
 neighbor 10.0.0.4 activate
 neighbor 10.0.0.5 activate
 exit-address-family
!
end

R2_RR2

hostname R2_RR2
!
interface Loopback0
 ip address 10.0.0.2 255.255.255.255
!         
interface FastEthernet0/0
 ip address 10.24.0.2 255.255.255.0
 mpls ip
!
interface FastEthernet0/1
 ip address 10.25.0.2 255.255.255.0
 mpls ip
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.2 0.0.0.0 area 0
 network 10.24.0.2 0.0.0.0 area 0
 network 10.25.0.2 0.0.0.0 area 0
!
router bgp 1
 bgp log-neighbor-changes
 neighbor RR2 peer-group
 neighbor RR2 remote-as 1
 neighbor 10.0.0.4 peer-group RR2
 neighbor 10.0.0.5 peer-group RR2
 !
 address-family ipv4
 no neighbor 10.0.0.4 activate
 no neighbor 10.0.0.5 activate
 no auto-summary
 no synchronization
 exit-address-family
 !
 address-family vpnv4
 neighbor RR2 send-community extended
 neighbor RR2 route-reflector-client
 neighbor 10.0.0.4 activate
 neighbor 10.0.0.5 activate
 exit-address-family
!
end
Verificacion

R5_PE2#sh ip route vrf Cust_A      

Routing Table: Cust_A
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     192.168.30.0/32 is subnetted, 1 subnets
B       192.168.30.1 [200/2] via 10.0.0.4, 00:35:18
     192.168.10.0/32 is subnetted, 1 subnets
B       192.168.10.1 [200/2] via 10.0.0.4, 00:35:03
     192.168.20.0/32 is subnetted, 1 subnets
B       192.168.20.1 [200/2] via 10.0.0.4, 00:35:18
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B       10.0.0.3/32 [200/2] via 10.0.0.4, 00:37:03
B       10.34.0.0/24 [200/0] via 10.0.0.4, 00:47:17
C       10.56.0.0/24 is directly connected, FastEthernet1/0
R5_PE2#

Ad Home