Page 1 of 2

"WAN (PPPoE) Uptime:" Logging

Posted: Sat Aug 03, 2019 7:03 pm
by Dodgy Bob
Hey folks,

So it would appear to me that my internet connection drops out from time to time, like, maybe every 2 or 3 days, sometimes daily.

The reason why I think this is that in Gargoyle, on the Status > Overview page, "Uptime:" continually increases (as you would expect), whilst "WAN (PPPoE) Uptime:" finds itself resetting every 2 or 3 days, sometimes daily! Logically, I'm expecting both "Uptime:" and "WAN (PPPoE) Uptime:" to only be a couple of minutes apart, depending on the order I reboot the home network in - not hours or days apart.

For example, currently my "Uptime:" shows 8 days, 15 hours, 29 minutes and "WAN (PPPoE) Uptime:" shows 0 days, 10 hours, 16 minutes. Before this, it was sitting at approximately 2 days, so at some point last night, the "WAN (PPPoE) Uptime:" reset once again.

Thus, 2 questions:
  1. Am I correct in thinking that if "WAN (PPPoE) Uptime:" resets, that means my internet connection has disconnected/reconnected?
  2. If so, then how can I go about logging this and storing it locally so that I can pass this information on to my ISP?
Thanks in advance for any pointers and help.

Kind regards,
Dodgy Bob


**Note: If required, I am running Gargoyle 1.8.1 on a Netgear WNDR3800

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Sat Aug 03, 2019 8:59 pm
by Lantis
I believe you are correct.
The easiest way to log it would be using hotplug.d to trigger a script on up or down of the interface.

These should be at /etc/hotplug.d/
There are also ppp up and down scripts at /etc/ppp/ which you might be able to tie into.

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Sun Aug 04, 2019 7:42 pm
by Dodgy Bob
Hi Lantis,

Thanks for that information, I was not aware of hotplug.d!

Well, I was hoping to be able to access my network and have a play around now, but alas, it would appear that my home machine is down for the count!

I'll have a look tonight once I'm home from work and let you know how I get on.

Thanks again for the info.

Kind regards,
Dodgy Bob

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Thu Aug 08, 2019 6:32 pm
by Dodgy Bob
Hi everyone,

OK, so I have my scripts in /etc/hotplug.d/iface now, however, I was wondering, is it possible to pull the uptime (not of the device, but of the WAN connection) before disconnect? I would imagine it would be, it would be more a case of finding where this info is being stored?

Is anyone able to point me in the right direction please?

Thanks in advance,
Dodgy Bob


Edit = Specify which uptime I'm after!

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Sun Aug 18, 2019 9:53 am
by Lantis
ifstatus is the tool you want.
Try running "ifstatus wan" for all the info you can get.
You can use jsonfilter to easily get uptime.
"ifstatus wan | jsonfilter -e '@.uptime'"

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Fri Nov 13, 2020 1:04 pm
by martin3680bg
Hello I just found this forum and have similar problem. I was often wondering why I get disconnected from Twitch and League Of Legends until one day I started looking at this WAN PPPoE uptime thing just to see it's resetted. It happens daily a few times. What can I do to stop it? I don't know how to apply the scripts mentioned in the thread above.

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Sat Nov 14, 2020 4:51 am
by RomanHK
martin3680bg wrote:
Fri Nov 13, 2020 1:04 pm
Hello I just found this forum and have similar problem. I was often wondering why I get disconnected from Twitch and League Of Legends until one day I started looking at this WAN PPPoE uptime thing just to see it's resetted. It happens daily a few times. What can I do to stop it? I don't know how to apply the scripts mentioned in the thread above.
You can find out information and reasons about the restart from the log via ssh by entering the logread and dmesg commands (you can also use the "Logread" plugin). You can also add additional parameters for larger logging (debug) in pppd.

Code: Select all

logread
dmesg
https://openwrt.org/docs/guide-user/per ... g.messages

There are several reasons to restart PPPoE, but in most cases it is a timeout and is solved by additional commands in the /etc/ppp/options file or to turn off keepalive polling.

Something also here: viewtopic.php?p=56705#p56705

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Mon Nov 16, 2020 4:02 pm
by martin3680bg2
Sorry I'm typing from different account but I forgot my password and option on the site doesn't work. I managed to get some logs that seem suspicious.

