1

i'm learning L3VPN by myself and route target did confused me a lot. I have a question that i can not find the answer. The question is: Does L3VPN work without route target ? I have this question because i saw this happened in real life.
Thanks in advance!

3

L3VPN has to have their PE (label edge routes) configured with RD, route-target import/export in particular VRFs. That's only for purpose of control plane.

To make it clear, let me make brief explanation of RD and route-target.

route distinguisher (RD) is used in order discern which prefix belongs to which customer. As you probably know from your own studies, same prefix can be used by multiple customers. E.g. 192.168.0.0/24 can use customer A and also customer B inside their LANs.

You have to be aware that The VPNV4 family itself doesn’t run in a VRF. So purpose of RD is only to make IPv4 prefixes globally unique, when BGP advertise NLRI to each other.

It's 8 bytes long field. See it below in blue box.

Wireshark capture

Router-target import/export is necessary to determine which prefix belongs to which VRF (customer). So when BGP sending update, also include extended community depends on route-target export.

And when particular PE router received that BGP update. He can easily recognize to which VRF prefix belongs, depends on route-target import.

For above image from Wireshark, extended community has been included by PE router (10.0.0.3) depends on route-target export (red box). And will be included into appropriate VRF by another PE router (10.0.0.4) once he received that update, thanks to route-target import.

When you will be familiar enough with above. You can study more advance features, like route leaking between routing tables, etc...

I created simple MPLS network, so we can make some practical examples.

(Topology contains only one customer CUST_A) enter image description here

When configuration of VRF for CUST_A is following on both PE routers:

PE_1#sh run | s ip vrf CUST_A
ip vrf CUST_A
 rd 10:10
 route-target export 10:10
 route-target import 10:10
PE_1#

PE_2#sh run | s ip vrf CUST_A
ip vrf CUST_A
 rd 10:10
 route-target export 10:10
 route-target import 10:10

CE_2 router has network 192.168.0.0/24 known from CE_1 in his routing table.

CE_2#sh ip ro | b Gateway
Gateway of last resort is not set

     10.0.0.0/30 is subnetted, 2 subnets
C       10.4.6.0 is directly connected, FastEthernet0/0
B       10.3.5.0 [20/0] via 10.4.6.1, 00:48:52
B    192.168.0.0/24 [20/0] via 10.4.6.1, 00:48:52
C    192.168.1.0/24 is directly connected, Loopback0
CE_2#

In next example I will remove route-target import from particular VRF configuration of CUST_A on PE_2 (R4 in topology) router.

PE_2(config)#ip vrf CUST_A
PE_2(config-vrf)#no route-target import 10:10
PE_2(config-vrf)#

I can't see prefix 192.168.0.0/24 in BGP VPNV4 table of PE_2 and in routing table of CE_2 router as well.

PE_2#sh bgp vpnv4 unicast all
BGP table version is 23, local router ID is 10.0.0.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 10:10 (default for vrf CUST_A)
r> 10.4.6.0/30      10.4.6.2                 0             0 200 ?
*> 192.168.1.0      10.4.6.2                 0             0 200 ?
PE_2#

CE_2#sh ip ro | b Gateway
Gateway of last resort is not set

     10.0.0.0/30 is subnetted, 1 subnets
C       10.4.6.0 is directly connected, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Loopback0
CE_2#

Even if it's advertised from PE_1 (route R3 in topology) router correctly (with correct RD and RT in NLRI):

PE_1#sh bgp vpnv4 unicast all neighbors 10.0.0.4 advertised-routes | b Network
   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 10:10 (default for vrf CUST_A)
r> 10.3.5.0/30      10.3.5.2                 0             0 100 ?
*> 192.168.0.0      10.3.5.2                 0             0 100 ?

Total number of prefixes 2
PE_1#

I can do more examples, but I hope it's clear enough now. Hope it helps.

Feel free to drop a comment in case of any misunderstanding.

2
  • so that's mean L3VPN can not work without Route target @Daniel Blazek
    – Tam
    Aug 19 '15 at 15:57
  • no L3vpn cannot work without route-target. Without RT the VRF rib will not be populated with any routes received from remote site. They will just end up in vpnv4 table of BGP in global VRF , but would never make it to the VRF RIB
    – Hemanth
    Aug 28 '17 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.