Community discussions

MikroTik App
 
Muzzo
just joined
Topic Author
Posts: 12
Joined: Fri Oct 28, 2016 5:43 pm

Static route invalidated when vpn connection goes down

Thu Feb 23, 2017 3:51 pm

Hi All,

I have two mikrotiks in this example: Head office and branch office. The branch office establishes a pptp connection to the head office. On the head office router I have a static route stating that to get to 10.5.5.10 (in branch office) use branch office pptp vpn connection. This works fine. Unfortunately when the branch office internet connection is affected/drops out and the pptp vpn connection goes down, the static route in the HQ mikrotik becomes invalid. The gateway becomes unreachable and even when the vpn from branch office to HQ comes up again, the static route in HQ mikrotik doesn't come back, it stays down. I have to go in and re-select the vpn gateway to make that static route work again.

How would you guys deal with this? Have a script that keeps checking the gateway and if it's up keep recreating the static route (in case it went down) or is there a smarter way to handle a flaky connection and maintain this static route to the branch office?

Thanks guys.
 
User avatar
blajah
Member Candidate
Member Candidate
Posts: 222
Joined: Fri Jun 12, 2015 8:58 pm
Location: Belgrade, Serbia
Contact:

Re: Static route invalidated when vpn connection goes down

Thu Feb 23, 2017 4:38 pm

Hi,

i think you can use check-gateway option in existing static route. That would resolve your issue.
 
Muzzo
just joined
Topic Author
Posts: 12
Joined: Fri Oct 28, 2016 5:43 pm

Re: Static route invalidated when vpn connection goes down

Fri Feb 24, 2017 7:25 pm

Many thanks Blajah, I'll try that out. much appreciated.
 
Muzzo
just joined
Topic Author
Posts: 12
Joined: Fri Oct 28, 2016 5:43 pm

Re: Static route invalidated when vpn connection goes down

Sun Feb 26, 2017 12:28 pm

I tried this option, when the route is not available any longer - even with this option to check gateway with ping or arp - the route becomes invalid as the gateway is not reachable. It doesn't come back when the gateway becomes reachable again, it stays unreachable. Is there a script that I could run to get this route up again or some other method of reinstating this route?
Many thanks.

Who is online

Users browsing this forum: almdandi and 93 guests