ADSL2+ unable to reconect when disconected on TD-W8970B

Several times in a week ADSL2+ gets disconnected, I try to restart the WLAN interface but didn't help. If I check the DSL status when the connection is not working it says that the line is up. I must always restart the whole modem and then it's working again. Any idea of how I can be reconnected automatically. I'm was using OpenWrt 18.06.4 I upgraded to 18.06.5 but no luck.
DSL status:
Line State: UP [0x0]
Line Mode: G.992.5 (ADSL2+)
Line Uptime: 1h 14m 13s
Annex: B

logs:

Fri Dec 13 08:14:45 2019 daemon.info pppd[4716]: No response to 5 echo-requests
Fri Dec 13 08:14:45 2019 daemon.notice pppd[4716]: Serial link appears to be disconnected.
Fri Dec 13 08:14:45 2019 daemon.info pppd[4716]: Connect time 648.9 minutes.
Fri Dec 13 08:14:45 2019 daemon.info pppd[4716]: Sent 78197451 bytes, received 2191720595 bytes.
Fri Dec 13 08:14:45 2019 daemon.notice netifd: Network device 'pppoe-wan' link is down
Fri Dec 13 08:14:45 2019 daemon.notice netifd: Interface 'wan' has lost the connection
Fri Dec 13 08:14:45 2019 daemon.warn dnsmasq[1799]: no servers found in /tmp/resolv.conf.auto, will retry
Fri Dec 13 08:14:51 2019 daemon.notice pppd[4716]: Connection terminated.
Fri Dec 13 08:14:51 2019 daemon.info pppd[4716]: Sent PADT
Fri Dec 13 08:14:51 2019 daemon.notice pppd[4716]: Modem hangup
Fri Dec 13 08:14:51 2019 daemon.info pppd[4716]: Exit.
Fri Dec 13 08:14:51 2019 daemon.notice netifd: Interface 'wan' is now down
Fri Dec 13 08:14:51 2019 daemon.notice netifd: Interface 'wan' is disabled
Fri Dec 13 08:14:51 2019 daemon.notice netifd: Interface 'wan' is enabled
Fri Dec 13 08:14:51 2019 daemon.notice netifd: Interface 'wan' is setting up now
Fri Dec 13 08:14:51 2019 daemon.err insmod: module is already loaded - slhc
Fri Dec 13 08:14:51 2019 daemon.err insmod: module is already loaded - ppp_generic
Fri Dec 13 08:14:51 2019 daemon.err insmod: module is already loaded - pppox
Fri Dec 13 08:14:51 2019 daemon.err insmod: module is already loaded - pppoe
Fri Dec 13 08:14:51 2019 daemon.info pppd[32048]: Plugin rp-pppoe.so loaded.
Fri Dec 13 08:14:51 2019 daemon.info pppd[32048]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Fri Dec 13 08:14:51 2019 daemon.notice pppd[32048]: pppd 2.4.7 started by root, uid 0
Fri Dec 13 08:15:06 2019 daemon.warn pppd[32048]: Timeout waiting for PADO packets
Fri Dec 13 08:15:06 2019 daemon.err pppd[32048]: Unable to complete PPPoE Discovery
Fri Dec 13 08:15:06 2019 daemon.info pppd[32048]: Exit.
Fri Dec 13 08:15:06 2019 daemon.notice netifd: Interface 'wan' is now down
Fri Dec 13 08:15:06 2019 daemon.notice netifd: Interface 'wan' is disabled
Fri Dec 13 08:15:06 2019 daemon.notice netifd: Interface 'wan' is enabled
Fri Dec 13 08:15:06 2019 daemon.notice netifd: Interface 'wan' is setting up now
Fri Dec 13 08:15:06 2019 daemon.err insmod: module is already loaded - slhc
Fri Dec 13 08:15:07 2019 daemon.err insmod: module is already loaded - ppp_generic
Fri Dec 13 08:15:07 2019 daemon.err insmod: module is already loaded - pppox
Fri Dec 13 08:15:07 2019 daemon.err insmod: module is already loaded - pppoe
Fri Dec 13 08:15:07 2019 daemon.info pppd[32101]: Plugin rp-pppoe.so loaded.
Fri Dec 13 08:15:07 2019 daemon.info pppd[32101]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Fri Dec 13 08:15:07 2019 daemon.notice pppd[32101]: pppd 2.4.7 started by root, uid 0
Fri Dec 13 08:15:22 2019 daemon.warn pppd[32101]: Timeout waiting for PADO packets
Fri Dec 13 08:15:22 2019 daemon.err pppd[32101]: Unable to complete PPPoE Discovery
Fri Dec 13 08:15:22 2019 daemon.info pppd[32101]: Exit.

