In this topology we will have 3 customer Sites. 2 of them connection to two different PEs routers in the same AS and another site connected to another PE router in a different AS.
Topology below and let's get started.
Relevant configurations are posted below.
RR - R1 |
R1#sh run Building configuration... ! hostname R1 ! ip cef !-- Turn on ip cef for mpls ! interface Loopback0 ip address 10.0.0.1 255.255.255.255 ! interface GigabitEthernet1/0 description Connected to R2 ip address 1.1.1.5 255.255.255.252 negotiation auto mpls ip !-- Turn on mpls on the interface ! interface GigabitEthernet2/0 description Connected to R3 ip address 1.1.1.1 255.255.255.252 negotiation auto mpls ip !-- Turn on mpls on the interface ! interface GigabitEthernet3/0 description Connected to R7 ip address 1.1.1.9 255.255.255.252 negotiation auto mpls ip !-- Turn on mpls on the interface ! router ospf 1 log-adjacency-changes redistribute connected subnets network 1.1.1.0 0.0.0.255 area 0 ! router bgp 100 no synchronization bgp log-neighbor-changes neighbor 10.0.0.2 remote-as 100 neighbor 10.0.0.2 update-source Loopback0 !-- iBGP with PE - R2 neighbor 10.0.0.3 remote-as 100 neighbor 10.0.0.3 update-source Loopback0 !-- iBGP with ASBR - R3 neighbor 10.0.0.7 remote-as 100 neighbor 10.0.0.7 update-source Loopback0 !-- iBGP with PE - R7 no auto-summary ! address-family vpnv4 neighbor 10.0.0.2 activate neighbor 10.0.0.2 send-community extended neighbor 10.0.0.2 route-reflector-client neighbor 10.0.0.3 activate neighbor 10.0.0.3 send-community extended neighbor 10.0.0.3 route-reflector-client neighbor 10.0.0.7 activate neighbor 10.0.0.7 send-community extended neighbor 10.0.0.7 route-reflector-client exit-address-family !-- Turn on address-family vpnv4 to carry VRF and other information. !-- Also enable route-reflector-client so iBGP routes will propgate throughout the AS ! mpls ldp router-id Loopback0 force ! !-- Lock down the ldp router-id mpls ip ! end |
PE - R7 |
R7#sh run Building configuration... ! hostname R7 ! ip cef ! ip vrf ONE rd 100:1 route-target export 100:1 route-target import 100:1 !-- Create VRF and export / import routes ! interface Loopback0 ip address 10.0.0.7 255.255.255.255 ! interface Loopback1 ip vrf forwarding ONE ip address 192.168.7.7 255.255.255.0 !-- Create loopback to emulate customer's network and assign it to VRF ONE ! interface GigabitEthernet1/0 description Connected to RR - R1 ip address 1.1.1.10 255.255.255.252 negotiation auto mpls ip !-- Turn on MPLS on this interface ! router ospf 1 log-adjacency-changes redistribute connected subnets network 1.1.1.0 0.0.0.255 area 0 ! router bgp 100 no synchronization no bgp default route-target filter bgp log-neighbor-changes neighbor 10.0.0.1 remote-as 100 neighbor 10.0.0.1 update-source Loopback0 !-- iBGP with RR - R1 no auto-summary ! address-family vpnv4 neighbor 10.0.0.1 activate neighbor 10.0.0.1 send-community extended !-- Turn on address-family vpnv4 to carry VRF and other information. exit-address-family ! address-family ipv4 vrf ONE redistribute connected no synchronization !-- Turn on ipv4 vrf to redistribute connected subnets so it can be sent over to RR - R1. exit-address-family ! mpls ldp router-id Loopback0 force ! mpls ip ! end |
ASBR - AS100 - R3 |
R3#sh run Building configuration... ! hostname R3 ! ip cef ! interface Loopback0 ip address 10.0.0.3 255.255.255.255 ! interface GigabitEthernet1/0 description Connected to RR - R1 ip address 1.1.1.2 255.255.255.252 negotiation auto mpls ip !-- Turn on MPLS on the interface ! interface GigabitEthernet2/0 description Connected to ASBR - AS200 - R4 ip address 3.3.3.1 255.255.255.252 negotiation auto mpls bgp forwarding !-- enable to receive MPLS packets ! router ospf 1 log-adjacency-changes redistribute connected subnets network 1.1.1.0 0.0.0.255 area 0 ! router bgp 100 no synchronization no bgp default route-target filter !-- This command is so the router can receive vpnv4 routes bgp log-neighbor-changes redistribute connected neighbor 3.3.3.2 remote-as 200 !-- eBGP peer with ASBR - AS200 - R4 neighbor 10.0.0.1 remote-as 100 neighbor 10.0.0.1 update-source Loopback0 !-- iBGP peer with RR - R1 no auto-summary ! address-family vpnv4 neighbor 3.3.3.2 activate neighbor 3.3.3.2 send-community both neighbor 10.0.0.1 activate neighbor 10.0.0.1 send-community extended exit-address-family !-- Turn on address-family vpnv4 to carry VRF and other information. ! mpls ldp router-id Loopback0 force ! mpls ip ! end |
RR - R1 |
R2#sh run hostname R2 ! ip cef !-- Turn this on for MPLS ! ip vrf ONE rd 100:1 route-target export 100:1 route-target import 100:1 !-- Create VRF and export / import routes ! interface Loopback0 ip address 10.0.0.2 255.255.255.255 ! interface Loopback1 ip vrf forwarding ONE ip address 192.168.2.2 255.255.255.0 !-- Create loopback to emulate customer site network and assign it to VRF ONE ! interface GigabitEthernet1/0 description Connected to RR - R1 ip address 1.1.1.6 255.255.255.252 negotiation auto mpls ip !-- Turn on MPLS on the interface ! router ospf 1 log-adjacency-changes redistribute connected subnets network 1.1.1.0 0.0.0.255 area 0 ! router bgp 100 no synchronization bgp log-neighbor-changes neighbor 10.0.0.1 remote-as 100 neighbor 10.0.0.1 update-source Loopback0 !- iBGP peer with RR - R1 no auto-summary ! address-family vpnv4 neighbor 10.0.0.1 activate neighbor 10.0.0.1 send-community extended exit-address-family !-- Enable vpnv4 to exchange VPN/VRF information ! address-family ipv4 vrf ONE redistribute connected no synchronization !-- redistribute connected ipv4 vrf ONE routes exit-address-family ! mpls ldp router-id Loopback0 force ! mpls ip ! end |
PE - R5 |
R5#sh run Building configuration... ! hostname R5 ! ip cef ! ip vrf TWO rd 100:1 route-target export 100:1 route-target import 100:1 !-- Create VRF and export / import routes ! interface Loopback0 ip address 10.0.1.5 255.255.255.255 ! interface Loopback1 ip vrf forwarding TWO ip address 192.168.77.1 255.255.255.0 !-- Create loopback to emulate customer's network and assign it to VRF TWO ! interface GigabitEthernet1/0 description Connected to RR - R6 ip address 2.2.2.6 255.255.255.252 negotiation auto mpls ip ! router ospf 1 log-adjacency-changes redistribute connected subnets network 2.2.2.0 0.0.0.255 area 0 ! router bgp 200 no synchronization no bgp default route-target filter bgp log-neighbor-changes redistribute connected neighbor 10.0.1.6 remote-as 200 neighbor 10.0.1.6 update-source Loopback0 no auto-summary ! address-family vpnv4 neighbor 10.0.1.6 activate neighbor 10.0.1.6 send-community both exit-address-family ! address-family ipv4 vrf TWO redistribute connected no synchronization exit-address-family ! mpls ldp router-id Loopback0 force ! mpls ip ! end |
ASBR - AS200 - R4 |
R4#sh run ! hostname R4 ! ip cef ! interface Loopback0 ip address 10.0.1.4 255.255.255.255 ! interface GigabitEthernet1/0 description Connected to ASBR - AS100 - R3 ip address 3.3.3.2 255.255.255.252 negotiation auto mpls bgp forwarding ! interface GigabitEthernet2/0 description Connected to RR - R6 ip address 2.2.2.1 255.255.255.252 negotiation auto mpls ip ! router ospf 1 log-adjacency-changes redistribute connected subnets network 2.2.2.0 0.0.0.255 area 0 ! router bgp 200 no bgp default ipv4-unicast no bgp default route-target filter bgp log-neighbor-changes neighbor 3.3.3.1 remote-as 100 neighbor 10.0.1.6 remote-as 200 neighbor 10.0.1.6 update-source Loopback0 ! address-family ipv4 redistribute connected neighbor 3.3.3.1 activate neighbor 10.0.1.6 activate no auto-summary no synchronization exit-address-family ! address-family vpnv4 neighbor 3.3.3.1 activate neighbor 3.3.3.1 send-community both neighbor 10.0.1.6 activate neighbor 10.0.1.6 send-community both exit-address-family ! mpls ldp router-id Loopback0 force ! mpls ip ! end |
RR - R6 |
R6#sh run Building configuration... ! ip cef !-- Turn this on for MPLS ! interface Loopback0 ip address 10.0.1.6 255.255.255.255 ! interface GigabitEthernet1/0 description Connected to PE - R5 ip address 2.2.2.5 255.255.255.252 negotiation auto mpls ip !-- Turn on MPLS on the interface ! interface GigabitEthernet2/0 Connected to ASBR - AS200 - R4 ip address 2.2.2.2 255.255.255.252 negotiation auto mpls ip !-- Turn on MPLS on the interface ! router ospf 1 log-adjacency-changes redistribute connected subnets network 2.2.2.0 0.0.0.255 area 0 ! router bgp 200 no synchronization bgp log-neighbor-changes neighbor 10.0.1.4 remote-as 200 neighbor 10.0.1.4 update-source Loopback0 !-- iBGP peer with ASBR - AS200 - R4 neighbor 10.0.1.5 remote-as 200 neighbor 10.0.1.5 update-source Loopback0 !-- iBGP peer with PE - R5 no auto-summary ! address-family vpnv4 neighbor 10.0.1.4 activate neighbor 10.0.1.4 send-community both neighbor 10.0.1.4 route-reflector-client neighbor 10.0.1.5 activate neighbor 10.0.1.5 send-community both neighbor 10.0.1.5 route-reflector-client exit-address-family ! !-- Turn on address-family vpnv4 to carry VRF and other information. !-- Also enable route-reflector-client so iBGP routes will propgate throughout the AS ! mpls ldp router-id Loopback0 force ! mpls ip ! end |
Let's verify.
Notice that I have connectivity from R2 to Loopback on R5 in AS200 and loopback on R7 in AS 100 |
CSC (Carriers supporting Carriers) .... Many more articles to come so stay tuned. "Join this site" on the right ----->
Great one !
ReplyDelete