OPNsense Forum

English Forums => General Discussion => Topic started by: nightcom on September 25, 2024, 09:01:06 PM

Title: dhclient-script: Reason RENEW on...every 15min
Post by: nightcom on September 25, 2024, 09:01:06 PM
Hello everyone!

I have a question regarding my logs be flooded by dhclient-script as you can see bellow

2024-09-25T20:38:39 Notice dhclient dhclient-script: Creating resolv.conf
2024-09-25T20:38:39 Notice dhclient dhclient-script: Reason RENEW on vlan02 executing
2024-09-25T20:23:39 Notice dhclient dhclient-script: Creating resolv.conf
2024-09-25T20:23:39 Notice dhclient dhclient-script: Reason RENEW on vlan02 executing
2024-09-25T20:08:39 Notice dhclient dhclient-script: Creating resolv.conf
2024-09-25T20:08:39 Notice dhclient dhclient-script: Reason RENEW on vlan02 executing
2024-09-25T19:53:39 Notice dhclient dhclient-script: Creating resolv.conf
2024-09-25T19:53:39 Notice dhclient dhclient-script: Reason RENEW on vlan02 executing


From what I was searching already on internet it can be also ISP side that he renew address every 15min, I266-V can be also BIOS setting of Intel power management but I couldn't find anything like that is BIOS and there are allot options related to Power but nothing is referring to ethernet card.

I checked also with Suricata ON and OFF, did't check with Zenarmor but he is for LAN so I guess no impact. I also use Unbound.

I also checked dhcp settings from WAN side and this is what I got:
root@OPNsense:~ # cat /var/db/dhclient.leases.*
lease {
  interface "igc0";
  fixed-address 192.xxx.xxx.20;
  next-server 192.xxx.xxx.1;
  option subnet-mask 255.255.255.0;
  option host-name "OPNsense";
  option dhcp-lease-time 20;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.xxx.xxx.1;
  renew 4 2028/8/24 10:23:14;
  rebind 4 2028/8/24 10:23:33;
  expire 4 2028/8/24 10:23:44;
}

lease {
  interface "vlan02";
  fixed-address 31.xxx.xxx.129;
  option subnet-mask 255.255.255.0;
  option routers 31.xxx.xxx.1;
  option domain-name-servers 37.143.84.228,62.58.48.20;
  option domain-name "ftth.glasoperator.nl";
  option broadcast-address 31.xxx.xxx.255;
  option ntp-servers 10.12.0.20;
  option dhcp-lease-time 1800;
  option dhcp-message-type 5;
  option dhcp-server-identifier 31.xxx.xxx.1;
  option dhcp-renewal-time 909;
  option dhcp-rebinding-time 1566;
  renew 3 2024/9/25 16:33:36;
  rebind 3 2024/9/25 16:44:42;
  expire 3 2024/9/25 16:48:36;
}


xxx in IP is of course from my side.

I only see option dhcp-renewal-time 909 that fits pattern of 15min, do you think this is what caused flooding log file?
Internet works "fine" lets say, looks stable but sometimes I have wierd issues. Connection is new 1Gbps UP/Down, still connecting people in neighborhood so maybe that's the reason but someone will come soon from their company so just want to point it out, no reason to renew address every 15min.
Title: Re: dhclient-script: Reason RENEW on...every 15min
Post by: franco on September 25, 2024, 09:30:27 PM
In general it's only adhering to what the ISP or upstream router tells it.

Specifically, we added better logging to DHCP client events in order to solve real world issues.

Both these things happening together can be annoying, but alternatives are much worse.


Cheers,
Franco
Title: Re: dhclient-script: Reason RENEW on...every 15min
Post by: nightcom on September 25, 2024, 09:37:06 PM
Yes I was reading in other cases from previous years you guys had more issues with DHCP, you guys did allot and you supported with patches community - great work.

From what I understand I just need to talk with ISP when they will come, router just listen what ISP or upstream router tells it, but at least I can show them some logs to techs.

Thank you franco once again!
Title: Re: dhclient-script: Reason RENEW on...every 15min
Post by: franco on September 25, 2024, 09:41:24 PM
It may be possible to supersede the option and it's been talked about in the past I think.

One recent mention of it on GitHub is here, but I'm unsure it's possible to extend the lease time as the server would need to agree to it?

https://github.com/opnsense/core/issues/7514#issuecomment-2151902598


Cheers,
Franco
Title: Re: dhclient-script: Reason RENEW on...every 15min
Post by: nightcom on September 25, 2024, 09:49:52 PM
Well if you want to know my opinion better to have this kind of option then not to have it, in my case and many others will not work probably because router will not allow but if you build your own homelab or you have flexible ISP then it's other story.

Maybe it can be on TO-DO list somewhere on bottom  ;) anyway thank you franco, I just wanted to be sure where to search root cause. Everythingwas pointing on ISP but I wasn't sure since I'm new in OPNsense, before I was using 10 years Mikrotik but I always wanted to go with OPNsense and here I'm with upgraded network speed and I'm very happy with response of GUI, community is awesome and documentation is also very good. Can't complain on anything, all I can say great work and donate couple bucks  ;D

Thanks for your support!
Title: Re: dhclient-script: Reason RENEW on...every 15min
Post by: franco on September 25, 2024, 10:16:01 PM
Highly appreciated, thanks!

Wouldn't know what to add at first glance. Some discussions mature over time of course though subtle over-engineering (or shall I say micro-management) has been the source of regressions just as much as it helped out.


Cheers,
Franco