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
Post a Comment