Junos
Junos

VRRP Tracking default route 0.0.0.0/0 with next hop of ISP IP

[ Edited ]
‎10-18-2019 04:55 AM

I have x4 Juniper routers scenarios where x2 routers at each site. 

 

Router A is connected to one ISP and learn default route via BGP- Router C connected to Router A at same site receives this default route from A as BGP is injecting default route into ospf.

 

Router B is connected to 2nd  ISP and learns default route via BGP- Router D connected to Router B at same site receives this default route from B as BGP is injecting default route into ospf.

 

I have number of LAN ports on A and C / B and D which are polling WAN ports on both A and B. incase of WAN port going down the other router connected to them quickly kicks in as primary.

 

My situation is as all routers are running ospf therefore we are learning x2 default routes at each site to reroute traffic when ISP A or B goes down. 

 

My question is if there is a default route 0.0.0.0/0 with next hop of ISP1 concept in Juniper where I keep tracking default route via next hope and if that hop is not available then bring vrrp down and get the backup become master?

 

 

Schematic attached. 

 

Network.jpg

 

 

2 REPLIES 2
Highlighted
Junos

Re: VRRP Tracking default route 0.0.0.0/0 with next hop of ISP IP

‎10-18-2019 12:58 PM

Can you please clarify the whole setup as based on your other post - https://forums.juniper.net/t5/Junos/VRRP-Tracking-default-0-0-0-0-0-BGP-route/td-p/469244

you are saying that you are exporting all OSPF routes back to BGP, does that mean you are also running iBGP between all of the mentioned routers and exporting OSPF routes to iBGP? 

Either way running OSPF only or iBGP between all of them should hopefully have easy solution by rejecting the default route be it in OSPF or BGP import policy at routers A & B.

 

 

 

Highlighted
Junos

Re: VRRP Tracking default route 0.0.0.0/0 with next hop of ISP IP

[ Edited ]
‎10-19-2019 05:37 AM

Hello,

 


simon.widdup@gmail.com wrote:

 

 

My question is if there is a default route 0.0.0.0/0 with next hop of ISP1 concept in Juniper where I keep tracking default route via next hope and if that hop is not available then bring vrrp down and get the backup become master?

 

 

This is possible with OSPF route tagging, 1 extra route instance on routers C & D + route leaking between GRT and that instance.

The algorithm:

1/ make sure You tag the 0/0 route on export to OSPF in router-A and router-B with unique tags. Example code for router A:

 

set policy-options policy-statement OSPF-EX term t1 from protocol bgp
set policy-options policy-statement OSPF-EX term t1 from route-filter 0.0.0.0/0 exact
set policy-options policy-statement OSPF-EX term t1 then tag 100
set policy-options policy-statement OSPF-EX term t1 then accept
set policy-options policy-statement OSPF-EX then reject

 

On router B, choose a different tag value.

 

2/ On routers C and D, create 1 extra routing-instance as below :

 

set routing-instances ISOLATE_OSPF_0/0 instance-type virtual-router
set routing-instances ISOLATE_OSPF_0/0 routing-options instance-import OSPF_0/0

 

3/ On routers C and D, leak 0/0 route from GRT to that newly created routing instance with strict match on OSPF tag:

 

set policy-options policy-statement OSPF_0/0 term t1 from instance master
set policy-options policy-statement OSPF_0/0 term t1 from protocol ospf
set policy-options policy-statement OSPF_0/0 term t1 from tag 100
set policy-options policy-statement OSPF_0/0 term t1 from route-filter 0.0.0.0/0 exact
set policy-options policy-statement OSPF_0/0 term t1 then accept
set policy-options policy-statement OSPF_0/0 then reject

 

4/ On routers C and D, create a VRRP track config that watches the 0/0 route in that newly created routing instance:

 

set interfaces ge-0/0/2 unit 0 family inet address 203.0.113.1/24 vrrp-group 12 virtual-address 203.0.113.12
set interfaces ge-0/0/2 unit 0 family inet address 203.0.113.1/24 vrrp-group 12 priority 120
set interfaces ge-0/0/2 unit 0 family inet address 203.0.113.1/24 vrrp-group 12 preempt
set interfaces ge-0/0/2 unit 0 family inet address 203.0.113.1/24 vrrp-group 12 track route 0.0.0.0/0 routing-instance ISOLATE_OSPF_0/0 priority-cost 90

 

Now, if router A loses 0/0 route, the "ISOLATE_OSPF_0/0" routing instance on router C will be empty. Hence the VRRP master on router C ge-0/0/2.0 will decrease own priority to 120-90=30 and router D will become VRRP master.

Once router A reacquires 0/0 route from eBGP neighbor, the "ISOLATE_OSPF_0/0" routing instance on router C will be populated with 0/0 route tagged with tag value 100, and VRRP on router C ge-0/0/2.0 will increase own priority to 30+90=120 and router C will become VRRP master again.

 

HTH

Thx

Alex

 

 

 

 

 

 

 

 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Feedback