Community discussions

MikroTik App
 
tuxedo0801
just joined
Topic Author
Posts: 14
Joined: Wed Mar 24, 2021 8:58 am

No internet connection after PPPOE reconnect (disable, pause, enable)

Sat Mar 27, 2021 8:48 am

Hi there,

I'm relatively new to RouterOS and in preparation of switching to FTTH end of this year I recently switched from my DSL providers "AVM FritzBox" to a nice Mikrotik hEX S. The old AVM FritzBox is configured to allow PPOE passthrough (to act as a kind of DSL modem) and Mikrotik now does all the PPPOE connection and routing stuff. DSL Provider is 1&1 here in Germany.

All works quite well... internet connectivity, firewall, portforwarding, ... except the PPPE reconnect script that runs every night.

The problem is: It reconnects every night, but not every night the internet conectivity is back after PPPOE is connected...

My reconnect script:
:log info "PPPOEreconnect: starting disconnect"
/interface pppoe-client disable [find name="pppoe-out1"]
:log info "PPPOEreconnect: waiting ..."
:delay 10
:log info "PPPOEreconnect: starting connect"
/interface pppoe-client enable [find name="pppoe-out1"]

The log from this night where the internet connectivity was not given after reconnect:
Mar 27 03:00:00 router.lan script,info PPPOEreconnect: starting disconnect
Mar 27 03:00:00 router.lan pppoe,ppp,info pppoe-out1: terminating... - administrator request
Mar 27 03:00:00 router.lan pppoe,ppp,info pppoe-out1: disabled
Mar 27 03:00:00 router.lan system,info device changed by admin
Mar 27 03:00:00 router.lan script,info PPPOEreconnect: waiting ...
Mar 27 03:00:10 router.lan script,info PPPOEreconnect: starting connect
Mar 27 03:00:11 router.lan pppoe,ppp,info pppoe-out1: initializing...
Mar 27 03:00:11 router.lan pppoe,ppp,info pppoe-out1: connecting...
Mar 27 03:00:11 router.lan system,info device changed by admin
Mar 27 03:00:11 router.lan pppoe,ppp,info pppoe-out1: authenticated
Mar 27 03:00:11 router.lan pppoe,ppp,info pppoe-out1: connected
Mar 27 03:00:11 router.lan interface,info pppoe-out1 detect UNKNOWN
Mar 27 03:00:17 router.lan interface,info pppoe-out1 detect INTERNET
Mar 27 03:00:24 router.lan script,info DDNS: IP-DDNS = 93.222.86.xxx
Mar 27 03:00:24 router.lan script,info DDNS: IP-Curent = 93.197.209.xx
Mar 27 03:00:24 router.lan script,info DDNS: Update IP needed, Sending UPDATE...!
After the reconnect you see my dynamic dns update script trying to send an update with the new IP (anonymized it with 'xxx').
The DDNS script fails sending the update every time. But PPPOE claims it has a new IP and that it is connected.

I'm a bit lost now. Rebooting the whole router fixes the problem. But that's only a temporary solution.
I currently have no idea what happend and why I cannot send any packet to the internet. Even a simple ping to a known IP (1.1.1.1 f.i.) is not working.

What puzzles me most: It's just an disable/pause/enable of the PPPOE connection ... So how and why should it break... sometimes?!

I created an supout.rif before doing the reboot (if that helps?!).

Can anyone give me a hint on what could be wrong?

br,
Alex
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Sat Mar 27, 2021 7:47 pm

If, under /interface detect-internet, anything else than none is configured for detect-interface-list, change that to none.

If that doesn't help, post the export of your configuration. See my automatic signature below regarding anonymisation.

Out of curiosity, what are your reasons to disconnect and reconnect the PPPoE nightly?
 
tuxedo0801
just joined
Topic Author
Posts: 14
Joined: Wed Mar 24, 2021 8:58 am

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Sat Mar 27, 2021 9:20 pm

My provider drops after 24hrs the connection and it then needs to be reestablished. If I do it on my own by script, I have full control over when this happens.
If, under /interface detect-internet, anything else than none is configured for detect-interface-list, change that to none.

If that doesn't help, post the export of your configuration. See my automatic signature below regarding anonymisation.
I can change this, but can you pls. explain what this does?

The internet is up and running, but not working. How can disable "detect internet" help?

https://wiki.mikrotik.com/wiki/Manual:Detect_internet says:
Internet
WAN interfaces that can reach cloud.mikrotik.com using UDP protocol port 30000 can obtain this state. Reachability is checked every minute. If cloud is not reached for 3 minutes, state falls back to WAN.
So it's just changing the state of the interface... but if state is not changed to "internet"... what's the benefit?
Accoding to my log shown in my post, detection worked ... And this puzzles me a bit... I cannot reach the internet, but the detection mechanism was able to check cloud.mikrotik.com on UDP 30000....

br,
Alex
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Sat Mar 27, 2021 9:45 pm

The internet is up and running, but not working. How can disable "detect internet" help?

I don't think any MT user ever found out what function "detect internet" offers that's not available otherwise. However, there is a number of reports of weird problems which went away after disabling this function.
 
tuxedo0801
just joined
Topic Author
Posts: 14
Joined: Wed Mar 24, 2021 8:58 am

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Sat Mar 27, 2021 10:01 pm

Ok, then... I will try it.

If someone has any further hints, pls. let me know.

be,
Alex
 
