SRX Services Gateway
Highlighted
SRX Services Gateway

automatic route change as per tunnel state

‎06-12-2018 10:38 PM
Hi ,
 
                  In my below configuration 192.168.2.0/24 has going via st0.2 & st0.3 ,  my default preference is st0.2.  whenever st0.2 goes down 2.x should go via st0.3 but my problem  is when ever st0.2 is down 2.x going via st0.2 but taking more time and once st0.3 is comes back still traffic trying to go via st0.3
 
I need help about what to do or how to set preferences, whenever st0.2 goes down immediately 2.x traffic should go via st0.3 and once st0.2 is comes back then traffic should go from it immediately without delay
 
 

10.11.11.0/24      *[Direct/0] 1d 21:52:21
                    > via st0.0
10.11.11.11/32     *[Local/0] 11w6d 06:06:31
                      Local via st0.0
12.11.11.0/24      *[Direct/0] 1d 22:15:16
                    > via st0.2
12.11.11.11/32     *[Local/0] 11w6d 06:06:31
                      Local via st0.2
13.11.11.0/24      *[Direct/0] 1d 19:47:17
                    > via st0.3
13.11.11.11/32     *[Local/0] 11w6d 06:06:31
                      Local via st0.3
192.168.2.0/24     *[Static/5] 1w6d 07:50:25
                    > via st0.2
                       via st0.3
192.168.6.0/24     *[Static/5] 1d 22:15:16
                    > via st0.2
192.168.11.0/24    *[Static/5] 1d 21:52:21
                    > via st0.0
192.168.20.0/24    *[Static/5] 1d 19:47:17
                    > via st0.3
192.168.40.0/24    *[Static/5] 1d 19:47:17

                    > via st0.3
 
static {
    route 192.168.200.0/24 next-hop st0.0;
    route 192.168.2.0/24 next-hop [ st0.2 st0.3 ];
    route 192.168.11.0/24 next-hop st0.0;
    route 192.168.202.0/24 next-hop st0.0;
    route 192.168.203.0/24 next-hop st0.0;
    route 192.168.201.0/24 next-hop st0.0;
    route 192.168.204.0/24 next-hop st0.0;
    route 0.0.0.0/0 next-hop x.x.x.x;
    route 192.168.6.0/24 next-hop st0.2;
    route 192.168.20.0/24 next-hop st0.3;
    route 192.168.40.0/24 next-hop st0.3;
}

 
2 REPLIES
SRX Services Gateway

Re: automatic route change as per tunnel state

‎06-12-2018 11:15 PM

Try if this helps

route 192.168.2.0/24 {
next-hop st0.2;
qualified-next-hop st0.3 {
preference 6;
}
}

Whats on the other side of the tunnel? If also SRX there is an option to configure BFD for static routes but I'm not sure if it works with unnumbered interfaces.

https://www.juniper.net/documentation/en_US/junos/topics/example/policy-static-routes-bfd.html

 

Regards, Wojtek

SRX Services Gateway

Re: automatic route change as per tunnel state

‎06-19-2018 09:23 PM

Use aggressive VPN-Monitoring parameters to get the st0 flaps quickly when VPN is down.

Thanks,
Suraj
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too