Skip to main content

Basic MPLS BGP and L3VPN Lab Setup

In this lab, we’ve set up a basic MPLS, BGP, and L3VPN environment, which is a great foundation for understanding how service providers build scalable networks. The lab uses the EVE-NG simulator along with Router IOS C7200-ADVENTERPRISEK9-M, Version 15.2(4)M8 to emulate a realistic MPLS environment. Below is a summary of the key components and roles of each router in the lab.



MPLS Core Routers:

The MPLS core consists of the routers responsible for label switching and forwarding customer traffic through the network:

  • PE1 (Provider Edge 1): Connects customer networks to the MPLS core and handles both MPLS and BGP routing. It also hosts VRF (Virtual Routing and Forwarding) instances for customers.
  • PE2 (Provider Edge 2): Functions similarly to PE1, connecting another customer network to the MPLS core.
  • P1 (Core Router 1) and P2 (Core Router 2): These routers serve as MPLS core routers and handle label switching but do not store or process customer routes directly. They simply forward packets through the core using MPLS.

OSPF for Internal Routing:

  • OSPF is used as the IGP (Interior Gateway Protocol) within the MPLS core to manage routing between PE and P routers. OSPF advertises loopback addresses and forms adjacencies between P1, P2, PE1, and PE2, which are critical for MPLS label distribution.
  • OSPF is also used to share routes between customer edge (CE) routers and provider edge (PE) routers.

Route Reflectors (RR1, RR2):

  • RR1 and RR2 are used as BGP Route Reflectors to manage route distribution between the PE routers. This eliminates the need for a full iBGP mesh by reflecting BGP routes to the appropriate PE routers.
  • These routers do not participate in MPLS label switching and are solely for route reflection in BGP.

Summary of the Lab Setup:

  • The MPLS Core consists of PE1, PE2, P1, and P2, which handle MPLS traffic forwarding and switching.
  • OSPF is used for internal routing and to advertise loopback addresses required for BGP and MPLS label distribution.
  • RR1 and RR2 are responsible for BGP route reflection between PE routers, but they do not handle MPLS traffic.

This lab was created using the EVE-NG simulator and the C7200-ADVENTERPRISEK9-M, Version 15.2(4)M8 IOS image. The topology provides a solid understanding of how MPLS, BGP, and L3VPN work together in a service provider network.

In the following sections of the blog, I will be copying and pasting the running configurations from all the routers in the lab. This will allow you to easily replicate the setup for learning or practice purposes.

RR1 Router Configurations

hostname RR1

!

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

!

interface Ethernet1/0

 ip address 10.1.1.1 255.255.255.252

 duplex full

!

interface Ethernet1/1

 ip address 10.1.2.1 255.255.255.252

 duplex full

!

router ospf 1

 router-id 1.1.1.1

 network 1.1.1.1 0.0.0.0 area 0

 network 10.1.1.0 0.0.0.3 area 0

 network 10.1.2.0 0.0.0.3 area 0

!

router bgp 6501

 bgp log-neighbor-changes

 neighbor 3.3.3.3 remote-as 6501

 neighbor 3.3.3.3 update-source Loopback0

 neighbor 4.4.4.4 remote-as 6501

 neighbor 4.4.4.4 update-source Loopback0

 !

 address-family ipv4

  neighbor 3.3.3.3 activate

  neighbor 3.3.3.3 route-reflector-client

  neighbor 4.4.4.4 activate

  neighbor 4.4.4.4 route-reflector-client

 exit-address-family

 !

 address-family vpnv4

  neighbor 3.3.3.3 activate

  neighbor 3.3.3.3 send-community both

  neighbor 3.3.3.3 route-reflector-client

  neighbor 4.4.4.4 activate

  neighbor 4.4.4.4 send-community both

  neighbor 4.4.4.4 route-reflector-client

 exit-address-family

!


RR2 - Router Configurations

hostname RR2

!

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

!

interface Ethernet1/0

 ip address 10.2.1.1 255.255.255.252

 duplex full

!

