# MPLS VPN VRF Export Map

**URL:** https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384
**Category:** Lessons Discussion
**Created:** [November 9, 2017, 11:44am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384 "2017-11-09T11:44:55Z")
**Posts on this page:** 15
**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: [November 9, 2017, 11:44am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/1 "2017-11-09T11:44:55Z")

</div>

This topic is to discuss the following lesson:

> **[MPLS VPN VRF Export Map](https://networklessons.com/mpls/mpls-vpn-vrf-export-map)**
>
> With MPLS VPN VRF export maps you can use route-maps to selectively set a route-target for the prefixes you want.

---

<div class="post-metadata">

### Author: ![chrisnewnham17](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/c/f9ae1b/32.png) [@chrisnewnham17](https://forum.networklessons.com/u/chrisnewnham17)
#### Post date: [February 12, 2018, 3:00pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/2 "2018-02-12T15:00:33Z")

</div>

Thanks Rene - so am I right in thinking there is no implicit deny on a route map used as an export map in this process? Anything not matched on the route-map will just use the default settings configured.

Normally when applying a route-map to a neighbour in IPv4 (e.g. neighbor X route-map Y) if something isn’t positively matched in the route-map, it will get dropped?

---

<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 16, 2018, 8:56am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/3 "2018-02-16T08:56:53Z")

</div>

Hi Chris,

It still has the implicit deny but when you use a route-map as an export-map, it only tells the router which route-targets to add. When you use a route-map with a neighbor for a routing protocol, it works as a filter for routes.

For example, this is the default route-target on PE1:

```
ip vrf CUSTOMER
 rd 1:1
 route-target export 1:1:

```

And we use this export-map:

```
PE1(config)#ip prefix-list CE1_L0 permit 1.1.1.1/32
PE1(config)#route-map EXPORT_MAP permit 10
PE1(config-route-map)#match ip address prefix-list CE1_L0

```

Then we end up with:

```
PE1#show ip bgp vpnv4 all 1.1.1.1/32 | include Extended
      Extended Community: RT:3:3 OSPF DOMAIN ID:0x0005:0x000000020200
PE1#show ip bgp vpnv4 all 11.11.11.11/32 | include Extended
      Extended Community: RT:1:1 OSPF DOMAIN ID:0x0005:0x000000020200
PE1#show ip bgp vpnv4 all 192.168.12.0/24 | include Extended
      Extended Community: RT:1:1 OSPF DOMAIN ID:0x0005:0x000000020200

```

Because of the implicit deny, the last two routes didn’t get route-target 3:3 but the default one (1:1).

Hope this helps!

Rene

---

<div class="post-metadata">

### Author: ![Zaman.rubd](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/z/45deac/32.png) [@Zaman.rubd](https://forum.networklessons.com/u/Zaman.rubd)
#### Post date: [February 2, 2019, 5:35pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/4 "2019-02-02T17:35:30Z")

</div>

Hi Rene,

Thank you for your nice lesson . Need to know more about the “Additive” keyword functionality . Can you please more brief on it?

BR//ZAMAN

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [February 4, 2019, 11:48am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/5 "2019-02-04T11:48:00Z")

</div>

Hello Zaman

The additive keyword will allow you to add an export map without overwriting the previously configured ones. For example, if you configure the following:

```
PE1(config)#route-map EXPORT_MAP permit 10         
PE1(config-route-map)#set extcommunity rt 1:1 

```

and then at a later time you configure this:

```
PE1(config)#route-map EXPORT_MAP permit 10         
PE1(config-route-map)#set extcommunity rt 3:3 

```

The result is that the 1:1 entry will be overwritten by the 3:3 entry. However, if you use the `additive` keyword like this instead:

```
PE1(config)#route-map EXPORT_MAP permit 10         
PE1(config-route-map)#set extcommunity rt 3:3 additive

```

