Recently I have had problems with my router. From time to time I lose the connection with my ISP provider. The WAN interface says that has an IP assigned by the DHCP server but for some reason there is no connection. I have launch a tracert to google.es and it shows that the connection is lost when trying to reach outside my private network (the only way to fix it is to reset my ISP bridge router). So I decided to create a crontab job that checks every 15 min if I am able to reach the dns server 8.8.8.8 and it reports the output to the system log. This is the output that I seen in the log:
Fri Jan 7 08:15:00 2022 cron.err crond[1712]: USER root pid 4602 cmd /root/Test_Connectivity.sh
Fri Jan 7 08:15:00 2022 user.notice root: IPv4 is Up
I have also noticed that that the DHCP lease is 7200 seconds (1.5 hours) but the WAN interface is asking to renew it after 1 hour. Why is not waiting 1.5h before the IP expires?
Tue Jan 4 23:51:25 2022 daemon.notice netifd: wan (545): udhcpc: lease of XX.XXX.XXX.216 obtained, lease time 7200
Wed Jan 5 00:51:24 2022 daemon.notice netifd: wan (545): udhcpc: sending renew to XXX.XXX.XXX.1
Wed Jan 5 00:51:24 2022 daemon.notice netifd: wan (545): udhcpc: lease of XXX.XXX.XXX.216 obtained, lease time 7200
Wed Jan 5 01:51:24 2022 daemon.notice netifd: wan (545): udhcpc: sending renew to XXX.XXX.XX.1
So this morning when I woke up I tried to connect to the wifi hostpot of my router and it connected but I could not surf on the internet. So I decided to reset again the bridge and the router and I did inmediatelly have internet after that.
Immediatelly after that, I decided to check at what moment it lost the connectivity with the internet but to my suprise there is no report of my IPv4 connectivity between 15:21 and 7:42. Why is that?
Thu Jan 6 15:21:50 2022 daemon.notice netifd: Network device 'wlan0' link is up
Fri Jan 7 07:42:40 2022 daemon.info dnsmasq-dhcp[2872]: DHCPREQUEST(br-lan) 192.168.1.188 48:d7:05:d8:ed:e3
I just notice that around the time syslog shows the last recorded event (15:21) I set a new peer to my VPN wireguard server.
This is the release that I have installed on my TP-Link router: OpenWrt 21.02.1 r16325-88151b8303