MPLS Lab
This lab will follow the process to create a basic MP-BGP MPLS topology. This will include underlay, and all configurations needed.
At the end there will be an extra portion to add another customer and VRF that is slightly different off of PE1. Configurations will be provided but hidden in a spoiler.
All devices are bare nodes with no config. If you have a 5 node free version of CML you can remove the desktop devices along with P2.
Lab download: MP-BGP MPLS Lab
Topology
Underlay
All provider routers (P/PE) will have an underlay of OSPF with MPLS LDP autoconfig enabled.
PE routers will use MP-BGP and VRF that redistribute into OSPF for those customers.
Out first step will be to setup the loopback interfaces, transit interfaces, and OSPF underlay. I will give the config for P1. P2, PE1, and PE2 will be configured in the same way with the necessary changes to the networks/interfaces.
(conf)#hostname P1
(conf)#int lo0
(config-if)# ip address 2.2.2.2 255.255.255.255
Transit interfaces
(conf)#int g0/0
(config-if)# ip address 172.16.1.5 255.255.255.252
(config-if)# ip ospf point-to-point
(config-if)# no shut
(conf)#int g0/1
(config-if)# ip address 172.16.1.2 255.255.255.252
(config-if)# ip ospf point-to-point
(config-if)# no shut
On PE routers do not advertise the 10.x.x.x. Remember the transit networks are /30 in this topology (use a /31 if you desire but remember to change configs as needed).
Advertising the loopbacks is needed, ask me how I know.....
If you do not do this routes will still be seen over the MP-BGP session and show up in the routing table but the MPLS dataplane will not work.
*The command mpls ldp autoconfig will auto configure the MPLS setup however you can set it up by hand if you so choose (mpls ip, mpls label protocol ldp etc). White paper :MPLS Commands
(conf)#router ospf "1"
(config-router)#no mpls ldp autoconfig
(config-router)#network "2.2.2.2" "0.0.0.0" area 0
(config-router)#network "172.16.1.2" "0.0.0.0" area 0
(config-router)#network "172.16.1.5" "0.0.0.0" area 0
iBGP overlay
We will now configure the iBGP overlay. This will be basic to confirm reachability then we will complete the MP-BGP and VRF portions followed by the customer side.
I will give the config for PE1, PE2 will have a similar config. This is iBGP on our PE routers only.
(conf)#router bgp 6500
(config-router)#bgp router-id 1.1.1.1
(config-router)#neighbor 4.4.4.4 remote-as 6500
(config-router)#neighbor 4.4.4.4 remote-as 6500
(config-router)#neighbor 4.4.4.4 update-source loopback 0
Now configure MP-BGP for vpnv4 address family between peers and activate. It may give an output for topology changes.
(conf)#router bgp 6500
(config-router)#address-family vpnv4
(config-router)#neighbor 4.4.4.4 activate
(config-router)#neighbor 4.4.4.4 activate
This now sets up bgp to use vpnv4 and carry the traffic over the underlay. However nothing shows up yet as we have not imported/exported any routes.
VRF
We will now configure the VRF for CUS1. In this case the configs will be the same for PE1 and PE2 but that may not always be the case.
Create the VRF and the route distinguisher for this customer.
(conf)#vrf definition CUS1
(config-router-vrf)#address-family ipv4
(config-router-vrf)#rd 6400:1
(config-router-vrf)#rd 6400:1
(config-router-vrf)#route-target both 6400:1
Add the interface going to the customer to the VRF.
(config)#int g0/0
(config-if)#vrf forwarding CUS1
(config-if)#ip address 10.0.0.1 255.255.255.252
(config-if)# ip ospf point-to-point
(config-if)#no shut
Customer OSPF
The following portions are the most complicated and easy to mess up. We will be setting up the OSPF sessions between the PE routers and the Customer routers. This is on a VRF on the PEs but on the global routing table on the customer routers.
After this the PEs will see the customer routes and the only portion left will be to redistribute it into MP-BGP to be pushed over the underlay by MPLS.
OSPF VRF on PE#
(conf)#router ospf '2' vrf 'CUS1'
(config-router)#network "10.0.0.1" "0.0.0.0" area 0
OSPF on CE#
Interfaces
(config)#int g0/0
(config-if)#ip address 10.0.0.2 255.255.255.252
(config-if)#no shut
(config)#int g0/1
(config-if)#ip address 192.168.0.1 255.255.255.0
(config-if)#no shut
OSPF
(conf)#router ospf "1"
(config-router)#passive-interface GigabitEthernet0/1
(config-router)#network "10.0.0.2" "0.0.0.0" area 0
(config-router)#network "192.168.0.1" "0.0.0.0" area 0
Complete these configs for both sets of PE and CE routers with the accompanying changes for those networks.
Route redistribution on PEs
BGP
(conf)#router bgp 6500
(config-router)#address-family ipv4 vrf CUS1
(config-router)#redistribute ospf 2
(config-router)#redistribute ospf 2
OSPF
(conf)#router ospf '2' vrf 'CUS1'
(config-router)#redistribute bgp 6500
Complete these configs for both sets of PE and CE routers. In this case configs will be the same but they may not always be.
Show commands and verifying
When this is complete you should be able to see the shared vpnv4 routes between the PE routers with the following command:
#show bgp vpnv4 unicast all
#show mpls forwarding-table
These are more commands that may be helpful in troubleshooting.
#show mpls ldp discovery
#show mpls ldp neighbor
Config Spoiler: