Junos OS

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  Smaller prefix advertisement/route

    Posted 02-19-2024 05:56

    Hi,

    Hopefully an easy question to answer. 

    I have supplied a /25 address range to a customer and have add a static route to that /25 via the next-hop requirement. However, there is a /24 that already covers this /25 from an advertisement perspective as show below:

    set routing-options generate route 192.168.1.0/24

    But my static route requires the following:

    set routing-options static route 192.168.1.128/25 next-hop <next hop IP>

    When completing a show route 192.168.1.129 it utilises the /24 next hop which is not the correct one for the /25.

    Is there an easy way to override the /24 for the /25 or would I have to remove the /24 routing statement first?



    ------------------------------
    Clive Gwyther
    ------------------------------


  • 2.  RE: Smaller prefix advertisement/route

    Posted 02-19-2024 09:03
    Edited by Dmitriy 02-19-2024 09:04

    Hi, 

    Please check that your interface is in Up state (where static goes to). 

    Please share output of a command:

    > show route range 192.168.1.0/24 all 



    ------------------------------
    WBW,
    Dmitriy
    ------------------------------



  • 3.  RE: Smaller prefix advertisement/route

    Posted 02-19-2024 10:20

    Hi Dmitriy,

    Thank you for the reply.

    The interface is 100% up as we have another static route going there that works perfectly fine.

    Here is the output:

    show route range 192.168.1.0/24 all
    inet.0: 929201 destinations, 4020412 routes (929166 active, 1 holddown, 38 hidden)
    @ = Routing Use Only, # = Forwarding Use Only
    + = Active Route, - = Last Active, * = Both

    192.168.1.0/24   *[Aggregate/130] 1w6d 19:27:42
                        > to <Next-Hop> via ae1.4000
                          to <Next-Hop> via ae3.4000
    192.168.1.16/28  *[IS-IS/18] 1w6d 19:27:42, metric 32
                        > to <Next-Hop> via ae1.4000
                          to <Next-Hop> via ae3.4000
    192.168.1.80/28  *[IS-IS/18] 2d 19:13:49, metric 20
                        > to <Next-Hop> via ae1.4000
                          to <Next-Hop> via ae3.4000



    ------------------------------
    Clive Gwyther
    ------------------------------



  • 4.  RE: Smaller prefix advertisement/route

    Posted 02-19-2024 10:50

    Hi Clive, 

    First of all I don't see the route 192.168.1.128/25 in your output ))

    Secondly, maybe you wanted to say that after static route creation your generated route 192.168.1.0/24 changes its next-hop?

    It's more logically, as

    " The generate route's next-hop is taken from the "primary" contributing route's next-hop. 

    • Choose the route with the lowest route preference (static has 5 vs ISIS 18) 
    • If there's more than one route with the same preference, use the lowest IP address number as a tie breaker"



    ------------------------------
    WBW,
    Dmitriy
    ------------------------------



  • 5.  RE: Smaller prefix advertisement/route

    Posted 02-19-2024 10:54
    Edited by Clive Gwyther 02-19-2024 11:11

    Yes, I noticed that and was looking at the issue.

    Actually, the next-hop does not change. This must be because it does not see the static route, for some reason.

    Is there any other way around this?

    For note, the IP address range 192.168.1.0 is made up for this as the actual addresses are public. So let's say we are looking at the prefix 192.168.225.0/24

    Is it possible that the following is having an effect on the routing:

    set routing-options aggregate route 192.168.224.0/22 community 59816:220

    As the above would take in 192.168.224.1 through to 192.168.227.254



    ------------------------------
    Clive Gwyther
    ------------------------------



  • 6.  RE: Smaller prefix advertisement/route
    Best Answer

    Posted 02-20-2024 03:40

    Better to have the aggregate route in this way:

    routing-options                 
            route 192.168.224.0/22 {
                community 59816:220;
                as-path {
                    origin igp;
                }
                discard;
                active;
            }

    For mor information look at the source:

    https://www.juniper.net/documentation/us/en/software/junos/static-routing/topics/topic-map/config-route-aggregation.html

    Also better to apply the same aggr routes config in at least two routers.

    When you reboot a router, aggr routes stay in the network routing table forever. 



    ------------------------------
    WBW,
    Dmitriy
    ------------------------------



  • 7.  RE: Smaller prefix advertisement/route

    Posted 02-20-2024 09:34

    Thanks Dmitriy,

    I have it all working now with static routes. I changed the next-hop to be the directly connected router instead of the VRRP and then configured a staic route on the directly connected router to the VIP.

    Customer now happy but unfortunately was a bit eager and started giving IPs in the range to their customers. Now we cannot fully test.

    Thanks again



    ------------------------------
    Clive Gwyther
    ------------------------------