Community discussions

MikroTik App
 
SuporteTap
just joined
Topic Author
Posts: 2
Joined: Fri Sep 09, 2022 8:51 pm

reconnect pppoe if gateway wrong

Fri Sep 09, 2022 9:08 pm

Good afternoon, I have a problem with the pppoe connection, for some reason that my provider is unaware of when it has a connection drop, it is connecting to the wrong gateway, what happens when this happens is that it does not access pages, but I can ping via ip; I have 4 more mikrotik that the same problem occurs and I can access them externally normally when this occurs, I have to manually reconnect; would it be possible to do it automatically? If the connection does not take the correct gateway the connection is automatically reconnected.

Mikrotik CRS326-24G-2S+
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: reconnect pppoe if gateway wrong  [SOLVED]

Sun Sep 11, 2022 8:22 pm

The tool you need is scripting.

/system scheduler add name=pppoe-watchdog start-time=startup interval=1m on-event={:if ((([/interface pppoe-client monitor pppoe-out1 once as-value]->"remote-address") <> ip.of.proper.gw) and ([:len [/ip firewall address-list find list=pppoe-delay]] = 0)) do={/interface pppoe-client disable pppoe-out1 ; /interface pppoe-client enable pppoe-out1 ; /ip firewall address-list add list=pppoe-delay address=0.0.0.0 timeout=5m}}
 
SuporteTap
just joined
Topic Author
Posts: 2
Joined: Fri Sep 09, 2022 8:51 pm

Re: reconnect pppoe if gateway wrong

Tue Sep 13, 2022 1:41 pm

The tool you need is scripting.

/system scheduler add name=pppoe-watchdog start-time=startup interval=1m on-event={:if ((([/interface pppoe-client monitor pppoe-out1 once as-value]->"remote-address") <> ip.of.proper.gw) and ([:len [/ip firewall address-list find list=pppoe-delay]] = 0)) do={/interface pppoe-client disable pppoe-out1 ; /interface pppoe-client enable pppoe-out1 ; /ip firewall address-list add list=pppoe-delay address=0.0.0.0 timeout=5m}}
Good morning,

Thank you so much!

Who is online

Users browsing this forum: iustin, jamesperks, mkx, patrikg, rjuho, seriquiti and 67 guests