Junos OS

 View Only
last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  Bind a Policy to Static Route

    Posted 09-02-2024 20:04

    Greetings everyone;

    I have a simple question actually, my goal is to create a static default route and route the next-hop of this route to the interfaces where I have established an EBGP neighborhood with the ISP;

    set routing-options static route 0.0.0.0.0/0 next-hop 10.0.0.0.1 (ISP's EBGP interface ip's 10.0.0.1)

    I also want to bind a policy to this configure just like the "genarete" routes. But when I write a static route I can't add a policy. Like;
    set routing-options generate route 0.0.0.0.0/0 policy isp-route-up

    My goal is that my customer says that if the ISP does not announce a specific route (for example 2.2.2.2.2), the router in question should not send the default route to its IBGP neighbors (the router in question is my connection point to the outside world and has 7 IBGP neighbors connected to it)

    I can do this with Generate route, but I have a customer who insistently wants static :D (I'm stuck in such a weird spot because he doesn't want to understand what Generate route is)

    I created the static route on myself, ISP does not send it to me, so I send it to my IBGP neighbors with a policy. I tried to write a term here to say that if the *.*.*.*.*.*/* route does not come from ISP, do not announce the 0.0.0.0/0 route, but I was not successful.

    Any idea what I can do about this? Or I will solve the problem with last resort generate route and drive my customer crazy :D



    ------------------------------
    Can Karani Soner
    ------------------------------


  • 2.  RE: Bind a Policy to Static Route

    Posted 09-02-2024 20:26

    I'm not positive I follow your conditional needs, but I think the example below is the policy you are looking for.  Check for the existence of a particular route and if that route exists then go ahead and advertise the default route to the BGP peer.  

    https://www.juniper.net/documentation/us/en/software/junos/routing-policy/bgp/topics/example/conditional-prefix-installing-configuring.html



    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
    http://puluka.com/home
    ------------------------------