Community discussions

MikroTik App
 
pyeager
just joined
Topic Author
Posts: 19
Joined: Fri Dec 09, 2016 2:48 pm

Static Route Loses Gateway

Wed Jan 12, 2022 8:05 pm

We are using L2TP to connect our main location to a remote location. Our main location is the L2TP server.

A static route (IP>Routes) directs traffic destined for the remote network to the L2TP connection as gateway.

It appears that if the L2TP connection goes down, the route loses that gateway definition, even after the L2TP connection comes back up.

We are currently running 6.49.2, and the problem seems to have started sometime around the update to 6.48, possibly earlier.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Static Route Loses Gateway

Wed Jan 12, 2022 8:25 pm

Your description is not really clear, but let's suppose the static route to suffer is at the L2TP server.

Normally, the server side interface for all the PPP-like tunnels is generated dynamically, so its name is something like <l2tp-pppsecretname>. To statically reserve an interface which doesn't disappear when the client disconnects, you have to add it using /interface l2tp-server add name=the-static-name user=ppp-secret-name. Then, you can make that static name the gateway of the route, you can refer to it in /ip firewall rules etc. Have you done it this way, and nevertheless the route loses the gateway in 6.49.2?

Yet another possibility is to set the route as the routes parameter of the /ppp secret item; in that case, the route is added automatically whenever the client connects. So if it's really broken in 6.49.2, you may use this as a workaround.
 
pyeager
just joined
Topic Author
Posts: 19
Joined: Fri Dec 09, 2016 2:48 pm

Re: Static Route Loses Gateway

Thu Jan 13, 2022 6:22 am

Thanks for responding!

Looking at things today, it seems that the most recent time the L2TP connection went down was when I updated the router at our main location to 6.49.2 last night.

I opted for your second option - adding the route to the PPP secret option. I waited until doing so would not interrupt operations, and rebooted the router.

This time it came up with the route in place, so the remote location was accessible.

I am very grateful for your suggestion.

However, it seems to be a bug that if a static route is pointed to a L2TP interface, that assignment is lost if the L2TP interface goes down and then comes back up.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Static Route Loses Gateway

Thu Jan 13, 2022 10:21 am

If you do have that static /interface l2tp-server binding in place, the fact that the static route loses the gateway if the client disconnects is indeed a bug. If you don't, it is not a bug, because the fact that the dynamically created interface disappears as soon as the client disconnects is an intention. Could it be that the client was up all the time since you've first configured it until the upgrade, so you haven't thought about creating the static bindings?

Who is online

Users browsing this forum: deejay2, Google [Bot], GSULLCA, kakiharaNL and 147 guests