• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Network Automation Engineer: Roger Perkin CCIE 50038

CCIE, Wireless, F5, Ansible, AWS, Cloud and data centre to Network Automation - my journey as a network engineer

  • Courses
  • Consulting
  • Contact
  • NETWORK AUTOMATION >Ansible, Python, DevOps etc
    • Ansible for Network Automation
    • Python for Network Automation
  • My CCIE Journey >How I passed the Lab
    • CCIE Blog
    • CCIE Study Plan
  • F5 CertificationF5 Cerfification Cost and Tutorials
    • Cloud
    • VMWare
    • GNS3
    • JUNIPER
  • CiscoPassword Recovery, Software Upgrades
    • Software-Upgrade-Guides
    • Password Recovery
    • WIRELESS
    • Security
      • ISE
    • Cisco Commerce
    • BGP
    • OSPF
    • 4500x
    • NEXUS
    • Windows 10
    • Wireless Console Cable
  • Devnet CertificaitonsDevnet Associate, Specialist & Professional
  • BLOG
    • Contact
    • About Roger
Home >> Featured >> Route Distinguisher and Route Target – MPLS Tutorial

Route Distinguisher and Route Target – MPLS Tutorial

Route Distinguisher vs Route Target – aren’t they the same thing? No they are not!

In this post I am going to clarify the difference between route distinguisher and route target within the Cisco world of MPLS L3VPN’s.

If you are looking for an MPLS Tutorial I suggest you read this post
MPLS L3VPN Configuration Example before reading further.

The main problem comes from the fact that in most Cisco Press books they always show the route distinguisher value and route target value as the same which is just confusing!
They are not the same and are used for completely different things.
In simple terms the route distinguisher is used to create a unique 96 bit address called the VPNv4 address.
This ensures that if two customers are running the 10.0.0.0/8 address space that each companies addresses are unique within the MPLS network.
The Route Target is a 64 bit BGP community used to tag prefixes. It tells the PE routers which prefixes it can import.

Route Distinguisher

The route distinguisher has only one purpose, to make IPv4 prefixes globally unique. It is used by the PE routers to identify which VPN a packet belongs to, e.g to enable a router to distinguish between 10.0.0.1/8 for Customer A and 10.0.0.1/8 for Customer B. The route distinguisher is made up of an 8 octet field prefixed to to the customer IPv4 address, the  resulting 12 octect field make a unique VPNv4 address. For more info on this please refer to RFC 4364

route distinguisher

Configuring a Route Distinguisher

The RD value used in the network is entirely the choice of the network admin. There are best practices but the number chosen can by any value to make sure the VPNv4 address is unique. Some engineers choose to use the AS number followed by a site ID
e.g 65335:10 Where 65335 is the AS number for the site and 10 is a site ID

To configure the route distinguisher first  you need to define your vrf and then you can define it’s route distinguisher.

R1(config)#ip vrf Customer_A
If we do rd ? you can see the options for configuring the RD as described above
R1(config-vrf)#rd ?
  ASN:nn or IP-address:nn  VPN Route Distinguisher
For the purpose of this description I will configure the RD value as 65355:10
R1(config-vrf)#rd 65355:10
To verify this value enter the command sh ip vrf
R1#sh ip vrf
  Name                             Default RD          Interfaces
  Customer_A                       65355:10

Route Target

The route target on the other had is an 8 byte field which is a BGP extended Communities Attribute defined in RFC 4360  it defines which prefixes are exported and imported on the PE routers. So for example consider the diagram below.  R3 has 2 VRF’s configured on it Customer_A and Customer_B so you would define under each vrf a unique route target value, these take the same format as the route distinguisher, but for the purpose of this explanation we are going to use 1:1 for Customer_A and 2:2 for Customer_B. On R3 we want to export and import the prefixes for Customer A and B, however on R1 we only want to import and export the prefixes for Customer_A and on R2 we only want to import and export the prefixes for Customer_B

route distinguisher topology rogers ccie blog

Difference between route distinguisher and route target

To conclude, the route distinguisher and route target values perform two completely separate functions, and although in a lot of cisco press publications the values are the same (which they can be) it is confusing to someone learning MPLS for the first time as they assume they do the same thing.
The route distinguisher makes a unique VPNv4 address across the MPLS network
The route target defines which prefixes get imported and exported on the PE routers.

If you want go get into Network Automation – please check out my pages on Ansible for Network Engineers 

MPLS Books >

There are a few books I would recommend if you want to go deeper into the subject

Watch out for Part 2 of this mpls tutorial where I will go into more detail on MPLS L3 VPN’s

Want to learn more about Network Automation?

Network Automation skills are becoming a must for network engineers of the future. Get started and learn the skills you need for the future with my course on Ansible for Network Engineers Today!

Show me more about the network automation course
hp instant ink

Roger Perkin - CCIE #50038 is a Network Automation Engineer & CCIE Consultant based in the UK, currently working for Softcat Plc as a Senior Network & Security Consultant.
Rogers' CCIE Journey | About Roger | Contact | Twitter | Linkedin

Previous Post: « Bose Noise Cancelling Headphones for Studying
Next Post: What Cisco did for London 2012 »

Reader Interactions

