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

How to import Putty Saved Connections to mRemoteNG

Just started using mRemoteNG and its being very cool to connect to different remote connection with different protocols e.g Window Remote Desktop, VNC to Linux, SSH, HTTP connection etc. from a single application. As new user I configured some remote desktop connection which was quite easy to figure out. But when I wanted to add SSH connections, it came in my mind to import all of the saved connections in the putty. But I couldn't figure it out how can it be done, though it was quite easy and here are the steps. Open your mRemoteNG Create a folder if you want segregation of multiple networks Create a new connection Enter the IP address of remote server under connection in Config pane Under the config pane, select protocol " SSH version 2 ".  Once you select protocol to SSH version 2 you are given option to import putty sessions, as shown in the snap below. In the above snap, I have imported CSR-AWS session from my saved sessions in Putty.

Authoritative DNS Servers Delegation and Internal DNS Explained

DNS (Domain Name System) plays a critical role in how users and systems find resources on the internet or within internal networks. Whether it's managing an internal domain in an enterprise or delegating parts of a domain for traffic distribution, DNS setups vary widely depending on needs. In this blog post, we’ll break down the different types of DNS setups, including authoritative DNS servers, DNS delegation, and how internal DNS functions within organizations. 1. Authoritative DNS Server An Authoritative DNS server is the final source of truth for a specific domain. When someone queries a domain (e.g., example.com ), the authoritative DNS server for that domain holds the DNS records (A records, CNAME, MX, etc.) and responds with the corresponding IP address. Key Points: Who can host it? Authoritative DNS servers are often hosted by domain registrars (e.g., GoDaddy, Namecheap) or cloud DNS providers (e.g., AWS Route 53, Cloudflare). However, organizations can also host their ...

BGP MED: Managing Inbound Traffic with Multi-Exit Discriminator

The Multi-Exit Discriminator (MED) is used in BGP to control inbound traffic into your AS. It tells a neighboring AS which entry point into your network it should prefer when there are multiple links between your AS and the neighboring AS. The lower the MED value , the more preferred the path. MED is only honored between the same neighboring AS . Example Scenario : You are connected to ISP1 via two routers, CE1 and CE2 , and want to control which router ISP1 uses to send traffic into your AS. Network Topology : CE1 (connected to ISP1): 10.0.1.1/30 CE2 (connected to ISP1): 10.0.2.1/30 iBGP Router (Internal) connected to both CE1 (10.0.1.2/30) and CE2 (10.0.2.2/30). Configuration on CE1 (Lower MED, More Preferred) : Create a route map to set the MED to 50 for CE1: route-map SET_MED permit 10 set metric 50 Apply this route map to the neighbor in the BGP configuration for CE1: router bgp 65001 neighbor 10.0.1.1 remote-as 65000 neighbor 10.0.1.1 route-map SET_MED out Configuratio...