This scenario is made in the GNS3 to practice MP-BGP/ MPLS L3 VPN. In this scenario customer A has 1 headquarter office and 2 remote sites and they want to connect their remote sites to the HQ office. Customer B and C also want to connect their networks together.

For all Routers:

For router Rx, IP addresses of internal links are in the 10.[AS].[xy].[x] format, IP addresses of Loopback 0 interfaces are in 10.[AS].0.x format and IP addresses of external links are in the 192.168.[y].[x] format.

Service Provider (AS 10):

AS 10 is a WAN service provider.

R1, R2, R9 and R10 are PE routers and R3, R4, R5, R6, R7 and R8 are P routers .

and R3, R4, R5, R6, R7 and R8 are . OSPF and LDP are activated on all internal links.

and are activated on all internal links. BGP for VPNv4 address family is configured between PE routers and iBGP neighborship is formed using IP addresses of loopback 0 interfaces.

for is configured between and iBGP neighborship is formed using IP addresses of loopback 0 interfaces. BGP for IPv4 unicast address family is not configured in this AS since AS 10 is not an Internet service provider.

for is not configured in this AS since AS 10 is not an Internet service provider. On PE routers different VRFs are configured for different customers.

Customer A (AS 20):

Customer A (AS 20) has 3 different sites.

Site 1 is dual homed and hosting 172.20.1.0/24. Site 2 is hosting 172.20.2.0/24 and site 3 is hosting 172.20.3.0/24 prefixes. These sites are connected through VPN service provided by AS 10.

AS 20’s CE routers are configured to form eBGP neighborship with AS 10 PE routers.

Customer B (AS 30):

Customer B (AS 30) is hosting 172.30.0.1.0/24 prefix.

AS 30’s CE router is configured to form EIGRP with AS 10 PE router .

is configured to form with AS 10 . Customer B (AS 30) and Customer C (AS 40) are connected through VPN service provided by AS 10.

Customer C (AS 40):

Customer C (AS 40) is hosting 172.40.0.1.0/24 prefix.

AS 40’s CE router is configured to form OSPF with AS 10 PE router.

is configured to form with AS 10 PE router. Customer B (AS 30) and Customer C (AS 40) are connected through VPN service provided by AS 10.

Configuration:

R1:

hostname R1 ! vrf definition VRF-AS20_SITE2 description Customer A - AS 20 - Site 2 rd 20:2 ! address-family ipv4 route-target export 20:9999 route-target import 20:9999 exit-address-family ! mpls label range 100 199 ! interface Loopback0 ip address 10.10.0.1 255.255.255.255 ! interface Ethernet0/0 vrf forwarding VRF-AS20_SITE2 ip address 192.168.11.1 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.13.1 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! router bgp 10 bgp log-neighbor-changes no bgp default ipv4-unicast neighbor 10.10.0.2 remote-as 10 neighbor 10.10.0.2 update-source Loopback0 neighbor 10.10.0.9 remote-as 10 neighbor 10.10.0.9 update-source Loopback0 neighbor 10.10.0.10 remote-as 10 neighbor 10.10.0.10 update-source Loopback0 ! address-family ipv4 exit-address-family ! address-family vpnv4 bgp additional-paths install bgp recursion host neighbor 10.10.0.2 activate neighbor 10.10.0.2 send-community extended neighbor 10.10.0.9 activate neighbor 10.10.0.9 send-community extended neighbor 10.10.0.10 activate neighbor 10.10.0.10 send-community extended exit-address-family ! address-family ipv4 vrf VRF-AS20_SITE2 neighbor 192.168.11.11 remote-as 20 neighbor 192.168.11.11 activate neighbor 192.168.11.11 as-override neighbor 192.168.11.11 soo 20:2 exit-address-family ! mpls ldp router-id Loopback0

R2:

hostname R2 ! vrf definition VRF-AS20_SITE3 description Customer A - AS 20 - Site 3 rd 20:3 ! address-family ipv4 route-target export 20:9999 route-target import 20:9999 exit-address-family ! mpls label range 200 299 ! interface Loopback0 ip address 10.10.0.2 255.255.255.255 ! interface Ethernet0/0 vrf forwarding VRF-AS20_SITE3 ip address 192.168.12.2 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.24.2 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! router bgp 10 bgp log-neighbor-changes no bgp default ipv4-unicast neighbor 10.10.0.1 remote-as 10 neighbor 10.10.0.1 update-source Loopback0 neighbor 10.10.0.9 remote-as 10 neighbor 10.10.0.9 update-source Loopback0 neighbor 10.10.0.10 remote-as 10 neighbor 10.10.0.10 update-source Loopback0 ! address-family ipv4 exit-address-family ! address-family vpnv4 bgp additional-paths install bgp recursion host neighbor 10.10.0.1 activate neighbor 10.10.0.1 send-community extended neighbor 10.10.0.9 activate neighbor 10.10.0.9 send-community extended neighbor 10.10.0.10 activate neighbor 10.10.0.10 send-community extended exit-address-family ! address-family ipv4 vrf VRF-AS20_SITE3 neighbor 192.168.12.12 remote-as 20 neighbor 192.168.12.12 activate neighbor 192.168.12.12 as-override neighbor 192.168.12.12 soo 20:3 exit-address-family ! mpls ldp router-id Loopback0