Nov 16 20:26:18 Gargoyle daemon. info pppd[31895]: No response to 1 echo-requests
Nov 16 20:26:18 Gargoyle daemon.notice pppd[31895]: Serial link appears to be disconnected.
Nov 16 20:26:18 Gargoyle daemon. info pppd[31895]: Connect time 570.1 minutes.
Nov 16 20:26:18 Gargoyle daemon. info pppd[31895]: Sent 303936445 bytes, received 4191593285 bytes.
Nov 16 20:26:18 Gargoyle daemon.notice pppd[31895]: Connection terminated.
Nov 16 20:26:18 Gargoyle daemon.notice netifd: Interface 'wan' has lost the connection
Nov 16 20:26:18 Gargoyle local5.notice qosmon[28034]: terminated sigterm=15, sel_err=-1
Nov 16 20:26:20 Gargoyle daemon. info dnsmasq[32337]: reading /tmp/resolv.conf.auto
Nov 16 20:26:20 Gargoyle daemon. info dnsmasq[32337]: using nameserver 84.54.128.9#53
Nov 16 20:26:20 Gargoyle daemon. info dnsmasq[32337]: using nameserver 84.54.128.100#53
Nov 16 20:26:20 Gargoyle daemon. info dnsmasq[32337]: using nameserver 1.0.0.1#53
Nov 16 20:26:20 Gargoyle daemon. info dnsmasq[32337]: using nameserver 1.1.1.1#53


Log 2


ip -s link show pppoe-wan
45: pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc hfsc state UNKNOWN mode DEFAULT qlen 3
link/ppp
RX: bytes packets errors dropped overrun mcast
3438155844 2599402 0 0 0 0
TX: bytes packets errors dropped carrier collsns
93119487 1348861 0 0 0 0
root@Gargoyle:~# uci export network
package network

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

config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option dns '1.1.1.1 1.0.0.1 84.54.128.100 84.54.128.9'

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

config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0 1 2 3 4'

config interface 'wan'
option ifname 'eth1'
option proto 'pppoe'
option username 'gPRIVACY'
option password 'PRIVACY'
option dns '1.1.1.1 1.0.0.1 84.54.128.100 84.54.128.9'
option peerdns '0'
option keepalive '1 5'

root@Gargoyle:~# ifconfig
br-lan Link encap:Ethernet HWaddr C0:4A:00:DE:C3:51
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35430682 errors:0 dropped:567 overruns:0 frame:0
TX packets:74948669 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3383531105 (3.1 GiB) TX bytes:95637922774 (89.0 GiB)

eth0 Link encap:Ethernet HWaddr C0:4A:00:DE:C3:51
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:91987773 errors:0 dropped:0 overruns:197 frame:0
TX packets:184060737 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1727993357 (1.6 GiB) TX bytes:3782739012 (3.5 GiB)
Interrupt:5

eth1 Link encap:Ethernet HWaddr C0:4A:00:DE:C3:53
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:230221330 errors:0 dropped:19 overruns:46 frame:0
TX packets:111666276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4264329271 (3.9 GiB) TX bytes:364427811 (347.5 MiB)
Interrupt:4

imq0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:2610936 errors:0 dropped:0 overruns:0 frame:0
TX packets:2609085 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:11000
RX bytes:3455851283 (3.2 GiB) TX bytes:3453361629 (3.2 GiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:18278 errors:0 dropped:0 overruns:0 frame:0
TX packets:18278 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1436230 (1.3 MiB) TX bytes:1436230 (1.3 MiB)

pppoe-wan Link encap:Point-to-Point Protocol
inet addr:100.66.28.237 P-t-P:100.66.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:2631092 errors:0 dropped:0 overruns:0 frame:0
TX packets:1361887 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:3480092956 (3.2 GiB) TX bytes:94003601 (89.6 MiB)

wlan0 Link encap:Ethernet HWaddr C0:4A:00:DE:C3:52
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4635100 errors:0 dropped:0 overruns:0 frame:0
TX packets:13404102 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:650811086 (620.6 MiB) TX bytes:4173809054 (3.8 GiB)

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Mon Nov 16, 2020 4:42 pm
by RomanHK
Try increasing keepalive from 1 to 3 (or more):
Image

Re: "WAN (PPPoE) Uptime:" Logging

Posted: Mon Nov 16, 2020 5:00 pm
by martin3680bg2
In the past it was 3 but it would still disconnect me, I changed it to 1 just to test but it still disconnects me