-
Notifications
You must be signed in to change notification settings - Fork 13.3k
No hostname option in DHCP 2.4.2 #5574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have, with
With this fixed sketch
This information does not match the title: |
Closing due to user error. |
ok so that is good. So your saying that the hostname is working in the latest git hash? |
Yes and in 2.4.2 too with the above sketch. |
ah, i just noticed that you saw the hostname in the Request. I am looking
for hostname in the Discover.
…On Mon, Jan 7, 2019 at 12:22 PM david gauchard ***@***.***> wrote:
Yes and in 2.4.2 too with the above sketch.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5574 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AelnmCkBxg8BQuhmSq_1s_VQxXLdNzhrks5vA6yJgaJpZM4ZnQ2s>
.
--
|
I saw nothing in RFCs after a quick search. http://git.savannah.nongnu.org/cgit/lwip.git/tree/src/core/ipv4/dhcp.c In this file, search for I have not checked in lwIP-1.4 which is used by previous versions of this core. |
So is this going to be fixed? ESP8266 WiFi not honoring the name provided by the DHCP server does not seem the best behavior, or even acceptable behavior. |
Please elaborate |
My experience is, now, that the DHCP option for specification of host name is ignored by the WiFi client. Such that when I qualify a host name as part of the DHCP reservation for my ModeMCU device, it is not honored as it would be by almost any other device that supported DHCP assignment of host name from the DHCP server in question. This issue should be and I suggest must be fixed as soon as possible. |
To clarify your comment: It is known that (correct me if I'm wrong)
I think that
Now you say:
Now my question:
|
This discussion has evolved off topic. Please open a new issue, fill out the required info, and provide a MCVE and use case, with details to reproduce. |
I opened a new issue, but to answer your questions above...
Correct, and for proper network identification, it is a security issue for a device not to have a known and qualified name. If DHCP provides a host-name, and the host name is NOT statically assigned by the local OS, it should become the actual name for the device on the network, this how Windows, and Linux work.
My use case is that I want the device, i.e. ESP8266 (ModeMCU) to never have a host-name statically assigned in code. It makes no sense to do this. Then I would have to have a sketch for each and every device, because of a single static assignment? IMHO, no, this is not how DHCP and DNS are supposed to work. Dynamic DNS is not applicable, the device should not push the name, when the DHCP host-name option is published to the device. Please review DHCP specification for additional information if needed.
What I want to achieve is consistent behavior across DHCP supporting platforms, Windows and Linux support DHCP host name option, as do every other micro controller I have used until now. Only the ESP8266 WiFi environment fails to honor the DHCP configuration as published, per my experience thus far. If ESP8266 device can get its IP from DHCP for example, its DNS server, etc. then it should get the device name from DHCP. There are many DHCP options that allow for settings that are applicable beyond IP, Gateway, IMHO DNS, NTP, and host name resources should be honored as well. edited by d-a-v: followed in #5695 (thanks for the detailed answer!) |
Platform
Settings in IDE
Problem Description
Upon updating from 1.6 if the espressif platform in PlatformIO. Now using 1.8. The DHCP hostname is no longer int the DHCP discover coming from my 8266. So DHCP will ignore this device and never connect.
Ive tryed to turn on wifi debugging and use the wifi_station_set_hostname() call, and get the same results.
here is the packet for the DHCP discover.
Bootstrap Protocol (Discover)
Message type: Boot Request (1)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 0
Transaction ID: 0x0b00722b
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0
Your (client) IP address: 0.0.0.0
Next server IP address: 0.0.0.0
Relay agent IP address: 0.0.0.0
Client MAC address: BoboClown_80:00:01 (11:22:33:80:00:01)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (Discover)
Option: (57) Maximum DHCP Message Size
Option: (55) Parameter Request List
Option: (255) End
Option End: 255
Padding: 000000000000000000000000000000000000000000000000...
as you can see there is no option 12 (hostname).
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: