# MPLS VPN Configuration Example

**URL:** https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013
**Category:** Lessons Discussion
**Created:** [December 26, 2016, 6:09pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013 "2016-12-26T18:09:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 26, 2016, 6:09pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/1 "2016-12-26T18:09:50Z")

</div>

This topic is to discuss the following lesson:

> **[MPLS VPN Configuration Example](https://networklessons.com/miscellaneous/mpls-vpn-example-with-2-loopbacks)**
>
> This walkthrough shows you how to configure MPLS VPN and MP-BGP with two VRFs.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [May 10, 2013, 4:27pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/2 "2013-05-10T16:27:14Z")

</div>

```
R3(config-router)#address-family vpnv4 
R3(config-router-af)#neighbor 1.1.1.1 activate 
R3(config-router-af)#neighbor 1.1.1.1 send-community extended 

```

what is the use of the above command.if we not provided these commands what will happened. could u explain each and every functionality of above command

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [May 10, 2013, 5:01pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/3 "2013-05-10T17:01:39Z")

</div>

BGP by default only carries IPv4 unicast prefixes. MP-BGP (Multiprotocol) lets us send other stuff like IPv6 or VPN routes for MPLS. A VPN route is a prefix + the 64-bit RD (Route distinguisher).

In order to send these VPN routes between BGP neighbors you need to activate the VPNv4 address family.

Extended communities are used for route import/export policies and also to carry OSPF or EIGRP attributes across MP-BGP.

I’ll write some more MPLS lessons in the future to explain it more.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [May 28, 2013, 6:30am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/4 "2013-05-28T06:30:41Z")

</div>

Hi Rene - what about R2, don’t we need to configure VRF on R2 also? how the middle router will come to know about the VRF data, OR the middle one is only a transit router that works on MPLS BGP.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 7, 2013, 3:39pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/5 "2013-09-07T15:39:43Z")

</div>

I’ll write some more mpls tutorials in the future, there’s plenty to talk about.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 21, 2013, 11:41am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/6 "2013-09-21T11:41:28Z")

</div>

Hi Rene,

Thanks for these amazing tutorials,

When you configured OSPF, you already had reachability between R1 and R3, am I correct ? What is the use of configuring BGP ? When OSPF provided reach ability between these non directly connected networks.

Thanks a lot

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 25, 2013, 3:56pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/7 "2013-09-25T15:56:19Z")

</div>

Hi Charlot,

OSPF was used between the routers to advertise the loopback0 interfaces that are used for the MPLS peering. BGP (Multiprotocol BGP) is used to exchange the VPN routes from R1 to R3. One of the advantages of MPLS is that in this example, R1 and R3 can reach each others loopback1 interfaces while R2 doesn’t have a clue about those networks…it only has to “swap labels”.

The “core” of our network (R2 in this example) doesn’t require BGP anymore, it only has to worry about swapping labels. If we wouldn’t use MPLS then R2 would have to know about network 11.11.11.0 /24 and 33.33.33.0 /24 in order to forward IP packets.

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [October 5, 2013, 7:49am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/8 "2013-10-05T07:49:05Z")

</div>

as you said R2 is just transit an since we used MPLS , it will look at the lable stack and forward the packet.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [December 31, 2013, 3:44am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/9 "2013-12-31T03:44:52Z")

</div>

Dear, Rene

Can you share me the program that you use to draw this Topology. I can’t do like that in Microsoft Visio. Thanks

Best Regard

SAVOEURN Rada

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [January 5, 2014, 10:04pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/10 "2014-01-05T22:04:13Z")

</div>

I use Visio for all my topology pictures, the icons are from [http://www.visiocafe.com/vsdfx.htm](http://www.visiocafe.com/vsdfx.htm).

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [January 29, 2014, 1:38pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/11 "2014-01-29T13:38:44Z")

</div>

Hi, Renee  
Clear explanation,.  
Can we use static routing instead of ospf?

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [February 3, 2014, 11:09am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/12 "2014-02-03T11:09:17Z")

</div>

Yes that’s possible, just make sure R1/R3 can reach each others loopback interfaces.

---

<div class="post-metadata">

### Author: ![njrusmc](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/n/4af34b/32.png) [@njrusmc](https://forum.networklessons.com/u/njrusmc)
#### Post date: [February 14, 2014, 3:06am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/13 "2014-02-14T03:06:42Z")

</div>

Any IGP or static routing is acceptable, just OSPF is most commonly used. You must have reachability to the BGP next hops on the PE routers, and likewise all MPLS routers must have labels for those endpoints (called the “transport” label). That is pretty much the only thing that matters with respect to the data plane. BGP automagically handles the VPN label advertisements by encoded them as extended communities within the VPNv4 update (along with the RD, RT, SoO, EIGRP Cost Community, and other fun stuff that may show up).

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [April 14, 2014, 10:14pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/14 "2014-04-14T22:14:20Z")

</div>

Rene,  
What routers did you use for this demo? I could not get it to work using my 2611’s or my 1841.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [May 1, 2014, 12:32pm UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/15 "2014-05-01T12:32:26Z")

</div>

Hi Willie,

I’m not sure what routers I used, I think I did this on my 2811s but I believe the 1841 can do it too. Even in GNS3 the 3725 router should be able to do it.

Rene

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [May 19, 2014, 6:23am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/16 "2014-05-19T06:23:34Z")

</div>

Hi Rene,

Thanks for sharing the knowledge, could you focus on MPLS L2 VPN please?

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [June 25, 2014, 9:38am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/17 "2014-06-25T09:38:02Z")

</div>

You are welcome Pankaj, I’ll keep that in mind for the future.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 23, 2014, 6:10am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/18 "2014-09-23T06:10:27Z")

</div>

Hi,

2 things I don’t understand.  
What is local LDP identifier 192.168.23.2:0 for r2? Why that prefix?

Why is ospf advertising the exact IP address with wildcard mask 0.0.0.0 ? Shouldn’t it be 0.0.0.255 instead? I haven done bgp b4 so pardon my questions.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [September 23, 2014, 7:43am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/19 "2014-09-23T07:43:39Z")

</div>

LDP uses a LDP identifier to name label spaces, it’s 6 bytes and made up with:

- 4 bytes for the router ID
- 2 bytes for the local label space ID

The router ID can be set manually with the **mpls ldp router-id** command or it will be selected automatically:

1. If you have a loopback interface(s), it will use the highest IP address on your loopback interface(s).
2. If you don't have a loopback interface, it will select the highest IP address of an operational interface.

The label space is a set of “possible labels”. There are two types of label spaces:

Interface-specific: this is where we use interface resources for labels.  
Platform: the router used a “system wide” label space that is shared by all interfaces, Cisco uses this except for LC-ATM.

When you use platform wide label space the last two bytes are always 0.

So 192.168.23.2:0 means that 192.168.23.2 is our router ID and the 0 means we use platform wide label space for our label bindings.

About the OSPF network statements, on the FastEthernet interfaces it doesn’t matter if you use 192.168.23.2 0.0.0.0 or 192.168.23.0 0.0.0.255. Both will give you the exact same result.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [September 23, 2014, 11:26am UTC](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013/20 "2014-09-23T11:26:39Z")

</div>

I don’t understand. If you put 0.0.0.0 instead of 0.0.0.255 , how will it be able to reach the next hop? I don’t understand. In ccna they tell you to use 0.0.0.255 for /24. Enlighten my little knowledge

[Next page](https://forum.networklessons.com/t/mpls-vpn-configuration-example/1013.md?page=2)
