MPLS VPN VRF Export Map

This topic is to discuss the following lesson:

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?

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

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

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

1 Like

Hi @lagapides
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 ?

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

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?

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

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

Thanks a lot.

Regards,

Lukas

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:

I hope this has been helpful!

Laz

1 Like

Thanks a lot for your reply :slight_smile:

1 Like

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.

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.

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:

I hope this has been helpful!

Laz

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

1 Like