Frequent WAN disconnects (WRT3200ACM)

Hi,

i'm using LEDE Reboot SNAPSHOT r2713-3e2c60e / LuCI Master (git-17.001.43128-3366c25) Kernel 4.4.39 on a WRT3200acm and it's functioning quite well. I updated yesterday all packages except

root@lede:~# opkg upgrade kmod-mwlwifi
Upgrading kmod-mwlwifi on root from 4.4.39+10.3.2.0-20161220-1 to 4.4.39+10.3.2.0-20161222-1...
Downloading http://downloads.lede-project.org/snapshots/targets/mvebu/generic/packages/kmod-mwlwifi_4.4.39+10.3.2.0-20161222-1_arm_cortex-a9_vfpv3.ipk.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-mwlwifi:
 *      kernel (= 4.4.39-1-88f50f494941fb1d66b4459a3747577f) *

However, when the router had frequent wan disconnects (3 - 20 mins) i tried increasing lcp echo failures in /etc/ppp/options

lcp-echo-failure 15
lcp-echo-interval 2
mtu 1492

now wan is disconnecting every 5 to 200 minutes. Strange is, that these values are not shown in Luci /luci/admin/network/network/wan/ Advanced Settings
I'm using a DLink DSL 321B as modem.
Anyone an hint?

Wed Jan  4 10:36:31 2017 daemon.info pppd[1622]: No response to 15 echo-requests
Wed Jan  4 10:36:31 2017 daemon.notice pppd[1622]: Serial link appears to be disconnected.
Wed Jan  4 10:36:31 2017 daemon.info pppd[1622]: Connect time 181.1 minutes.
Wed Jan  4 10:36:31 2017 daemon.info pppd[1622]: Sent 1044568035 bytes, received 4160114960 bytes.
Wed Jan  4 10:36:31 2017 daemon.notice netifd: Network device 'pppoe-wan' link is down
Wed Jan  4 10:36:31 2017 daemon.notice netifd: Interface 'wan' has lost the connection
Wed Jan  4 10:36:35 2017 daemon.notice pppd[1622]: Connection terminated.
Wed Jan  4 10:36:35 2017 daemon.info pppd[1622]: Sent PADT
Wed Jan  4 10:36:35 2017 daemon.info pppd[1622]: Exit.
Wed Jan  4 10:36:35 2017 daemon.notice netifd: Interface 'wan' is now down
Wed Jan  4 10:36:35 2017 daemon.notice netifd: Interface 'wan' is setting up now
Wed Jan  4 10:36:35 2017 daemon.info pppd[4990]: Plugin rp-pppoe.so loaded.
Wed Jan  4 10:36:35 2017 daemon.info pppd[4990]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: pppd 2.4.7 started by root, uid 0
Wed Jan  4 10:36:35 2017 daemon.err pppd[4990]: Interface eth0 has MTU of 1492 -- should be at least 1500.
Wed Jan  4 10:36:35 2017 daemon.err pppd[4990]: This may cause serious connection problems.
Wed Jan  4 10:36:35 2017 daemon.info pppd[4990]: PPP session is 25721
Wed Jan  4 10:36:35 2017 daemon.warn pppd[4990]: Connected to 00:18:82:22:d5:8b via interface eth0
Wed Jan  4 10:36:35 2017 kern.info kernel: [206201.481201] pppoe-wan: renamed from ppp0
Wed Jan  4 10:36:35 2017 daemon.info pppd[4990]: Using interface pppoe-wan
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: Connect: pppoe-wan <--> eth0
Wed Jan  4 10:36:35 2017 daemon.info pppd[4990]: Remote message: Authentication success,Welcome!
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: PAP authentication succeeded
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: peer from calling number 00:18:82:22:D5:8B authorized
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: local  IP address a.b.c.d
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: remote IP address e.f.g.h
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: primary   DNS address 8.8.8.8
Wed Jan  4 10:36:35 2017 daemon.notice pppd[4990]: secondary DNS address 8.7.6.5
Wed Jan  4 10:36:35 2017 daemon.notice netifd: Network device 'pppoe-wan' link is up
Wed Jan  4 10:36:35 2017 daemon.notice netifd: Interface 'wan' is now up

I wouldn't recommend using fixed LCP intervals as those are prone to getting lost when the link is congested.
LEDE adds a number of improvements from Debian to the pppd package, one of them is adaptive LCP, which causes pppd to only send echo requests if there is no traffic on the interface.

