Description

The following article is an example on how to leak a static default route to a VRF that is part of an EVPN instance for Juniper Networks EX/QFX Series devices running in a collapsed core setup. 

Symptoms

You want to leak a static default route to an IRB running in a VRF that is par of an EVPN domain. 

Solution

First, create a rib-group that will share the routes from the main instance towards the routing-instance, in this example, the irb.101 needs internet access and a default route that is learnt on the inet.0 route table:
set routing-options rib-groups wan import-rib inet.0
set routing-options rib-groups wan import-rib vrf_101.inet.0
Now, create a policy that will only accept the default route:
set policy-options policy-statement default-rt term 1 from route-filter 0.0.0.0/0 exact
set policy-options policy-statement default-rt term 1 then accept
set policy-options policy-statement default-rt term 2 then reject
Apply the policy at the rib-group level:
set routing-options rib-groups wan import-policy default-rt
Call the rib-group under the appropriate protocol, in this case, the protocol is static:
set routing-options static rib-group wan
To create the return path, use the following command so that the main instance sends it to the correct table:
set routing-options static route 10.10.101.0/24 next-table vrf_101.inet.0
After this is committed, you will see the following default route installed:
root@core-1# run show route table vrf_101.inet.0 

vrf_101.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[Static/5] 00:31:18
                    >  to 172.16.0.1 via xe-0/0/0.0
10.10.101.0/24      *[Direct/0] 01:21:13
                    >  via irb.101
10.10.101.1/32      *[Local/0] 01:21:13
                       Local via irb.101
10.10.101.2/32      *[Local/0] 01:21:13
                       Local via irb.101
10.10.101.10/32     *[EVPN/7] 00:05:57
                    >  via irb.101
10.10.101.50/32     *[EVPN/7] 00:06:12
                    >  via irb.101


 

Modification History

2023-07-11 KB created. 

Related Information

https://www.juniper.net/documentation/en_US/junos/topics/example/routing-table-import.html