tuxedo0801
just joined
Topic Author
Posts: 14
Joined: Wed Mar 24, 2021 8:58 am

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Sun Mar 28, 2021 7:12 pm

Some feedback: I used a 3sec delay between disconnect and reconnect, while the router I used before (AVM FritzBox) had about 0..1sec delay.

I now set the delay to just 1sec and added an own "detect internet connectivity check" at the end of the script: Script now pings 5 times 1.1.1.1 public IP. If each request fails, router will reboot (and log to remote syslog server). I will observe this the next few days and see if the still enabled "detect internet" feature is really the reason. I will do some more experimenting with this feature as soon as the problem occurs again.
 
Ddram
just joined
Posts: 19
Joined: Mon Feb 08, 2021 7:56 pm

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Sun May 23, 2021 5:40 pm

Hi everybody!

Are there any updates on this topic? I've got the same problem, with forced reconnects from provider (every 24 hours), but not every time. Sometimes the problem comes with the first reconnect sometimes with the fourth. I've never had a complete week without this issue.

Other threads mention a solution with disabling/enabling the pppoe- and etherinterface. I will try the different solutions with a scheduled script.

Thanks for your Tips
 
tuxedo0801
just joined
Topic Author
Posts: 14
Joined: Wed Mar 24, 2021 8:58 am

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Thu May 27, 2021 3:46 pm

Hi @Ddram,

I had the "detect internet" option disabled for almost a month. System was stable. The nightly scheduled DSL reconnect (script that runs every 3am and disabled, waits and re-enables PPPOE connection) worked without any flaws and directly after ths reconnect I was in fact online.

Now I re-enabled the "detect internet" option and system is again "unstable": Every few days, directly after the scheduled DSL reconnect, my separate script detects that although PPPOE claims that it's only and has an public IP, no connection to any destination on the internet is possible, and therefore reboots the mikrotik router.

With help of this speciakl script the nightly downtime for the scheduled reconnect might be a bit longer, but this overcomes the issue with "PPPOE claims that I'm online, but no connection is possible".

I have an iea what caused this issue, but I need to further analyse it. Will report mack in 1-2 weeks.

br,
Alex

P.S. at least here in Germany, I don't know of any ISP that does not force your DSL connection for a 24hrs reconnect. My nightly-scheduled reconnect script forces this reconnect to happen every morning at 3am.
 
tuxedo0801
just joined
Topic Author
Posts: 14
Joined: Wed Mar 24, 2021 8:58 am

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Wed Jun 02, 2021 11:10 am

Just found out:

My mikrotik-router is connected via ether1 to my AVM FritzBox, which does not establish a connection by itself, but rather provides PPPOE-PassThrough. So the FritzBox has 192.168.178.0/24 network with DHCP running. Makes only sense to participate in this network to reach out PPPOE and open the FritzBox Webinterface.

Once I enable internet-detection on my mikrotik router, it creates a non-editable - but deleteable - DHCP client for on the 192.168.178./24 network AND it has the checkbox enabled for "add default route".

With that I had two routes to 0.0.0.0/0:
DeepinBildschirmfoto_Bereich auswählen_20210602100300.png
The fist one makes sense... all non-local connections goe to PPPOE...

The 2nd makes not that much sense: all non-local connections goe to 192.168.178.1.... This IP exists ...it's the AVM FritzBox. But as the fritzbox does not establish a connection this would lead to a dead-end.

I removed the non-editable DHCP client entry and created a copy, but without the checkbox for default route. Now the 2nd route is gone.

My guess is, that, as both routes have the same distance and same dest.adress, the router sometimes takes the one, sometimes the other. Until the next PPPOE reconnect.

Will see if this solves my problem permanently.
You do not have the required permissions to view the files attached to this post.
 
Ddram
just joined
Posts: 19
Joined: Mon Feb 08, 2021 7:56 pm

Re: No internet connection after PPPOE reconnect (disable, pause, enable)

Thu Jun 17, 2021 9:04 pm

Hi @tuxedo!

Sorry for my late reply, i didn't receive any notification about this thread.

I've solved my problem (well i think so). "Internet Detect" is activated and i scheduled a interface disable/enable code like you wrote. It works from PPPoE to Ether1 (modem) and the reverse way to enable. I've 9 days without reboot and everything is fine (except of some scripting, vpn and line problems).

So from my point there is no problem with "Internet Detect" but with the 24h reconnect, maybe some kind of protocol based hickup? I don't know :)


Well as your 2nd post statet two rules for 0.0.0.0/0 with the same distance, surely was the problem. I had a Fritzbox as bridged modem in the past, but disabled the dhcp on it. I switched it for a Zyxel modem, because my unbound dns resolver couldn't reach any external DNS-Server (this problem was a real pain to figure out).

I've configured the modem with a static ip, put an address within its range on ether1 (default route was added automatically, i guess) and added a nat masqerade rule in my firewall config. This way i can configure or reboot the zyxel if needed. Maybe it works for you to? I've found this somewhere as a quick and dirty workaround so there is no need to configure the modem with static routes.
;;; Outbound to Zyxel for Configuration
      chain=srcnat action=masquerade to-addresses=192.168.1.1 
      dst-address=192.168.1.1 out-interface=ether1 log=no log-prefix="" 
I hope, one way or the other, it works for you ;)

Who is online

Users browsing this forum: johnson73, mbovenka, rplant and 89 guests