Junos OS

last person joined: 6 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  Static route with Retain Option

    Posted 06-23-2018 22:39

    Hi everyone.

     

    Please consider the following example:

    H1-10.10.10.1 -10.10.10.2 R1-f0-12.12.12.1-----12.12.12.2 fo R2--20.20.20.2--20.20.20.2

    R1 :

    set routing-option static route 20.20.20.2/32 next-hop 12.12.12.2

    We want to acheive following goal:

    R1 must retain the static route 20.20.20.20/32 in routing table even if next hop or interface f0 on R1 is down.

     

    I am looking at " retain" option below, but not sure if it will do the trick as it says it is applicable if  Routing process on R1 shuts down. Am i reading it correctly?

     

    Thanks and have a nice weekend!!

     

    Hierarchy Level

    [edit routing-options static (defaults | route)]

    Description

    Configure statically configured routes to be deleted from or retained in the forwarding table when the routing protocol process shuts down normally.

    • retain—Have a static route remain in the forwarding table when the routing protocol process shuts down normally. Doing this greatly reduces the time required to restart a system that has a large number of routes in its routing table.

     

     

     

     

     

     

     



  • 2.  RE: Static route with Retain Option

    Posted 06-23-2018 23:15
    if the interface goes down, the route will be deleted from the routing-table (atleast what I am seeing in my LAB)


  • 3.  RE: Static route with Retain Option

    Posted 06-24-2018 18:28

    thanks



  • 4.  RE: Static route with Retain Option
    Best Answer

    Posted 06-24-2018 04:12

    The option you are looking for is passive.  This will change the route to reject keeping it in the table when the interface is down.

     



  • 5.  RE: Static route with Retain Option

    Posted 06-24-2018 18:28

    Thanks Spuluka.



  • 6.  RE: Static route with Retain Option

    Posted 07-30-2021 13:41
    Can you give an use-case we should use retain option.

    • retain-Have a static route remain in the forwarding table when the routing protocol process shuts down normally. Doing this greatly reduces the time required to restart a system that has a large number of routes in its routing table.
    I don't understand "the routing protocol process" mentioned in the above sentence.
    Hope your help.
    Many thanks.

    ------------------------------
    NAM NGUYEN
    ------------------------------