The Journey of a Network Engineer

Feb 21 2012   2:38PM GMT

How to use route-target?

Sulaiman Syed Profile: Sulaiman Syed

The main purpose of route targets is to provide connectivity between different  MPLS-VPN  networks. For example, there are three enterprises namely A, B, and C. A and B are major networks with their own MPLS-VPN.  Enterprise A requires to access some servers and resources from Enterprise C. The ISP will use route-targets to provide partial connectivity for certain private addresses routes between A and C. Then Enterprise B went and bought Enterprise C. So they would have full connectivity to C. This is all done using route targets.

The following example will provide details on how to provide partial connectivity between Enterprise A and B. Lets see how it works, the following is the configuration with brief explanation.

!
ip vrf VPN_A
rd 100:1 (organization A will usually have 100:1 as the route target)
export map RD
route-target export 100:1
route-target import 100:1
route-target import 100:66 (additionally to our normal VPN_A network, we are importing anything with route-target set to 100:66. Organization B will make set the values for 100:66)
!
interface Loopback101
ip vrf forwarding VPN_A
ip address 172.16.5.5 255.255.255.0
!
ip prefix-list FILTER seq 10 permit 172.16.5.0/24
!
route-map RD permit 10
match ip address prefix-list FILTER
set extcommunity rt  100:55 (we are setting the route target extended value to 100:55) so any routes confirming to the prefix list will not be advertised to VPN_A networks)
!
route-map RD permit 20
set extcommunity rt  100:1 (default, all networks are set to have route target of 100:1)

Now in Router 2 (the other side of cloud) we are doing the opposite. we will be importing 100:55, and re-writing the route target value for certain routes to be 100:66.

!
ip vrf VPN_B
rd 100:2
export map RD
route-target export 100:2
route-target import 100:2
route-target import 100:55
!
!
interface Loopback102
ip vrf forwarding VPN_B
ip address 192.168.6.6 255.255.255.0
!
ip prefix-list FILTER seq 10 permit 192.168.6.0/24
!
route-map RD permit 10
match ip address prefix-list FILTER
set extcommunity rt  100:66
!
route-map RD permit 20
set extcommunity rt  100:2

A diagram for such network can be seen below.
MPLS-VPN with rd, Route target example

It really comes down on how good you can manipulate the route targets, setting them, importing and exporting them. Beaware, never forget to make sure that BGP is handling the extended community as it should, otherwise these routes will not be advertise anyways.  route target are the critical elements the decide which routes to be installed on which vrf route table.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: