Professional Documents
Culture Documents
Mpls Lab 3
Mpls Lab 3
This lab was something I worked on last week and for some reason it stuck in
my head very well. I can put together a basic MPLS configuration now from
memory which is definitely a step up from where I was. Here are a few details
of what I put together.
• VRF 1 = Client1
o Two routers, two locations
o 192.168.1.0/24 and 192.168.2.0/24
• VRF 2 = Client2
o Two Routers, two locations
o 172.16.1.0/24
o 172.16.2.0/24
• Two PE Routers – PE1 and PE2. They are connected with the 10.0.0.0/24
network. PE1 has a loopback of 1.1.1.1 and PE2 has 2.2.2.2. This Provider
network could easily be increased in size and number of devices. Most
labs will use OSPF or EIGRP for the Provider network with a BGP
connection between the specific provider edge devices connecting to the
client.
Here’s what the topology looks like:
The first thing that I did was create the basic interface connections. I will omit
that step for the sake of keeping this post to the point. Next, I created the
VRF’s on each PE router:
ip vrf Client1
rd 65000:1
route-target export 65000:1
route-target import 65000:1
!
ip vrf Client2
rd 65000:2
route-target export 65000:2
route-target import 65000:2
Basically what you first do is create a VRF with a unique name. Next you set the
route distinguisher. This allows you to share only Client 1’s routes with other
Client 1 devices and so on. The route targets allow you to customize the setup a
bit more in the sense that you choose the route distinguisher that you exports
as and then customize which routes you wish to accept as well. For the sake of
this lab, we’ll keep it simple though. Once the VRF’s are created, they need to
be attached to client facing interfaces to designate the traffic that should be
transferred accordingly. Just takes one command, but definitely not something
to forget.
interface Ethernet0/0
ip vrf forwarding Client1
Next, I take care of the client side OSPF connections. On the client devices
there is nothing special. Just standard OSPF setup. The PE routers are where
things are a bit different. We are going to setup two OSPF processes. Then we
will tie each process to a specific interface:
router ospf 1 vrf Client1
router-id 192.168.1.1
!
router ospf 2 vrf Client2
router-id 172.16.1.1
!
interface Ethernet0/0
ip vrf forwarding Client1
ip address 192.168.1.1 255.255.255.0
ip ospf 1 area 0
!
interface Ethernet0/1
ip vrf forwarding Client2
ip address 172.16.1.1 255.255.255.0
ip ospf 2 area 0
Client 1 is now communicating with PE1’s VRF 1 and Client 2 on VRF 2. Once
the OSPF configuration is done on the client’s device, the connections should be
established:
Now where the real fun begins: the BGP portion of the lab.
That got a basic BGP connection established between the two PE routers. Next,
we need to need to configure BGP for the vpnv4 address family. This establishes
which devices will be a part of these client tunnels:
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
So what we have here is basic routing protocol configuration including OSPF and
BGP as well as two VRF’s, one for each “client”. OSPF and BGP are still separate
from each other. We need to begin sharing routes between the each of them.
This will be accomplished with route redistribution. It will look a bit like this:
Everything should be working now right? You will notice that Client-1-1 still
can’t see routes on Client-1-2’s side. This is a MPLS lab after all, we need to
configure MPLS!
***Normally I would do this first, but I saved it for the end of this lab***
Globally, the command “mpls ip” needs to be configured on each PE router.
Next the interfaces facing the MPLS network (in this case the provider network)
need to have that same identical command configure. Here is the config from
PE1:
mpls ip
!
interface Ethernet0/2
ip address 10.0.0.1 255.255.255.0
mpls ip
Once completed on both ends, you should be alerted to the new MPLS
connection:
PE1(config)#interface e0/2
PE1(config-if)#mpls ip
PE1(config-if)#
*Aug 7 11:56:32.209: %LDP-5-NBRCHG: LDP Neighbor 2.2.2.2:0 (2) is
UP
PE1(config-if)#