esp8266 / esp8266/Arduino

DHCPDISCOVER every 5 minutes, ignores server lease time

Open
#7,020 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

### Basic Infos

- [X] This issue complies with the [issue POLICY doc](https://github.com/esp8266/Arduino/blob/master/POLICY.md).
- [X] I have read the documentation at [readthedocs](https://arduino-esp8266.readthedocs.io/en/latest) and the issue is not addressed there.
- [ ] I have tested that the issue is present in current master branch (aka latest git).
- [X] I have searched the issue tracker for a similar issue.
- [ ] If there is a stack dump, I have decoded it.
- [X] I have filled out all fields below.

#### Platform

- Hardware: ESP-8266
- Core Version: 2.6.1
- Development Env: N/A
- Operating System: N/A

### Settings in IDE

- N/A

### Problem Description

I was sent here from the Tasmoda wiki.
I am still investigating, but figured I would post while I worked on it.

I am using Tasmota-lite (v8.1) on a Gosund WP3. When I clear settings (RESET 5), the device gets a DHCP address, and seems to follow the server lease time (24h in my case). However, after the first lease renewal approx 12h later, it requests a lease approx every 5 minutes. Rebooting does not go back to the server config lease time, it immediately starts with the 5 minute renewals...

One weird thing may be that it send DHCPREQUEST and immediately a DHCPDISCOVER Then the handshake proceeds. It looks like it might be requesting a lease renewal (without going through the whole DORA process) but it doesnt wait long enough for the server to answer the initial request. The server ACKs the request, but the device has already sent the DISCOVER.

I have verified with wireshark that the lease time being sent to the device is correct. The device just seems to ignore it after the first renewal...

I am using dnsmasq (v2.80) on RaspberryPi running arch (Linux dns 4.19.76-1-ARCH #1 SMP PREEMPT Tue Oct 8 03:34:09 UTC 2019 armv7l GNU/Linux). My Tasmoda devices are the only one exhibiting this behavior. All over devices wait the standard "one half of lease time" to start requesting again. I have verified with wireshark that the devices are being given the proper initial lease time.
I suspect that not a lot of people are checking their DHCP logs (probably on a networking device) so not sure how many even know this is happening...

### [MCVE](https://stackoverflow.com/help/mcve) Sketch

```cpp

#include

void setup() {

}

void loop() {

}

```

### Debug Messages

```
Debug messages go here
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.