infinitnet / lede-ar71xx-optimized-archer-c7-v2

TP-Link Archer C7 V2 AC1750 Optimized LEDE Firmware
GNU General Public License v3.0
174 stars 27 forks source link

Archer C7v2 WAN Connection goes dumb when running too many TCP / UDP connections #34

Closed magma82 closed 6 years ago

magma82 commented 6 years ago

Hi Devs,

Using Nightly release upgrading daily to see if the issue gets resolved.

There is an issue whereby if there are multiple P2P multi port connections running, the router will drop its WAN connection on both LAN cabled devices, 2.4ghz and 5ghz WIFI SSIDs.

To workaround the issue I am still able to putty to the device and type reboot which resolves the issue but is merely a workaround.

Is there a fix for this or a setting to perhaps limit or reset the number of allowed TCP / UDP connections?

magma82 commented 6 years ago

Wed Apr 11 18:37:19 2018 daemon.info pppd[2190]: No response to 5 echo-requests Wed Apr 11 18:37:19 2018 daemon.notice pppd[2190]: Serial link appears to be disconnected. Wed Apr 11 18:37:19 2018 daemon.info pppd[2190]: Connect time 95.4 minutes. Wed Apr 11 18:37:19 2018 daemon.info pppd[2190]: Sent 925457011 bytes, received 890695697 bytes. Wed Apr 11 18:37:19 2018 daemon.notice netifd: Network device 'pppoe-wan' link is down Wed Apr 11 18:37:19 2018 daemon.notice netifd: Interface 'wan' has lost the connection Wed Apr 11 18:37:19 2018 user.notice root: stopping ntpclient Wed Apr 11 18:37:21 2018 daemon.info dnsmasq[4130]: exiting on receipt of SIGTERM Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: started, version 2.79 cachesize 150 Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: DNS service limited to local subnets Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify Wed Apr 11 18:37:22 2018 daemon.info dnsmasq-dhcp[13827]: DHCP, IP range ** -- ***, lease time 4d Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain test Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain onion Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain localhost Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain local Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain invalid Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain bind Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for unqualified names Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using local addresses only for domain zzzrtrcm2.com Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using nameserver 8.8.8.8#53 for domain pool.ntp.org Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using nameserver 127.0.0.1#5353 Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: using 50952 more local addresses Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: read /etc/hosts - 4 addresses Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/odhcpd - 2 addresses Wed Apr 11 18:37:22 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses Wed Apr 11 18:37:22 2018 daemon.info dnsmasq-dhcp[13827]: read /etc/ethers - 0 addresses Wed Apr 11 18:37:25 2018 daemon.notice pppd[2190]: Connection terminated. Wed Apr 11 18:37:25 2018 daemon.info pppd[2190]: Sent PADT Wed Apr 11 18:37:25 2018 daemon.notice pppd[2190]: Modem hangup Wed Apr 11 18:37:25 2018 daemon.info pppd[2190]: Exit. Wed Apr 11 18:37:25 2018 daemon.notice netifd: Interface 'wan' is now down Wed Apr 11 18:37:25 2018 daemon.notice netifd: Interface 'wan' is setting up now Wed Apr 11 18:37:25 2018 daemon.err insmod: module is already loaded - slhc Wed Apr 11 18:37:25 2018 daemon.err insmod: module is already loaded - ppp_generic Wed Apr 11 18:37:25 2018 daemon.err insmod: module is already loaded - pppox Wed Apr 11 18:37:25 2018 daemon.err insmod: module is already loaded - pppoe Wed Apr 11 18:37:25 2018 daemon.info pppd[13916]: Plugin rp-pppoe.so loaded. Wed Apr 11 18:37:25 2018 daemon.info pppd[13916]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7 Wed Apr 11 18:37:25 2018 daemon.notice pppd[13916]: pppd 2.4.7 started by root, uid 0 Wed Apr 11 18:37:28 2018 daemon.info dnsmasq[13827]: read /etc/hosts - 4 addresses Wed Apr 11 18:37:28 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/odhcpd - 2 addresses Wed Apr 11 18:37:28 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses Wed Apr 11 18:37:28 2018 daemon.info dnsmasq-dhcp[13827]: read /etc/ethers - 0 addresses Wed Apr 11 18:37:30 2018 user.notice ddns-scripts[3249]: myddns_ipv4: PID '3249' terminated by 'SIGTERM' at 2018-04-11 18:37 Wed Apr 11 18:37:40 2018 daemon.warn pppd[13916]: Timeout waiting for PADO packets Wed Apr 11 18:37:40 2018 daemon.err pppd[13916]: Unable to complete PPPoE Discovery Wed Apr 11 18:37:40 2018 daemon.info pppd[13916]: Exit.Wed Apr 11 18:37:40 2018 daemon.notice netifd: Interface 'wan' is now down Wed Apr 11 18:37:40 2018 daemon.notice netifd: Interface 'wan' is setting up now Wed Apr 11 18:37:41 2018 daemon.err insmod: module is already loaded - slhc Wed Apr 11 18:37:41 2018 daemon.err insmod: module is already loaded - ppp_generic Wed Apr 11 18:37:41 2018 daemon.err insmod: module is already loaded - pppox Wed Apr 11 18:37:41 2018 daemon.err insmod: module is already loaded - pppoe Wed Apr 11 18:37:41 2018 daemon.info pppd[14173]: Plugin rp-pppoe.so loaded. Wed Apr 11 18:37:41 2018 daemon.info pppd[14173]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7 Wed Apr 11 18:37:41 2018 daemon.notice pppd[14173]: pppd 2.4.7 started by root, uid 0 Wed Apr 11 18:37:43 2018 daemon.info dnsmasq[13827]: read /etc/hosts - 4 addresses Wed Apr 11 18:37:43 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/odhcpd - 2 addresses Wed Apr 11 18:37:43 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses Wed Apr 11 18:37:43 2018 daemon.info dnsmasq-dhcp[13827]: read /etc/ethers - 0 addresses Wed Apr 11 18:37:56 2018 daemon.warn pppd[14173]: Timeout waiting for PADO packets Wed Apr 11 18:37:56 2018 daemon.err pppd[14173]: Unable to complete PPPoE Discovery Wed Apr 11 18:37:56 2018 daemon.info pppd[14173]: Exit. Wed Apr 11 18:37:56 2018 daemon.notice netifd: Interface 'wan' is now down Wed Apr 11 18:37:56 2018 daemon.notice netifd: Interface 'wan' is setting up now Wed Apr 11 18:37:56 2018 daemon.err insmod: module is already loaded - slhc Wed Apr 11 18:37:56 2018 daemon.err insmod: module is already loaded - ppp_generic Wed Apr 11 18:37:56 2018 daemon.err insmod: module is already loaded - pppox Wed Apr 11 18:37:56 2018 daemon.err insmod: module is already loaded - pppoe Wed Apr 11 18:37:56 2018 daemon.info pppd[14368]: Plugin rp-pppoe.so loaded. Wed Apr 11 18:37:56 2018 daemon.info pppd[14368]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7 Wed Apr 11 18:37:56 2018 daemon.notice pppd[14368]: pppd 2.4.7 started by root, uid 0 Wed Apr 11 18:37:59 2018 daemon.info dnsmasq[13827]: read /etc/hosts - 4 addresses Wed Apr 11 18:37:59 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/odhcpd - 2 addresses Wed Apr 11 18:37:59 2018 daemon.info dnsmasq[13827]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses Wed Apr 11 18:37:59 2018 daemon.info dnsmasq-dhcp[13827]: read /etc/ethers - 0 addresses Wed Apr 11 18:38:11 2018 daemon.warn pppd[14368]: Timeout waiting for PADO packets Wed Apr 11 18:38:11 2018 daemon.err pppd[14368]: Unable to complete PPPoE Discovery Wed Apr 11 18:38:11 2018 daemon.info pppd[14368]: Exit.

