Hi Folks,
Please find some SELF-explanation on the same!
lab@re0_re0:r2> show configuration routing-options <<<< static route
static {
route 192.168.1.110/32 next-hop [ 1.1.23.2 1.1.24.2 ];
}
lab@re0_re0:r2> show route 192.168.1.110
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.1.110/32 *[Static/5] 01:08:46
to 1.1.23.2 via ge-0/0/0.23
> to 1.1.24.2 via ge-0/0/0.24
lab@re0_re0:r2> show route 192.168.1.110 extensive
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
192.168.1.110/32 (1 entry, 1 announced)
State: <FlashAll>
TSI:
KRT in-kernel 192.168.1.110/32 -> {1.1.24.2}
*Static Preference: 5
Next hop type: Router
Address: 0x9910010
Next-hop reference count: 2
Next hop: 1.1.23.2 via ge-0/0/0.23
Session Id: 0x0
Next hop: 1.1.24.2 via ge-0/0/0.24, selected
Session Id: 0x0
State: <Active Int Ext>
Age: 1:08:50
Validation State: unverified
Task: RT
Announcement bits (2): 2-LDP 3-KRT <<<< no export policy for ospf
AS path: I
lab@re0_re0:r2> edit
Entering configuration mode
[edit]
lab@re0_re0:r2# set policy-options policy-statement static_to_ospf term 1 from protocol static
lab@re0_re0:r2# set policy-options policy-statement static_to_ospf term 1 then accept
lab@re0_re0:r2# set protocols ospf export static_to_ospf
[edit]
lab@re0_re0:r2# commit and-quit
commit complete
Exiting configuration mode
lab@re0_re0:r2> show route 192.168.1.110 extensive
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
192.168.1.110/32 (1 entry, 1 announced)
State: <FlashAll>
TSI:
OSPF area : 0.0.0.0, LSA ID : 192.168.1.110, LSA type : Extern
KRT in-kernel 192.168.1.110/32 -> {1.1.24.2}
*Static Preference: 5
Next hop type: Router
Address: 0x9910010
Next-hop reference count: 2
Next hop: 1.1.23.2 via ge-0/0/0.23
Session Id: 0x0
Next hop: 1.1.24.2 via ge-0/0/0.24, selected
Session Id: 0x0
State: <Active Int Ext>
Age: 1:10:10
Validation State: unverified
Task: RT
Announcement bits (3): 0-OSPF 2-LDP 3-KRT <<<<<<< configured to export static to ospf
AS path: I
lab@re0_re0:r2> edit
Entering configuration mode
lab@re0_re0:r2# set routing-options static route 192.168.1.110/32 no-ad
^
no-readvertise Don't mark route as eligible to be readvertised
lab@re0_re0:r2# set routing-options static route 192.168.1.110/32 no-readvertise
[edit]
lab@re0_re0:r2# commit and-quit
commit complete
Exiting configuration mode
lab@re0_re0:r2> show route 192.168.1.110 extensive
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
192.168.1.110/32 (1 entry, 1 announced)
State: <FlashAll>
TSI:
KRT in-kernel 192.168.1.110/32 -> {1.1.24.2}
*Static Preference: 5
Next hop type: Router
Address: 0x9910010
Next-hop reference count: 2
Next hop: 1.1.23.2 via ge-0/0/0.23
Session Id: 0x0
Next hop: 1.1.24.2 via ge-0/0/0.24, selected
Session Id: 0x0
State: <Active NoReadvrt Int Ext>
Age: 1:10:40
Validation State: unverified
Task: RT
Announcement bits (2): 2-LDP 3-KRT <<<<<<<< No more advertisement to OSPF
AS path: I
lab@re0_re0:r2>