MPLS Layer 3 VPN Explained

Hello Buck

The importing and exporting of routes is not part of the routing process of actual packets, but is involved in the advertising of prefixes. In other words, the import and export actions don’t take place on the data plane, as your post suggests, but on the control plane. The import and export actions are taken by the PE routers.

For example, PE1 adds, 123:1 to routes from Customer A on the left, then when PE2 checks the vpnv4 BGP table it can choose to pick out, or IMPORT routes that have this 123:1 value and put them into a separate VRF table for Customer A. So importing involves using the RT to place the VPNv4 route in the appropriate VRF.

Exporting is the opposite, when a PE router receives a route from a CE router on a particular VRF, it uses that VRF to assign an RT before sending the advertisement to other PE routers.

Remember, importing and exporting involves only the route advertisements in order to correctly populate BGP/routing tables.

It’s important to understand the role of each one in order to understand the scope of each. RDs are used purely for the purpose of ensuring routes are unique per VPN. The routes found within the BGP VPNv4 unicast table on a particular PE should be unique, and that’s what the RD does. They must be unique for different VRFs on the same PE, but for two corresponding VRFs on two different PEs, they may or may not be the same, it does not really matter.

The route-target on the other hand is used to identify a subset of routes within the BGP vpnv4 unicast table that should be used in a VRF for a particular customer. So on a per-customer basis, the RTs should be unique across all PEs serving a particular customer.

Again, in this case, we’re not talking about operations that take place on the data plane, but on the control plane. Also, we don’t assign RTs to RDs, but RDs are assigned to prefixes, while RTs identify which VRF prefixes belong to. Looking at it from this context may change your question somewhat.

This post was a little long-winded, but I hope it was useful for you. If you need any additional clarifications, please don’t hesitate to ask!

I hope this has been helpful!

Laz