magma82 commented 6 years ago

The log repeats the last 20 lines over and over until I perform a reboot of the router.

magma82 commented 6 years ago

Tried a manual WAN "stop" and "start" of the interface which does not resolve the problem - only a reboot resolves.

cryobry commented 6 years ago

Try ifup wan

cryobry commented 6 years ago

You can modify my wwan watchdog script (just change all wwan to wan).

https://github.com/cryobry/wwan_iface_watchdog

magma82 commented 6 years ago

Hi Cryobry,

Thanks for the suggestions and the script.

The recent 3 - 4 crashes I have had in the last couple of days has unfortunately not allowed me to connect to the WebGUI or Telnet / SSH, only a power cycle has brought it back up so haven't been able to try ifup wan. I did try a WAN watchdog package from the software list but this hasn't helped.

I have just today flashed the most recent nightly commit LuCI Master (git-18.149.30583-796d687) / OpenWrt SNAPSHOT r7054-64b53247c4 from infinitnet and am now going to install your wwan script.

I will let you know how it goes over the next day or so.

Thanks,

magma82 commented 6 years ago

Hi,

Unfortunately adjusting the line in the script from ifup wwan to ifup wan did not stop the router crashing out again. I can confirm the .sh file was created and the process was running according to ps.

I have found various articles on the DDWRT forums regards increasing the max connections to 65536.

I am currently testing the following lines:

echo 65536 > /sys/module/nf_conntrack/parameters/hashsize set ip_conntrack_max=65536

Is anyone aware of where to set TCP / UDP connection timeouts as I have read reducing them to 240 / 120 resolves stability issues?

Thanks,

magma82 commented 6 years ago

Quick Update:

Following adding the above lines via telnet yesterday, the router has not crashed since under load. If I reboot the lines will no longer function:

I am worried about adding them to the startup script or rc.local in case it bricks and I have no way of recovering the device.

@infinitnet - could you compile a version with the above two lines in the firmware?

Can I also take this opportunity to thank you for creating a custom openwrt / luci firmware for the C7v2 as this has unlocked the real potential of the device.

Thanks,

infinitnet commented 6 years ago

Glad to hear you figured it out.

@infinitnet - could you compile a version with the above two lines in the firmware?

You seem to be the only one with this issue, at least I didn't see anyone else experiencing this. Therefore I don't really want to change the default values, because that could theoretically cause other issues. Your settings aren't ideal either -- hashsize should be about 1/4 of your max conntrack value. If the settings work for you after changing them on the fly, they won't cause issues when you add them to your rc.local or sysctl.conf (for the max conntrack setting).