Then 3:3 will not overwrite 1:1 but will be added to it.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![kmcnaggm](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/53a042/32.png) [@kmcnaggm](https://forum.networklessons.com/u/kmcnaggm)
#### Post date: [March 26, 2019, 10:40am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/6 "2019-03-26T10:40:15Z")

</div>

Hi @lagapidis  
So will this additive keyword still cause my routes to stay at the other end PE orwill it be removed from the far end PE node ?

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [March 26, 2019, 7:08pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/7 "2019-03-26T19:08:23Z")

</div>

Hello Kushagra

The export maps, as well as the additive keyword, will only make changes to the routes within the same PE device. They will not affect the PE node at the other end. Any changes required at the node at the other end must be made locally.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![roshanchampika](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/r/34f0e0/32.png) [@roshanchampika](https://forum.networklessons.com/u/roshanchampika)
#### Post date: [September 24, 2019, 3:51pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/8 "2019-09-24T15:51:27Z")

</div>

Hi Rene,

Don’t we need to remove `route-target export <r:t>` command when we enter `export-map <RM>` command when filtering vpnv4 routes?

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [September 25, 2019, 5:42am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/9 "2019-09-25T05:42:54Z")

</div>

Hello Roshan

It’s not necessary to remove the `route-target` command from the VRF configuration because the export map will actually overwrite the RT that is set with the `route-target` command. Actually, it’s a good idea to keep the `route-target` command in place, because you may not want to replace it completely, but you may want to change the RT only for specific routes using a prefix list. For example, in the lesson, the route target was set to 1:1 for all routes, but you selectively stated that you wanted the RT of 1.1.1.1/32 to become 3:3. By implementing this, the rest of the routes remained with an RT of 1:1 (which is achieved by the initial `route-target` command) and only the desired destination was changed.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![edelmann.lukas](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/edelmann.lukas/32/2635_2.png) [@edelmann.lukas](https://forum.networklessons.com/u/edelmann.lukas)
#### Post date: [April 15, 2020, 7:10am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/10 "2020-04-15T07:10:09Z")

</div>

Hello,  
it is possible to filter local labels for VRFs? I can just find label filtering in the global routing table.

Restrictions for MPLS LDP Local Label Allocation Filtering  
• Label Distribution Protocol (LDP) local label allocation configuration for prefix list or host routes is supported only in the global routing table.

[https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/mp\_ldp/configuration/xe-16/mp-ldp-xe-16-book/mp-ldp-alloc-filter.html](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285)

Thanks a lot.

Regards,

Lukas

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [April 15, 2020, 12:30pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/11 "2020-04-15T12:30:18Z")

</div>

Hello Lukas

The MPLS LDP Local Label Allocation Filtering feature is limited to functioning on the global routing table and cannot achieve what you are looking for. However, using route-maps, you can filter which routes should get exported and what route-targets should be used. You can find out more about how to do this at the following lesson:

> **[MPLS VPN VRF Export Map](https://networklessons.com/mpls/mpls-vpn-vrf-export-map)**
>
> With MPLS VPN VRF export maps you can use route-maps to selectively set a route-target for the prefixes you want.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![edelmann.lukas](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/edelmann.lukas/32/2635_2.png) [@edelmann.lukas](https://forum.networklessons.com/u/edelmann.lukas)
#### Post date: [April 15, 2020, 12:57pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/12 "2020-04-15T12:57:08Z")

</div>

Thanks a lot for your reply 🙂

---

<div class="post-metadata">

### Author: ![lin841031](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lin841031/32/5258_2.png) [@lin841031](https://forum.networklessons.com/u/lin841031)
#### Post date: [September 13, 2022, 4:48am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/13 "2022-09-13T04:48:45Z")

</div>

Hi,  
I have some question about rd and route-target.  
I’m not sure it’s right?  
In my opinion rd it’s like a personal identity Card to distinguish who we are.  
And route-target export it’s like I can tell someone who I am.  
And route-target import it’s like I accept other peorson tell me who they are.  
If it’s right then I have a little confuse in the instance.

```auto
PE1#show running-config | begin ip vrf  
ip vrf CUSTOMER
 rd 1:1
 route-target export 1:1
 route-target import 2:2

PE2#show running-config | begin ip vrf 
ip vrf CUSTOMER
 rd 1:1
 route-target export 2:2
 route-target import 1:1

```

Why rd of PE2 is 1:1 but PE1 still can learn from import 2:2?

Thank you.

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [September 16, 2022, 5:13am UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/14 "2022-09-16T05:13:09Z")

</div>

Hello TE-EN LIN

Remember that the route target (RT) and the route distinguisher (RD) are two different things. An RD makes the prefixes from a particular customer unique. This uniqueness of RDs is only **locally significant** so the RD for each VRF on a particular PE can be the same or different compared to another PE. In this case, Rene has chosen to use an RD of 1:1 for VRF CUSTOMER on both routers.

Note, this has nothing to do with the values of the RTs since those are different entities that perform a different role.

RTs are used to determine to which VRF routes from a particular customer will be imported/exported to, yes, kind of like an identity card.

Take a look at this lesson which describes both RTs and RDs extensively:

> **[MPLS Layer 3 VPN Explained](https://networklessons.com/mpls/mpls-layer-3-vpn-explained#MP-BGP_Multi_Protocol_BGP)**
>
> This lesson explains how we use MP-BGP, Route Distinguishers, Route-Targets and VPN labels to build MPLS L3 VPN topologies.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![lin841031](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lin841031/32/5258_2.png) [@lin841031](https://forum.networklessons.com/u/lin841031)
#### Post date: [September 16, 2022, 12:19pm UTC](https://forum.networklessons.com/t/mpls-vpn-vrf-export-map/2384/15 "2022-09-16T12:19:37Z")

</div>

Oh.I think I understand the different between Route-Target and Route-Distinguish. Thanks Laz.
