Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
I need to migrate the routers composing an MPLS/VRFs based network to Juniper MX960.
Routers currently used (I avoid specifying the vendor name) have a lot of leaking between VRFs realized using static route which specify as next-hop the target VRF, so let's say that we have two VRFs, VRF_A and VRF_B, current configuration has many static routes in VRF_A specifying as next-hop VRF_B and also many static routes in VRF_B specifying as next-hop VRF_A, besides to that, these static routes are redistrbuted into BGP so remote PEs can receive them.
I know this is not allowed in Juniper routers where the jump to another VRF can be set only in one way, meaning that if there's static in VRF_A having VRF_ B as next-table, the opposite is not permitted in order to avoid loops.
However, using vrf-import and auto-export I have somehow fixed this, but the problem is that I need to advertise these routes imported from other VRFs and I haven't found a way to do it, for example, once I have the route imported from VRF_A into VRF_B table, I cannot export it into BGP to distribute it to remote PEs: if I configure an export policy specifying the imported route and apply it to BGP, it doesn't work.
Is there a way to redistribute this imported routes?
Thanks in advance for your support.
are the routes imported from VRF_A to VRF_B shown in the routing table of the instance?
yes, the usage of auto-export allows to have imported routes of VRF_A appearing in the routing table of VRF_B, but then when I try to export them into BGP to make them available also for remote PEs, it doesn't work.
Could you share the policy options for the BGP?
For importing routes from VRF to another VRF use RIB groups to ensure two-way communication. Also, are the routes from VRF-A shown in the VRF-B?
By «distribute to remote PE», you mean advertise VRF routes in i-MP-BGP, right?
So you have to export the route from the exporting VRF (let's say A), not from the importing VFR (let's say B). So make provisions to export the routes toward remote PE inside your AS inside the export vrf policy of VFR A (by example).
let me explain a bit better the scenario.
We are migrating an MPLS network based on a vendor different from Juniper, to MX960. The network is composed of about 40 PEs with around 50 VRFs. In the current situation we have a huge amount of leaking between VRFs realized via static routes having as next-table the target VRFs; this is done in both directions and unfortunately the same thing isn't allowed in Junos.
I used rib-groups to reproduce the same situation and it works, but from a configuration point of view it's a nightmare because I have to define one rib-group for each VRF containing a big set of tables and then apply to static, interfaces, routing-protocols...
For this reason I was thinking to import routes from a VRF to another using the auto-export feature and then export it into MPBGP to the remote PEs. I know there're also other methods, but in my case this would be the quickest one to avoid configurations on other peers when migrating one of them.
The import phase works, so I can see the route in the VRF, but then it's not exported, don't know why, I mean, maybe this is expected but I am not sure.
Following is the configuration of the PE where I import a loopback from VRF_A into VRF_B and then I try to export it.
You can see in show commands how rhe route appears in VRF_B table, but then it's not advertised into BGP.
You may use a third VRF dedicated to such static routes.
VRF-special containing one route X next instance VRF A, and another router Y next instance VRF B.
VRF B imports the first one, VRF A imports the second one (always using auto-export).
I did this some years ago, plenty of stuff around this to make it work (including no-vrf-advertise to avoid using such routes to other PEs in my case), but this was the idea. Maybe relevant for you, maybe not.