[j-nsp] how to leak aggregate/generated routes while modifying next-hop

Olivier Benghozi olivier.benghozi at wifirst.fr
Tue Nov 17 10:31:00 EST 2015


Hi Adam,

> Le 17 nov. 2015 à 16:07, Adam Vitkovsky <Adam.Vitkovsky at gamma.co.uk> a écrit :
> 
> Hi Oliver,
> 
> I see, but if you manually created a static route with the correct next-table in the special/dedicated "aggregate" VRF, wouldn’t it be then easier to just manually create the static route in the particular service VRF itself?
> But I agree this way you define the routes just once and then leak tem to all the local VRFs that need them.

I needed to leak such "supernet" routes from VRF 1 to VRF 2, but also some other similar routes from VRF 2 to VRF 1 (by example). It's not possible with static in both VRFs, commit fails (and it's documented, while I think that it's a poor deprecated idea).

And if I create a static route with next-table directly in the service VRF, anyway I still also have to make sure it's not exported to other PEs and other local VRFs.

But you're right it only works with static routes, and neither for aggregate nor generate (which we don't use anyway).


> I’m looking for something automatic (but I guess I’d have to stick with manually defined routes)
> I found out I can do the following but it does not work:
> 
> set policy-options policy-statement TEST_DEFAULT_ROUTE_INJECTION_FIB term DEFAULT from route-filter 0.0.0.0/0 exact
> set policy-options policy-statement TEST_DEFAULT_ROUTE_INJECTION_FIB term DEFAULT from rib TEST_DEFAULT_ROUTE_INJECTION.inet.0
> set policy-options policy-statement TEST_DEFAULT_ROUTE_INJECTION_FIB term DEFAULT then next-hop next-table INTERNET.inet.0
> set policy-options policy-statement TEST_DEFAULT_ROUTE_INJECTION_FIB term DEFAULT then accept
> 
> set routing-options forwarding-table export TEST_DEFAULT_ROUTE_INJECTION_FIB
> 
> It does not alter the next hop for some reason

Didn't have success with such policies when I was looking for a solution (in 2012).
Maybe a Juniguy is reading this and might provide another one? :)


Olivier



More information about the juniper-nsp mailing list