Furthermore you shouldn't use /etc/ppp/options as values in there are usually overridden from the pppd commandline which is assembled from the values being present in /etc/config/network. To enable adaptive LCP, set "option keepalive 1" in /etc/config/network, section wan and restart pppd with "ifup wan". Afterwards check with "ps www" whether pppd uses "lcp-adaptive" on its command line.

thanks for the hint. i got it configured: /usr/sbin/pppd nodetach ipparam wan ifname pppoe-wan lcp-echo-interval 5 lcp-echo-failure 1 lcp-echo-adaptive.
But the moment i add keepalive 1,lcp-echo-interval 5 lcp-echo-failure 1 appear. (i suppose they're default?!).
WIth that setting i still get reconnect every 30min.
edit: Will try to set the interval to 0.
didn't help either

Home Hub 5A and OpenWrt 18.06.1, r7258-5eb055306f

Hi,
I seem to be having a related problem. However it is only really noticeable when I am downloading big files (1GB+). Thus I have problems with downloading distros (1 - 3 GB) and my satnav maps (6GB). The connection drops and the download stops.

I have tried the suggested fix and it does not work for me:

/etc/config/network:
option keepalive '1'

ps www | grep ppp
4097 root 1196 S /usr/sbin/pppd nodetach ipparam wan ifname pppoa-wan lcp-echo-interval 5 lcp-echo-failure 1 lcp-echo-adaptive +ipv6 set AUTOIPV6=1 nodefaultroute usepeerdns maxfail 1 user xxxx password xxxx ip-up-script /lib/netifd/ppp-up ipv6-up-script /lib/netifd/ppp6-up ip-down-script /lib/netifd/ppp-down ipv6-down-script /lib/netifd/ppp-down plugin pppoatm.so 0.0.38 vc-encaps

syslog:

Wed Sep 26 11:44:00 2018 daemon.info pppd[3153]: LCP terminated by peer
Wed Sep 26 11:44:00 2018 daemon.info pppd[3153]: Connect time 145.9 minutes.
Wed Sep 26 11:44:00 2018 daemon.info pppd[3153]: Sent 7822217 bytes, received 334516798 bytes.
Wed Sep 26 11:44:00 2018 daemon.notice netifd: Network device 'pppoa-wan' link is down

The only thing that seems to work for me is this QoS idea https://bugs.openwrt.org/index.php?do=d ... sk_id=1259.

Looking at the speeds using a real-time tool on my PC, I suspect the problem was the download link being too busy rather than the upload link as suggested the link above.

It seems to me that having to manually set up this speed limit in order to enable the HH5/OpenWRT to do something relatively normal (i.e. download a large file) is something that should not be required. My previous (off-the-shelf) modem/router does not have such an issue. Should the LCP handshake issue ought to be considered a bug?

I've just noticed that the QoS link is incomplete. It is
https://bugs.openwrt.org/index.php?do=details&task_id=1259

Have you tried to disable LCP handshake entirely, and see if that fixes the issue? Not as a final solution, just to confirm that it is what shuts down the connection.

I have been using PPPoE on the same device for ages, with LCP configured as "option keepalive '5, 5'", and it is rock solid even when saturating the link.

I'm not sure I've done this correctly.
I set 'LCP echo failure threshold' to zero using the web interface (LuCI) and disabled the QoS instance. Then rebooted and tried to download a distro file.

'ps www' says:
5141 root 1196 S /usr/sbin/pppd nodetach ipparam wan ifname pppoa-wan +ipv6 set AUTOIPV6=1 nodefaultroute usepeerdns maxfail 1 user xxxx password xxxxx ip-up-script /lib/netifd/ppp-up ipv6-up-script /lib/netifd/ppp6-up ip-down-script /lib/netifd/ppp-down ipv6-down-script /lib/netifd/ppp-down plugin pppoatm.so 0.0.38 vc-encaps

but I got an LCP disconnect anyway. syslog says:
Mon Oct 1 17:08:05 2018 daemon.info pppd[5141]: LCP terminated by peer
Mon Oct 1 17:08:05 2018 daemon.info pppd[5141]: Connect time 12.7 minutes.
Mon Oct 1 17:08:05 2018 daemon.info pppd[5141]: Sent 6057914 bytes, received 313170291 bytes.

In case it matters, I'm using PPoA not PPoE.