Routing

 View Only
last person joined: 4 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Export routes with multiple next-hops to a routing instance

    Posted 08-28-2020 04:20

    Hi all,

     

    just a bit of info on my topology before getting into the topic. On our edge router we have 4 links connected. One is to our local internet exchange(IX) and the other 3 are to ISPs. From ISPs we are receiving full BGP tables and from the IX specific routes from IX members using BGP. For routes from from IX we have multiple paths/next hops to them(through IX and through the ISPs) but through local preference we use the ones through the IX.

     

    What I would like to do is to export routes with all the next hops to a routing instance. I can export  the active route but I haven't been able to find a solution to export all the next hops/paths to a routing instance.

    Is there a way to export all the next hops to a routing instance?



  • 2.  RE: Export routes with multiple next-hops to a routing instance

    Posted 08-28-2020 05:44

    AS an option you can put every ISP and IX into different routing-instances, and then export all of them to a single one you need. But be careful as fib size will be 3xFV+IX - at least 2.5M routes, and not all line card support this scale 



  • 3.  RE: Export routes with multiple next-hops to a routing instance

    Posted 08-28-2020 05:59

    I don't think this is an option for us right now. But your answer got me thinking perhaps a version of what you are suggesting might work.

     

    What I was thinking is of exporting specific routes with such multiple hops from ISPs and IX into separate routing instances(IX routing instance, ISP1 routing instance, ...) and then exporting these routes back from these routing instances into the routing instance I need with the same metrics.

     

    Could perhaps this work?



  • 4.  RE: Export routes with multiple next-hops to a routing instance
    Best Answer

    Posted 08-30-2020 00:16

    Hello,

     


    @igor.hamzic81 wrote:

     

    What I would like to do is to export routes with all the next hops to a routing instance. 
    Is there a way to export all the next hops to a routing instance?


     

    You need to use RIB-group assigned to a source (under "protocol bgp group BLAH family inet unicast"), and NOT "instance-import|export" policies.

    The example config would be:

     

    
    set routing-options rib-groups GRT-VR1 import-rib inet.0
    set routing-options rib-groups GRT-VR1 import-rib VR1.inet.0
    set protocols bgp group EBGP family inet unicast rib-group GRT-VR1
    set protocols bgp group EBGP neighbor 203.0.113.1
    set protocols bgp group EBGP peer-as 65500 set routing-instances VR1 instance-type virtual-router

     

    All BGP routes received from neighbor 203.0.113.1 will be copied into instance VR1 even if they are not active in GRT.

    HTH

    Thx

    Alex

     

     

     

     



  • 5.  RE: Export routes with multiple next-hops to a routing instance

    Posted 08-31-2020 07:36

    Hi Alex,

     

    that did it. Thanks for the help.



  • 6.  RE: Export routes with multiple next-hops to a routing instance

    Posted 09-01-2020 05:02

    Hi Alex,

     

    just a follow up question. I can see the copied BGP routes in the routing table of the instance with all the next hops. Now I'm trying to load balance the exiting traffic to destinations with multiple next-hops but I'm having trouble installing multiple next hops in the forwarding table.


    I have configured load balancing globally and I can see that static routes with multiple next hops are load balanced in the routing instance but I cannot achieve the same for BGP routes as only 1 route is installed.


    I know I can use multipath in BGP to achieve load balancing but can I do something similar in a forwarding routing instance with imported BGP routes?



  • 7.  RE: Export routes with multiple next-hops to a routing instance

    Posted 09-01-2020 06:30

    Hello,

     


    @igor.hamzic81 wrote:


    I know I can use multipath in BGP to achieve load balancing but can I do something similar in a forwarding routing instance with imported BGP routes?


     

    If Your eBGP paths are all equal up to a router-id , and You are using Local Preference/LP in the BGP import policy in GRT to prefer one of the paths in GRT, then You just need to equalize back the LP in RIB-group import policy, and enable "routing-options multipath" under the instance config. Then You should see #[Multipath/255] route under that instance.

    If Your BGP paths are unequal :

    1/ if they are having different AS_PATH lengths, then You could use "as-path-prepend" knob to equalize them but JUNOS does not support parameterized BGP attributes, so You'd need extensive scripting work to automatically react on ever-changing AS_PATH lengths

    2/ if they are having different MED values, You can rewrite MED in RIB-group import policy, just like LP

    3/ ditto for Origin

    HTHY

    Thx
    Alex

     



  • 8.  RE: Export routes with multiple next-hops to a routing instance

    Posted 09-01-2020 07:08

    I do have unequal AS paths to the same destinations and I this is my main issue. I have already rewritten the MED and local preference values to be equal but the best(shortest) AS path gets installed in the table as it should .

    I think "as-path-prepend" could work but is not a viable solution due to, as you said, the changing nature of AS paths and would need manual corrections to the values we prepend to equalize them.

    Right now I'm considering making static routes with multiple next-hops for the destinations I would like to load balance traffic to as I know that this will work. Luckily it's relatively few routes.