Comments

  1. Guido says

    May 9, 2013 at 6:22 am

    Thanks! Not only Cisco but Juniper study guides don’t make a clear distinction between the two either, this certainly helped!

    Reply
    • Roger Perkin says

      May 13, 2013 at 11:01 pm

      I am glad I have helped you understand this simple but poorly explained concept!

      Reply
      • Nathaniel says

        October 24, 2014 at 8:46 pm

        Thank you 🙂 Definitely poorly explained. I’ve been working on Cisco equipment for 10 years and it is clear that they have developers (or someone who does not have the correct thought pattern) also write the guides and they can be Sooooo Confusing!! They should send anyone writing a tech article or book of theirs to a class on teaching methodologies or something,. I constantly find myself trying to explain things in a way that are easy to understand and having difficulty doing so because most of the time I learned it from a Cisco configuration guide or one of their books. Thanks again

        Reply
        • Roger Perkin says

          October 30, 2014 at 4:11 pm

          Glad it helped
          Roger

          Reply
  2. chamara says

    August 18, 2014 at 4:22 am

    Thank you very much… this has really helped to understand the concept clearly!!

    Reply
    • Roger Perkin says

      August 22, 2014 at 1:50 pm

      I am glad it has helped. The Route Distinguisher vs Route Target is a very simple concept but easily mis-understood!

      Reply
  3. jignesh says

    September 6, 2014 at 10:26 am

    thanks to explain in easy way. . . .

    Reply
  4. Edward Adikwu says

    October 28, 2014 at 11:56 am

    Hi Roger, Thanks. this was really helpful . I’m with Internet solutions (Dimension Data Nigeria) 🙂

    Reply
  5. Musole says

    September 10, 2015 at 7:43 pm

    Roger, you rock. Absolutely great explanation. Just bumped into this today. Great job.

    Reply
  6. clucas says

    October 13, 2015 at 8:30 pm

    Hi,

    Sorry if it will make some problems in the clean explain of what is RD and what is RT. But if your subnet “S” is connected to two PEs and use RD as ASN:xxx your VPNv4 address is not unique : ASN:xxx:S.
    This is why some engineers use : IP:xxx:s instead.
    And it is a more simple design about load balancing services. This time your remote PE will receive IP_PE1:xxx:S and IP_PE2:xxx:S as VPNv4 address if it has imported the correct RT.

    Your subnet is in this or other VRF by means of the Route Target, not the Route Distinguisher.

    Regards,
    Christophe

    Reply
    • Roger Perkin says

      October 14, 2015 at 3:56 pm

      Thanks Christophe

      Reply
  7. Sunil Soni says

    January 25, 2018 at 12:28 am

    Absolutely great explanation, Roger. Looking forward for your further POSTS.

    Reply
    • Roger Perkin says

      January 26, 2018 at 9:18 pm

      Thanks Sunil, glad it helped

      Reply
  8. Mohamed Yashir says

    July 10, 2018 at 7:54 am

    Thanks Roger. It helped.

    Reply
  9. Tushar says

    September 17, 2018 at 9:51 am

    Nice roger..Appreciated

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About Roger

roger perkin

Roger Perkin, CCIE #50038 is a Senior Network & Security Consultant working for a Cisco Gold Partner in the UK.
He is also an evangelist for Network Automation.

Let’s connect

  • GitHub
  • LinkedIn
  • Twitter
  • YouTube
ccie blueprint popup
Ansible Tutorials for Network Engineers
 

Most Popular Pages

  • Ansible for Network Automation
  • MPLS Configuration Tutorial
  • Cisco 3850 IOS Upgrade
  • Build CCIE Lab with CSR1000V
  • What is Cisco ISE?
  • Route Distinguisher vs Route-Target
  • Folding Laptop Stand Review
  • 19 Best Study Tips
  • Best Vertical Mouse
  • Is CCIE still worth it in 2019?
  • OSPF LSA Types
  • How to clean your computer screen and keyboard
network eyes banner
the ccie blueprint network automation course

Looking for Ansible Network Automation Training?


Learn how to install Ansible, write your first playbook and start automating your network today.


Check out my Ansible Network Automation Training
  • How to Become a Network Engineer
  • Ansible for Network Engineers
  • Check CCIE Status
  • MPLS Configuration Step by Step

The Author

roger perkin ccie network automation engineer
Roger Perkin, (CCIE #50038) is a Senior Network & Security Consultant.
Currently working for Softcat plc.
Roger is an evangelist for Network Automation
and is continuing to develop skills in Ansible and the Devops culture.
Contact

Most Visited Pages

Software Upgrade Guides
Wireless Console Cable
Network Automation Tools 
Bose Connect Windows 10
Private VLANs explained
Cisco ISE Overview

Ansible

Where are Ansible Modules stored
Ansible IOS Command Example
Ansile Backup Cisco Config
How to Install Ansible Tower
Ansible Network Automation Training
Resources

Python

Best way to learn Python

Home Office

Best Vertical Mouse
My Standing Desk
Folding Laptop Stand - Roost
How to clean computer screen and keyboard

Personal Development

How to Focus
Disclaimer | Privacy Policy | Copyright rogerperkin.co.uk 2018 | Sitemap