R3:

hostname R3 ! mpls label range 300 399 ! interface Loopback0 ip address 10.10.0.3 255.255.255.255 ! interface Ethernet0/0 ip address 10.10.35.3 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.13.3 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! mpls ldp router-id Loopback0

R4:

hostname R4 ! mpls label range 400 499 ! interface Loopback0 ip address 10.10.0.4 255.255.255.255 ! interface Ethernet0/0 ip address 10.10.46.4 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.24.4 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! mpls ldp router-id Loopback0

R5:

hostname R5 ! mpls label range 500 599 ! interface Loopback0 ip address 10.10.0.5 255.255.255.255 ! interface Ethernet0/0 ip address 10.10.35.5 255.255.255.0 ! interface Ethernet0/1 ip address 10.10.57.5 255.255.255.0 ! interface Ethernet0/2 ip address 10.10.56.5 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! mpls ldp router-id Loopback0

R6:

hostname R6 ! mpls label range 600 699 ! interface Loopback0 ip address 10.10.0.6 255.255.255.255 ! interface Ethernet0/0 ip address 10.10.46.6 255.255.255.0 ! interface Ethernet0/1 ip address 10.10.68.6 255.255.255.0 ! interface Ethernet0/2 ip address 10.10.56.6 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! mpls ldp router-id Loopback0

R7:

hostname R7 ! mpls label range 700 799 ! interface Loopback0 ip address 10.10.0.7 255.255.255.255 ! interface Ethernet0/1 ip address 10.10.57.7 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.79.7 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! mpls ldp router-id Loopback0

R8:

hostname R8 ! mpls label range 800 899 ! interface Loopback0 ip address 10.10.0.8 255.255.255.255 ! interface Ethernet0/1 ip address 10.10.68.8 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.108.8 255.255.255.0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! mpls ldp router-id Loopback0

R9:

hostname R9 ! vrf definition VRF-AS20_SITE1 description Customer A - AS 20 - Site 1 rd 20:1 ! address-family ipv4 route-target export 20:9999 route-target import 20:9999 exit-address-family ! vrf definition VRF-AS30_SITE1 description Customer B - AS 30 - Site 1 rd 30:1 ! address-family ipv4 route-target export 30:1 route-target import 40:1 exit-address-family ! mpls label range 900 999 ! interface Loopback0 ip address 10.10.0.9 255.255.255.255 ! interface Ethernet0/0 vrf forwarding VRF-AS30_SITE1 ip address 192.168.13.9 255.255.255.0 ! interface Ethernet0/1 vrf forwarding VRF-AS20_SITE1 ip address 192.168.15.9 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.79.9 255.255.255.0 ! router eigrp ROTR-EIGRP ! address-family ipv4 unicast vrf VRF-AS30_SITE1 autonomous-system 30 ! topology base redistribute bgp 10 metric 1 1 1 1 1 exit-af-topology network 0.0.0.0 exit-address-family ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! router bgp 10 bgp log-neighbor-changes no bgp default ipv4-unicast neighbor 10.10.0.1 remote-as 10 neighbor 10.10.0.1 update-source Loopback0 neighbor 10.10.0.2 remote-as 10 neighbor 10.10.0.2 update-source Loopback0 neighbor 10.10.0.10 remote-as 10 neighbor 10.10.0.10 update-source Loopback0 ! address-family ipv4 exit-address-family ! address-family vpnv4 bgp additional-paths install bgp recursion host neighbor 10.10.0.1 activate neighbor 10.10.0.1 send-community extended neighbor 10.10.0.2 activate neighbor 10.10.0.2 send-community extended neighbor 10.10.0.10 activate neighbor 10.10.0.10 send-community extended exit-address-family ! address-family ipv4 vrf VRF-AS20_SITE1 neighbor 192.168.15.15 remote-as 20 neighbor 192.168.15.15 activate neighbor 192.168.15.15 as-override neighbor 192.168.15.15 soo 20:1 exit-address-family ! address-family ipv4 vrf VRF-AS30_SITE1 redistribute eigrp 30 exit-address-family ! mpls ldp router-id Loopback0

R10:

hostname R10 ! vrf definition VRF-AS20_SITE1 description Customer A - AS 20 - Site 1 rd 20:1 ! address-family ipv4 route-target export 20:9999 route-target import 20:9999 exit-address-family ! vrf definition VRF-AS40_SITE1 description Customer C - AS 40 - Site 1 rd 40:1 ! address-family ipv4 route-target export 40:1 route-target import 30:1 exit-address-family ! mpls label range 1000 1099 ! interface Loopback0 ip address 10.10.0.10 255.255.255.255 ! interface Ethernet0/0 vrf forwarding VRF-AS40_SITE1 ip address 192.168.14.10 255.255.255.0 ! interface Ethernet0/1 vrf forwarding VRF-AS20_SITE1 ip address 192.168.16.10 255.255.255.0 ! interface Ethernet0/3 ip address 10.10.108.10 255.255.255.0 ! router ospf 40 vrf VRF-AS40_SITE1 redistribute bgp 10 subnets network 0.0.0.0 255.255.255.255 area 0 ! router ospf 10 mpls ldp sync mpls ldp autoconfig network 10.10.0.0 0.0.255.255 area 0 ! router bgp 10 bgp log-neighbor-changes no bgp default ipv4-unicast neighbor 10.10.0.1 remote-as 10 neighbor 10.10.0.1 update-source Loopback0 neighbor 10.10.0.2 remote-as 10 neighbor 10.10.0.2 update-source Loopback0 neighbor 10.10.0.9 remote-as 10 neighbor 10.10.0.9 update-source Loopback0 ! address-family ipv4 exit-address-family ! address-family vpnv4 bgp additional-paths install bgp recursion host neighbor 10.10.0.1 activate neighbor 10.10.0.1 send-community extended neighbor 10.10.0.2 activate neighbor 10.10.0.2 send-community extended neighbor 10.10.0.9 activate neighbor 10.10.0.9 send-community extended exit-address-family ! address-family ipv4 vrf VRF-AS20_SITE1 neighbor 192.168.16.16 remote-as 20 neighbor 192.168.16.16 activate neighbor 192.168.16.16 as-override neighbor 192.168.16.16 soo 20:1 exit-address-family ! address-family ipv4 vrf VRF-AS40_SITE1 redistribute ospf 40 exit-address-family ! mpls ldp router-id Loopback0

R11:

hostname R11 ! interface Loopback0 ip address 10.20.0.11 255.255.255.255 ! interface Loopback1 ip address 172.20.2.11 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.11.11 255.255.255.0 ! router bgp 20 bgp log-neighbor-changes network 172.20.2.0 mask 255.255.255.0 neighbor 192.168.11.1 remote-as 10

R12:

hostname R12 ! interface Loopback0 ip address 10.20.0.12 255.255.255.255 ! interface Loopback1 ip address 172.20.3.12 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.12.12 255.255.255.0 ! router bgp 20 bgp log-neighbor-changes network 172.20.3.0 mask 255.255.255.0 neighbor 192.168.12.2 remote-as 10

R13:

hostname R13 ! interface Loopback0 ip address 10.30.0.13 255.255.255.255 ! interface Loopback1 ip address 172.30.1.13 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.13.13 255.255.255.0 ! router eigrp 30 network 0.0.0.0

R14:

hostname R14 ! interface Loopback0 ip address 10.40.0.14 255.255.255.255 ! interface Loopback1 ip address 172.40.1.14 255.255.255.0 ! interface Ethernet0/0 ip address 192.168.14.14 255.255.255.0 ! router ospf 40 network 0.0.0.0 255.255.255.255 area 0

R15:

hostname R15 ! interface Loopback0 ip address 10.20.0.15 255.255.255.255 ! interface Ethernet0/0 ip address 10.20.57.15 255.255.255.0 ! interface Ethernet0/1 ip address 192.168.15.15 255.255.255.0 ! router eigrp 20 network 10.20.0.0 0.0.255.255 ! router bgp 20 bgp log-neighbor-changes neighbor 10.20.0.16 remote-as 20 neighbor 10.20.0.16 update-source Loopback0 neighbor 10.20.0.16 next-hop-self neighbor 10.20.0.17 remote-as 20 neighbor 10.20.0.17 update-source Loopback0 neighbor 10.20.0.17 next-hop-self neighbor 192.168.15.9 remote-as 10

R16:

hostname R16 ! interface Loopback0 ip address 10.20.0.16 255.255.255.255 ! interface Ethernet0/1 ip address 192.168.16.16 255.255.255.0 ! interface Ethernet0/2 ip address 10.20.67.16 255.255.255.0 ! router eigrp 20 network 10.20.0.0 0.0.255.255 ! router bgp 20 bgp log-neighbor-changes neighbor 10.20.0.15 remote-as 20 neighbor 10.20.0.15 update-source Loopback0 neighbor 10.20.0.15 next-hop-self neighbor 10.20.0.17 remote-as 20 neighbor 10.20.0.17 update-source Loopback0 neighbor 10.20.0.17 next-hop-self neighbor 192.168.16.10 remote-as 10

R17:

hostname R17 ! interface Loopback0 ip address 10.20.0.17 255.255.255.255 ! interface Loopback1 ip address 172.20.1.17 255.255.255.0 ! interface Ethernet0/0 ip address 10.20.57.17 255.255.255.0 ! interface Ethernet0/2 ip address 10.20.67.17 255.255.255.0 ! router eigrp 20 network 10.20.0.0 0.0.255.255 ! router bgp 20 bgp log-neighbor-changes network 172.20.1.0 mask 255.255.255.0 neighbor 10.20.0.15 remote-as 20 neighbor 10.20.0.15 update-source Loopback0 neighbor 10.20.0.16 remote-as 20 neighbor 10.20.0.16 update-source Loopback0