SRX

last person joined: yesterday 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  Conditional BGP routing

    Posted 12-12-2013 01:26

    Is it possible to use the "route-active-on" policy-options feature to check for a static route being reachable, and based on the result stop advertising a different static route?

     

    As an example:

     

    Internal route (static) is 1.1.1.1/24

    External route (static to be advertised via BGP) is 3.3.3.3/24

     

    If 1.1.1.1/24 is no longer reachable then 3.3.3.3/24 stops being advertised out.  I've been looking for a method to do this, and without using scripting I haven't found anything.  I feel like I've overlooked something obvious though.

     

    Thank you in advance for any assistance.



  • 2.  RE: Conditional BGP routing
    Best Answer

     
    Posted 12-12-2013 01:41
    Hi,

    You may try the if-route-exist condition statement, as describes here:

    http://www.juniper.net/techpubs/en_US/junos12.2/topics/example/conditional-prefix-installing-configuring.html

    Hope it helps,
    Mattia


  • 3.  RE: Conditional BGP routing

    Posted 12-12-2013 02:01

    So, based off of that document, does this look proper to you?  I've never used condition checks on policies before, though I imagine the examples are rather spot-on.

     

    Check for connectivity to 1.1.1.2 via bfd, remove the route if it goes down

    Export 3.3.3.3/24 if 1.1.1.2/24 exists in the routing table

    don't export anything if it doesn't exist

     

    set protocols bgp group Public export conditional-export
    set routing-options static route 1.1.1.2/24 next-hop 1.1.1.1
    set routing-options static route 1.1.1.2/24 bfd-liveness-detection minimum-interval 500
    set policy-options policy-statement conditional-export term public_range from route-filter 3.3.3.3/24 exact
    set policy-options policy-statement conditional-export term public_range from condition internal_check
    set policy-options policy-statement conditional-export term public_range then accept
    set policy-options policy-statement conditional-export term otherwise then reject
    set policy-options condition internal_check if-route-exists 1.1.1.2/24
    set policy-options condition internal_check if-route-exists table inet.0

     

    Thanks once more for all your help.



  • 4.  RE: Conditional BGP routing

     
    Posted 12-12-2013 03:26

    Yes, It should work as long as you have a BFD session with the next-hop device, you will be able to get a conditional advertisement.



  • 5.  RE: Conditional BGP routing

    Posted 12-14-2013 00:06

    Thanks much!