Example 3 - D-PATH configuration

The example in the following figure shows a typical Layer 3 EVPN DC gateway scenario where EVPN-IFF routes are translated into IPVPN routes, and vice versa. Because redundant gateways are used, this scenario is subject to Layer 3 routing loops, and the D-PATH attribute helps preventing these loops in an automatic way, without the need for extra routing policies to tag or drop routes.

Figure 1. Use of D-PATH for Layer 3 DC gateway redundancy

The following is the configuration of the VPRN or R-VPLS services in DGW1 and DGW2 in the preceding figure.

A:DGW1# configure service vprn 20 
A:DGW1>config>service>vprn# info 
----------------------------------------------
            interface "sbd-1" create
                vpls “sbd-1”
                    evpn-tunnel
                exit
            exit  
            segment-routing-v6 1 create
                locator "LOC-1"
                    function
                        end-dt46
                    exit
                exit
            exit
            bgp-ipvpn
                segment-routing-v6
                    route-distinguisher 192.0.2.1:20
                    srv6-instance 1 default-locator "LOC-1"
                    source-address 2001:db8::1
                    vrf-target target:64500:20
                    domain-id 65000:2
                    no shutdown
                exit
            exit
            no shutdown 
*A:DGW1# configure service vpls "sbd-1" 
*A:DGW1>config>service>vpls# info 
----------------------------------------------
            allow-ip-int-bind
            exit
            vxlan instance 1 vni 1 create
            exit
            bgp
            exit
            bgp-evpn
                evi 1
                ip-route-advertisement domain-id 65000:1
                vxlan bgp 1 vxlan-instance 1
                    no shutdown
                exit
            exit
            stp
                shutdown
            exit    

A:DGW2# configure service vprn 20 
A:DGW2>config>service>vprn# info 
----------------------------------------------
            interface "sbd-1" create
                vpls “sbd-1”
                    evpn-tunnel
                exit
            exit  
            segment-routing-v6 1 create
                locator "LOC-1"
                    function
                        end-dt46
                    exit
                exit
            exit
            bgp-ipvpn
                segment-routing-v6
                    route-distinguisher 192.0.2.2:20
                    srv6-instance 1 default-locator "LOC-1"
                    source-address 2001:db8::2
                    vrf-target target:64500:20
                    domain-id 65000:2
                    no shutdown
                exit
            exit
            no shutdown 
*A:DGW2# configure service vpls "sbd-1" 
*A:DGW2>config>service>vpls# info 
----------------------------------------------
            allow-ip-int-bind
            exit
            vxlan instance 1 vni 1 create
            exit
            bgp
            exit
            bgp-evpn
                evi 1
                ip-route-advertisement domain-id 65000:1
                vxlan bgp 1 vxlan-instance 1
                    no shutdown
                exit
            exit
            stp
                shutdown
            exit       

The following considerations apply to the example configuration shown in Figure 1.

If PE1 sends an EVPN-IFF route 10.0.0.0/24 that is imported by both DGW1 and DGW2, then, when DGW1 and DGW2 receive each other’s routes, they identify the D-PATH attribute and compare the list of domains with the locally configured domains in the VPRN. Since the domain matches one of the local domains, the route is not installed in the VPRN route table and it is flagged as a looped route (the show router bgp routes detail or hunt commands show DPath Loop VRFs: 20). In this way loops are prevented.