Dsl- WAN interface re-sets

I have a strange issue. I had problems with losing WAN connectivity on a flashed BT homehub. I'd get 60 second outages randomly, but concentrated between 22:00 and 23:00 if you looked at them over a period of weeks. Eventually I went to my ISP (aaisp.net) and they reset the Zyxel router provided as part of my 'package' and all was well except I couldn't get my VPNs (provided via OpenSwann on a Rpi) to work through that router. The VPNs allow me to contact work servers etc, but as I was furloughed it wasn't an issue. Also, other people locally had experienced brief internet issues (Zoom meetings highlight thing like this) so I assumed this was an external problem.

So I reconnected my BT router and the engineer at aaisp watched it come up, did some tests and declared as as well.

I've started, after about ten days to get occasional outages. Very brief, < 30 secs, but looking at the WAN interface, it then shows that it has re-started. Is there any way to see if the broadband line is going down, and so re-starting the WAN interface, or, is the broadband going down BECAUSE the wan interface is re-setting?

Can you show the exact log message?

The WAN interfaces should "re-start" for any reason (unless you told it to) - so I would assume it's the ISP.

This is the biggest reason for this belief.

It happened again last night around 22:40 it was shorter, but WAN interface reset at that time. What I have discovered is the logs don't go back that far, only 04:00 this morning. I did suspect ISP or line issues, but with a different router I went for weeks without a glitch.

  • You don't happen to have a ClientID or special DHCP Client configs on WAN?
  • Have you checked cabling?
  • Has the router or connection to the ISP equipment previously suffered a power surge (e.g. lightening)?
  • I would perhaps suggest testing by re-assigning a port to WAN - perhaps the PHY is damaged.

What were the logs full of?

1 Like

This: which is a bit odd...

Sat Jul  4 09:23:59 2020 daemon.info dnsmasq-dhcp[1966]: DHCPREQUEST(br-lan) 192.168.157.166 b0:fc:0d:59:78:90
Sat Jul  4 09:23:59 2020 daemon.info dnsmasq-dhcp[1966]: DHCPACK(br-lan) 192.168.157.166 b0:fc:0d:59:78:90 amazon-650e7f60d
Sat Jul  4 09:24:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPREQUEST(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:24:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPACK(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:25:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPREQUEST(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:25:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPACK(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:26:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPREQUEST(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:26:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPACK(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:27:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPREQUEST(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:27:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPACK(br-lan) 192.168.157.197 00:df:00:00:0e:1a
Sat Jul  4 09:28:33 2020 daemon.info dnsmasq-dhcp[1966]: DHCPREQUEST(br-lan) 192.168.157.197 00:df:00:00:0e:1a

What is your LAN DHCP lease time? (this can be found in /etc/config/dhcp)

I suspect that you are having an issue with expired leases on the WAN side, but because of what appears to be a 2 minute DHCP lease time on your LAN, you may not be able to see the messages.

See if you get any output from this:

logread | grep udhcpc

If you don't see anything, let's figure out why your DHCP lease time on your LAN is messed up (or what else is causing this constant renewal).

This is the symptom I saw when my providers DHCP servers were slow/hampered by the access network load/architecture. There are possible udhcp patches / mods as a hacky workaround for these issues.

The client dhcp renewals are normal... and are seen anytime the router/or dnsmasq restarts... this would not be related to your wan interface unless your doing something fancy with vpn-scripts/adblock etc.

Normal in general, yes. But those appear to be renewing every minute, which suggests a 2 minute lease time for LAN.

1 Like

fair point.

1 Like

i suppose for brevvity we should see;

ubus call network.interface.wan status | grep leasetime

i'm wondering if it's 24hrs...

1 Like

The repeated DHCP is only two clients on the network, one of which is an android phone, not sure what the other is (I have lots of clients). I'm a bit of a noob with this hardware / software. I've not used the shell interface, only the web interface - is it a matter of SSH in? Tried that and it didn't work. Just said:
[Command not found: 192.168.157.1]
[Could not create a new process and open a pseudo-tty.]
Oddly the DHCP page shows both of those clients with long leases, so it may be odd behaviour from the clients perhaps?

yes, ssh 'ssh root@IP' or alternatives;

  • luci-app-ttyd
  • luci-app-commands
    winscp is a windows gui... or putty

I was trying SSH from terminal on a Mac as root@ip but it doesn't seem to be running SSH

I could try putty on Windows tomorrow.

Not literally root@ip - IP is supposed to be the address of your router. Likely 192.168.1.1

No, I did try ssh root@192.168.157.1 which is my router but it replied
[Command not found: 192.168.157.1]
[Could not create a new process and open a pseudo-tty.]

On the Mac? Do you possibly have a space in there accidentally?

I've encountered similar problem on my raspberry pi 4 wan (just recently from 1 week ago, almost daily now) and was wondering is there a script to detect if lost wan ip address. The wan lease is set to 3600 and sometimes before that (usually 1 day or less) it try to renew wan dhcp but cannot get the ip address (system log doesn't shows the error part after I restart my pi so I'll try posting later).

Trying to restart from luci interfaces doesn't help, only after I reboot my rpi-4 I get wan address again which is strange. My rpi-4 act as router connected to ISP provided fiber modem which I set it as bridge connection to bypass NAT.

You can't set your WAN's DHCP lease time (unless the WAN is connected to an upstream router that you control). If the WAN is directly connected to the ISP's network, it is the DHCP server from the ISP that controls this value. If your ISP is really issuing 1h leases, that is pretty short.

wan lease times of 5 minutes are common with ISP's that have pool contraints.

while not to spec. it's possible and often a feasible workaround for upstream renewal congestion on short leases to alter the lease times client side (lower).

usually there are no problem with the lease time, I've tried restarting the wan from UCI under normal condition after restart and it gets the IP address, only in random after almost a day or sometimes more the problem occured (I try to get the log when it occured again).