Could you post the networking configuration for a start? uci export network

Please use Preformatted text (the </> button) when you post console output.

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd95:a21d:4a6f::/48'

config atm-bridge 'atm'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'
        option nameprefix 'dsl'

config dsl 'dsl'
        option firmware '/lib/firmware/lantiq-vrx200-b.bin'
        option line_mode 'adsl'
        option ds_snr_offset '0'
        option annex 'b2p'
        option xfer_mode 'atm'
        option tone 'bv'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option delegate '0'

config interface 'wan'
        option ifname 'dsl0'
        option proto 'pppoe'
        option username 
        option password 
        option delegate '0'
        option peerdns '0'
        option dns '8.8.8.8 8.8.4.4'
        option ipv6 '0'

config device 'wan_dev'
        option name 'dsl0'
        option vid '2510'
        option macaddr '30:b5:c2:b5:9a:b1'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '0 2 4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '5 6t'

config interface 'lan2'
        option proto 'static'
        option ifname 'eth0.2'
        option ipaddr '10.0.0.1'
        option netmask '255.255.255.0'
        option delegate '0'

This is a long-standing issue with modems in OpenWrt. There are several bug reports (e.g. this one). But even if some of the bug reports have been closed as "fixed", so far noone has been able to pinpoint the exact reason for it or offer a reliable remedy. I still see the problem from time to time, both on a VDSL and an ADSL line (recently only once every few months, but I remember it to be more frequent).

Personally, I help myself using a small script that, if WAN goes down, checks periodically if it comes up again ... and then reboots the router after 10 minutes:

#!/bin/sh


[ "$ACTION" = ifdown -a "$INTERFACE" = wan ] || exit 0


logger -t wan-watchdog "WAN is down, watchdog is waking up"
now=$(date +"%F %H:%M:S")

sleep 10
checktime=10
while [[ $checktime -lt 600 ]]; do
        if /bin/ping -c 1 8.8.8.8 >/dev/null
        then
                logger -t wan-watchdog "Check after $checktime seconds: WAN is up, watchdog goes back to sleep"
                exit 0
        fi
        logger -t wan-watchdog "Check after $checktime seconds: WAN is still down, watchdog grumbles"
        sleep 60
        checktime=$((checktime+60))
done

logger -t wan-watchdog "Check after $checktime seconds: WAN is down, watchdog barks"
now=$(date +"%F %H:%M:%S")
echo "$now WAN was down for 600+ seconds, rebooting" >> /etc/wan_watchdog.log

/sbin/reboot

To note, this script

  • goes into /etc/hotplug.d/iface/40-wan-watchdog
  • if the WAN goes down checks for successful reconnection (i.e., pings 8.8.8.8), first after 10 seconds, then every minute for 10 minutes, then reboots if the line still isn't up again
  • if it reboots, makes a logfile entry into /etc/wan_watchdog.log
  • triggers when the WAN goes down -- for any reason. It has no idea why the WAN went down, so if you manually disconnect or down the interface it will also trigger. In this case you should manually kill the script within the next 10 minutes.
  • is nowhere near elegant, could probably be improved, but has been working reliably for me for years now ... especially if I'm not around to notice the disconnect
1 Like