ccie blog

Difference between the RD and RT

The Route-Distinguisher (RD) & Route-Target (RT) are two different concepts that are both used in an MPLS VPN. The RD is used to keep all prefixes in the BGP table unique, and the RT is used to transfer routes between VRF’s/VPNS. Let’s take a look at an example.

In the diagram below, the orange = customer A, and the red = customer B.  The ISP is creating a VPN for Customer A’s sites between Cambridge and Birmingham, and also creating a VPN between Customer B’s sites in Cambridge and Birmingham.

The problem here, is that in Birmingham, Customer A and Customer B are using the same prefixes ( & So how is PE2 going to keep the prefixes in the BGP table unique? The answer is, PE2 needs to create a separate  RD for each customer. An RD is a 64 bit value that gets prepended in front of the 32 bit IP address in order to make a globally unique 96 bit address. On PE2 if we configure Customer A to use an RD of 1:1, and Customer B with an RD of 2:2, then in the BGP vpnv4 unicast table we will see the following entries:


So by pre-pending an RD in front of the route, we have created a globally unique set of BGP prefixes in the vpnv4 BGP table that can be shared between peers. The next question is, how does PE1 know which of these routes belong to Customer A, and which of these routes belong to Customer B? All we’ve done so far is just ensure the routes are globally unique in the vpnv4 BGP table. The table currently contains 4 entries that are literally just considerd prefixes (although it’s very wierd to look at). So the answer is; by using a route-target. A route target is kind of like a little tag that is attached to a route. So PE2 may add, let’s say 100:100 to routes from Customer A in Birmingham, then when PE1 checks the vpnv4 BGP table he can choose to pick out (import) routes that have this 100:100 value and put them into a separate Virtual Routing & Forwarding (VRF) table for Customer A. The configuration regarding RD’s and RT’s is displayed below.

vrf definition CustomerA
 rd 1:1
 route-target import 100:100
 route-target export 100:100

int fa0/0
 description connection to Customer A Birmingham Site
 ip vrf forwarding CustomerA

So from the output, you can see that Customer A routes are made unique by prepending an RD of 1:1 to each prefix. Each route is assigned a route-target of 100:100 because of the VRF association with the interface. PE2 then exports this route target so that each of the routes will have 100:100 attached in the RT field within the BGP extended community attribute as they are sent to PE1.  PE1 can then import the route-target of 100:100 so that it can associate those routes tagged with this value with the Customer A VRF.


The RD is used purely for the purpose of ensuring routes are unique per VPN.  So 10 different VPN’s could use, and each instance of this prefix would be globally unique. The route-target 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.


sokkhiangOctober 4th, 2013 at 10:47 am

nice explanation! Thz for the post.

kumarApril 3rd, 2014 at 7:47 pm

Good Explanation

MehdiJune 17th, 2014 at 9:33 am

The best and short explanation of this difference on the web, Thank you.

swapnil MAugust 9th, 2014 at 5:34 am

Amazing post …..boss keep going

Narayana ReddySeptember 13th, 2014 at 10:30 pm

The best and short explanation

PrashanthSeptember 17th, 2014 at 2:43 pm

Best explanation i found in web

PradeepSeptember 18th, 2014 at 10:23 am

very good explanation..

YashasSeptember 22nd, 2014 at 6:01 am

Awesome 🙂 Thanks

Bhushan TNovember 22nd, 2014 at 2:44 pm

Short and Sweet..Thanks …!!

sakthiFebruary 22nd, 2015 at 10:10 am

Crystal clear explanation yaar.thank you

SachinAugust 26th, 2015 at 12:00 pm

best explanation…

abbasOctober 15th, 2015 at 2:19 pm

yery good , thnks

NizmyNovember 27th, 2015 at 10:00 am

Concept is fully clear.

AniketJanuary 2nd, 2016 at 3:46 pm

Good i like it.

SpencerJanuary 2nd, 2016 at 3:59 pm

This is the best ever

TmanJanuary 12th, 2016 at 10:11 am

Best and simple explanation. Thanks for sharing.

AnkitFebruary 3rd, 2016 at 6:39 am

Awesome!! Thanks a ton for sharing!!

AdebMarch 3rd, 2016 at 8:12 pm

Very clear explanation

LandgarMarch 28th, 2016 at 1:43 pm

the best explanation I´ve found!

Daniel AApril 20th, 2016 at 4:33 am

Love it

FawadApril 25th, 2016 at 7:00 am

The best explanation concept is very clear

Samar GuptaMay 4th, 2016 at 1:48 pm

Excellent explained…

sagarMay 23rd, 2016 at 8:47 pm

Very nicely explained

RezardJune 2nd, 2016 at 3:58 pm

Very good explanation. Would be much better if you could show the PE1 config as well.

RezardJune 11th, 2016 at 10:24 am

Very good explaination

SlarJune 23rd, 2016 at 7:54 am

I didn’t get it at first so I read it again. I still didn’t get it. Then I got it. This article allowed me to comprehend in 3 iterations instead of my normal 7. This article is much more efficient than I expected. Your effort will now allow me to understand the VRF MPLS nightmare that I created and fix it.

ROHAN PATILJune 28th, 2016 at 6:17 am

thank you so much for short and brief explanation ….

sekharOctober 2nd, 2016 at 10:39 am

very clear explanation. Finally doubts are killed using this explanation.
thank you very much 🙂

subhash kumarDecember 9th, 2016 at 5:05 am

Very simple concept to understand rd rt roll in vpnn customer

ArunDecember 17th, 2016 at 8:50 am

Crisp explanation

HPJanuary 1st, 2017 at 11:43 am


cheeryJanuary 17th, 2017 at 10:14 am

well explained. Thanks a lot.

RoomiJanuary 21st, 2017 at 1:41 pm

great job, rather than reading big articles, this is no doubt short and perfect explanation to quick understand the difference between two.

Please keep making the posts like this.

YedPedJanuary 28th, 2017 at 5:58 pm

Best of 2017. Best of ther year. thanks!

StephenFebruary 9th, 2017 at 12:00 am

This has always been a hard thing for me to understand and this helped a lot. Thank you!

anilMarch 27th, 2017 at 3:00 am

ultimate expalanation

JezzApril 23rd, 2017 at 7:33 pm

Is the RD only locally significant? So could PE1 and PE2 use a different RD for the same VRF?

StephenGarbettApril 22nd, 2018 at 2:27 pm

No. The RD is globally significant because it’s added to the route.

Pynbiang HademJune 25th, 2017 at 10:09 am

Clear and Concise explanation. Really helpful

Pynbiang HademJune 25th, 2017 at 10:15 am

Clear and Concise explanation!!.

MikeJuly 29th, 2017 at 6:25 pm

If we have a unique way of identifying routes via the RD (one RD per customer/vpn) then I see no need for the RT. Why not use the unique RD as the key for import/export? Why did they have to invent another mechanism to identify routes per customer?

StephenGarbettApril 19th, 2018 at 9:43 pm

Because from an ISP side of things, it’s a lot easier to reference a customer with one particular ID (i.e. RD). Then control the routing via the route target. If you had 20k customers, each who had 10 sites at different locations, requiring 10 RD’s for each site, then you would need a total of 200k RD’s to manage the total routing. It’s just too much.

Mohamed ElsharifAugust 12th, 2017 at 2:57 am

Very informative.

Thank you Steve!

BilalSeptember 7th, 2017 at 4:35 am


Martin MUNYANDEKWENovember 3rd, 2017 at 9:18 am

Thank you for these explanations

ThiriJanuary 7th, 2018 at 3:45 pm

This is the best explanation that I had been read about RD and RT. Thanks for your crystal clear explanation 🙂

vigneshFebruary 1st, 2018 at 10:51 pm

Excellent Work!!!

TimMarch 12th, 2018 at 6:14 pm

Concise and crisp…

MohammedMarch 20th, 2018 at 6:10 pm

Neat and well explained steve …….keep it up

MisbahMay 15th, 2018 at 5:52 am

thanks for the useful post 🙂 very helpful!

Mohamed FathyMay 22nd, 2018 at 11:31 pm

Clear and simple .. Keep Going

AbhikJune 4th, 2018 at 11:25 pm

Awesome explanation, most interesting fact is I understood the RD and RT by reading it three times only, generally it takes 10 times to digest any unknown fact but the it did not take the usual time for me to understand. Hats off…

HormozAugust 2nd, 2018 at 12:55 am


TarekSeptember 11th, 2018 at 6:45 am

Thanks So much !

Jibran ZebOctober 16th, 2018 at 11:24 am

Easy perfect explantion

VFebruary 21st, 2019 at 7:25 pm

Thanks. Very nice explanation.

minondasJuly 16th, 2019 at 4:36 pm

The first clear explanation I found abou RD and RT. Thanks.

Purnendu GhoshAugust 8th, 2019 at 12:51 pm

perfect explanation of RD and RT

VikramAugust 10th, 2019 at 8:20 am

Thank you very Much, it is the simplest way to explain about RD/RT and also why to use VRFs.

Leave a comment

Your comment