In my previous lessons I explained the basics of MPLS L3 VPNs and I explained in detail how to configure it. This time, we are going to configure MPLS VPN PE-CE with RIP as the routing protocol between the customer and service provider.

RIP is a simple routing protocol and easy to implement with MPLS VPN. Here’s the topology we will use:


This is the same topology that I used in my previous examples. Let’s see what the configuration is like…



We will start with the configuration of the service provider network, we’ll have to configure an IGP (OSPF) and LDP on the PE1, P and PE2 router. Let’s add some loopbacks that are required for LDP:

PE1(config)#interface loopback 0
PE1(config-if)#ip address
P(config)#interface loopback 0
P(config-if)#ip address
PE2(config)#interface loopback 0
PE2(config-if)#ip address

Now we can configure OSPF:

PE1(config)#router ospf 1
PE1(config-router)#network area 0
PE1(config-router)#network area 0
PE1(config-router)#mpls ldp autoconfig
P(config)#router ospf 1
P(config-router)#network area 0
P(config-router)#network area 0
P(config-router)#network area 0
P(config-router)#mpls ldp autoconfig
PE2(config)#router ospf 1
PE2(config-router)#network area 0
PE2(config-router)#network area 0
PE2(config-router)#mpls ldp autoconfig

This time I used the mpls ldp autoconfig command to automatically enable LDP for all OSPF enabled interfaces. Let’s do a quick check to see if LDP is enabled:

P#show mpls ldp neighbor | include Peer
    Peer LDP Ident:; Local LDP Ident
    Peer LDP Ident:; Local LDP Ident

Our P router in the middle has two neighbors so this is looking good. Just in case, let’s verify if there is connectivity between PE1 and PE2:

PE1#traceroute source loopback 0
Type escape sequence to abort.
Tracing the route to
VRF info: (vrf in name/id, vrf out name/id)
  1 [MPLS: Label 17 Exp 0] 0 msec 0 msec 4 msec
  2 0 msec 0 msec *

PE1 and PE2 are able to reach each other and you can see we are using label switching.

VRFs on the PE Routers

Our next step in the configuration is to configure the VRFs. I will use a VRF called “CUSTOMER”, the route distinguisher and route-target will be 1:1.

PE1 & PE2
(config)#ip vrf CUSTOMER
(config-vrf)#rd 1:1
(config-vrf)#route-target both 1:1

Don’t forget to add the interfaces facing the customer routers into the VRF:

PE1(config)#interface FastEthernet 0/0
PE1(config-if)#ip vrf forwarding CUSTOMER
PE1(config-if)#ip address
PE2(config)#interface FastEthernet 0/1
PE2(config-if)#ip vrf forwarding CUSTOMER
PE2(config-if)#ip address

Let’s check if the PE routers are able to ping the CE routers from the VRF:

PE1#ping vrf CUSTOMER
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
PE2#ping vrf CUSTOMER
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

So far so good…

IBGP between PE1 and PE2

Our two PE routers require iBGP to exchange the VPNv4 routes. Let’s configure this:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 791 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

1644 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. Thanks for great lesson.
    I’m quite new to Vpn l3. Could you explain about label stack of vpn packet when it travels from CE1 to PE1, then through isp , then out on PE2, then to CE2. Tks !!

  2. Hi,

    Thank you for the this great site.

    Can we redistribute into OSPF instead of redistributing into BGP.


  3. Hi Akram,

    Redistributing RIP into OSPF is no problem but you can’t use it for MPLS VPN. You need BGP since it has address families for VPN routes.


  4. Hi Rene,
    Very nice explanation. I have a general question: We are using IGP between PE-CE routers, Aren’t we only allowed to use e-BGP between different AS routers?

12 more replies! Ask a question or join the discussion by visiting our Community Forum