interface Ethernet1/1

 ip address 10.2.2.1 255.255.255.252

 duplex full

!

router ospf 1

 router-id 2.2.2.2

 network 2.2.2.2 0.0.0.0 area 0

 network 10.2.1.0 0.0.0.3 area 0

 network 10.2.2.0 0.0.0.3 area 0

!

router bgp 6501

 bgp log-neighbor-changes

 neighbor 3.3.3.3 remote-as 6501

 neighbor 3.3.3.3 update-source Loopback0

 neighbor 4.4.4.4 remote-as 6501

 neighbor 4.4.4.4 update-source Loopback0

 !

 address-family ipv4

  neighbor 3.3.3.3 activate

  neighbor 3.3.3.3 route-reflector-client

  neighbor 4.4.4.4 activate

  neighbor 4.4.4.4 route-reflector-client

 exit-address-family

 !

 address-family vpnv4

  neighbor 3.3.3.3 activate

  neighbor 3.3.3.3 send-community both

  neighbor 3.3.3.3 route-reflector-client

  neighbor 4.4.4.4 activate

  neighbor 4.4.4.4 send-community both

  neighbor 4.4.4.4 route-reflector-client

 exit-address-family

!


P1 Router Configurations

hostname P1

!

interface Loopback0

 ip address 5.5.5.5 255.255.255.255

!

interface Ethernet1/0

 ip address 10.1.1.2 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet1/1

 ip address 10.2.1.2 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet1/2

 ip address 10.3.1.2 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet2/0

 ip address 10.5.1.1 255.255.255.252

 duplex full

 mpls ip

!

router ospf 1

 router-id 5.5.5.5

 network 5.5.5.5 0.0.0.0 area 0

 network 10.1.1.0 0.0.0.3 area 0

 network 10.2.1.0 0.0.0.3 area 0

 network 10.3.1.0 0.0.0.3 area 0

 network 10.5.1.0 0.0.0.3 area 0

!


P2 Router Configurations

hostname P2

!

interface Loopback0

 ip address 6.6.6.6 255.255.255.255

!

interface Ethernet1/0

 ip address 10.1.2.2 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet1/1

 ip address 10.2.2.2 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet1/2

 ip address 10.4.1.2 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet2/0

 ip address 10.5.1.2 255.255.255.252

 duplex full

 mpls ip

!

router ospf 1

 router-id 6.6.6.6

 network 6.6.6.6 0.0.0.0 area 0

 network 10.1.2.0 0.0.0.3 area 0

 network 10.2.2.0 0.0.0.3 area 0

 network 10.4.1.0 0.0.0.3 area 0

 network 10.5.1.0 0.0.0.3 area 0

!


PE1 Router Configurations

!

hostname PE1

!

ip vrf CUSTOMER1

 rd 100:1

 route-target export 100:1

 route-target import 100:1

!

interface Loopback0

 ip address 3.3.3.3 255.255.255.255

!

interface Loopback1

 ip address 172.16.3.3 255.255.255.255

!

interface Ethernet1/0

 ip address 10.3.1.1 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet1/2

 ip vrf forwarding CUSTOMER1

 ip address 192.168.1.1 255.255.255.0

 duplex full

!

router ospf 1

 router-id 3.3.3.3

 network 3.3.3.3 0.0.0.0 area 0

 network 10.3.1.0 0.0.0.3 area 0

!

router bgp 6501

 bgp log-neighbor-changes

 neighbor 1.1.1.1 remote-as 6501

 neighbor 1.1.1.1 update-source Loopback0

 neighbor 2.2.2.2 remote-as 6501

 neighbor 2.2.2.2 update-source Loopback0

 !

 address-family ipv4

  redistribute connected

  neighbor 1.1.1.1 activate

  neighbor 2.2.2.2 activate

 exit-address-family

 !

 address-family vpnv4

  neighbor 1.1.1.1 activate

  neighbor 1.1.1.1 send-community both

  neighbor 2.2.2.2 activate

  neighbor 2.2.2.2 send-community both

 exit-address-family

 !

 address-family ipv4 vrf CUSTOMER1

  redistribute connected

 exit-address-family

!


PE2 Router Configurations

hostname PE2

!

ip vrf CUSTOMER1

 rd 100:1

 route-target export 100:1

 route-target import 100:1

!

interface Loopback0

 ip address 4.4.4.4 255.255.255.255

!

interface Ethernet1/0

 ip address 10.4.1.1 255.255.255.252

 duplex full

 mpls ip

!

interface Ethernet1/2

 ip vrf forwarding CUSTOMER1

 ip address 192.168.2.1 255.255.255.0

 duplex full

!

router ospf 1

 router-id 4.4.4.4

 network 4.4.4.4 0.0.0.0 area 0

 network 10.4.1.0 0.0.0.3 area 0

!

router bgp 6501

 bgp log-neighbor-changes

 neighbor 1.1.1.1 remote-as 6501

 neighbor 1.1.1.1 update-source Loopback0

 neighbor 2.2.2.2 remote-as 6501

 neighbor 2.2.2.2 update-source Loopback0

 !

 address-family ipv4

  neighbor 1.1.1.1 activate

  neighbor 2.2.2.2 activate

 exit-address-family

 !

 address-family vpnv4

  neighbor 1.1.1.1 activate

  neighbor 1.1.1.1 send-community both

  neighbor 2.2.2.2 activate

  neighbor 2.2.2.2 send-community both

 exit-address-family

 !

 address-family ipv4 vrf CUSTOMER1

  redistribute connected

 exit-address-family

 !


CE1 Router Configurations

hostname CE1

!

interface Loopback0

 ip address 7.7.7.7 255.255.255.255

!

interface Ethernet1/0

 ip address 192.168.1.2 255.255.255.0

 duplex full

!

ip route 0.0.0.0 0.0.0.0 192.168.1.1

!


CE Router Configurations

!

hostname CE2

!

interface Loopback0

 ip address 8.8.8.8 255.255.255.255

!

interface Ethernet1/0

 ip address 192.168.2.2 255.255.255.0

 duplex full

!

ip route 0.0.0.0 0.0.0.0 192.168.2.1

!

Comments

Popular posts from this blog

OSPF Adjacency Stuck in EXSTART on Cisco IOS XR – Issue and Solution

In a recent lab setup using Cisco IOS XR on EVE-NG, I faced a common but frustrating issue with OSPF adjacencies getting stuck in the EXSTART state. After spending considerable time troubleshooting interface MTUs and configurations, I discovered that the root cause was related to the virtual network interface type being used. This post outlines the issue, troubleshooting steps, and the eventual solution that got everything working. Issue: While configuring OSPF between two routers running Cisco IOS XR in my lab, OSPF adjacencies were getting stuck in the EXSTART state. I verified that interface configurations, MTU settings, and OSPF parameters were correct, but the problem persisted. I tried adjusting the MTU size, using the mtu-ignore command, and even checked for ACLs, but nothing seemed to resolve the issue. Troubleshooting Steps: MTU Settings: I started by verifying that both sides of the OSPF adjacency had matching MTUs. I used the default MTU and even tried different values wit

How to Properly Clone an EVE-NG Lab with Configurations

Cloning labs in EVE-NG is a great way to duplicate setups and expand or experiment on a new copy without affecting the original lab. However, if not done correctly, the cloned lab may only copy the topology without configurations. In this guide, I’ll show you how to properly clone a lab in EVE-NG with all configurations using the EVE-NG GUI . Follow these steps to ensure that both the topology and router configurations are retained when cloning your lab. Steps to Clone an EVE-NG Lab with Configurations Save Running Configuration on All Devices In your original lab, make sure all devices have their configurations saved to NVRAM. Go into the CLI of each router and run the command: copy running-config startup-config Export All Configurations (CFGs) On the left sidebar in the EVE-NG Web UI , click on the "More Actions" option. Then select "Export all CFGs" . This step exports the configurations of all devices in the lab. Shutdown All Devices After exporting the confi