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
core device DHCP support #1085
Comments
I think I'm basically there with a patch for this now. A couple things that have come up: I've made it so that DHCP is only enabled if the ip config option is set to "use_dhcp", adding another config option initially seemed like the obvious thing to do but this way there's no ambiguity between the precedence of the config options and it maintains backwards compatibility, which defaulting to using DHCP if no IP address was specified wouldn't have. What do you think? It seems quite common that the first DHCP DISCOVER is dropped before it reaches the DHCP server, I suspect that the ethernet device isn't always quite ready when it's sent. I've put in an early retry for this so that you don't have to wait 10s for a IP address in this case. I was wondering if it was possible to get link status from the ethernet device? |
IMHO the current mode of operation when no IP address is supplied (defaulting to a fixed IP address 192.168.1.70) is not a very principled approach. My firm preference would be to default to DHCP if no IP address is programmed in /or/ if the "ip address" field is set to "use_dhcp". My logic here is that in most cases the default hard-coded IP address is not useful, whereas defaulting to DHCP will make the Kasli work out of the box on most networks without requiring the user to program any settings. |
Don't think the |
Kasli would need such a CSR indeed, which is quite straightforward to implement. |
I'm happy with this, so I'll make this change, before I post it.
Well it's probably not worth worrying about, it'll just mean that DHCP is slower in some corner cases like the network not being plugged in on start up and switching between network cables. |
They would still need to find out what IP address the DHCP server assigned and copy it into the device database. On some DHCP servers and without special configuration, the IP would also change from time to time. Some ways out of this are:
|
Indeed I was planning to document looking at the console output to achieve this. You could also find out from the DHCP server in most cases. Some ways out of this are:
This would require more support in smoltcp, so I'd need to get that merged upstream first. I'm also not sure how common this configuration is. Anecdata: We had this setup at the last company I worked at, but we don't at my current one.
From wikipedia:
That sounds perhaps newer than I would like to trust from MS. The other thing is the bootloader, I wasn't planning to add DHCP support to that, mostly because I incorrectly thought the DHCP features in smoltcp required alloc. They don't so it probably wouldn't be hard to add it to the bootloader also. I'm not sure how this feeds in to this conversation, it would obviously become a lot more compelling if the bootloader could support bootp/pxe booting, but that also requires some smoltcp changes. |
I'm pretty sure this is a very difficult thing to do in many typical situations e.g. in government facilities :) |
Indeed that's an excellent example of when it would be very hard. |
Maybe Kasli 2.1 could have a little LCD or OLED display to show this kind of information. |
Sounds good, when can I get my hands on one of them 😜 I also don't think that the platform specific default IP addresses are documented anywhere and are all different from the documented IP address that Kasli's from M-labs ship with (192.168.1.75). |
I don't think that's the best solution. Better do proper m2m discovery through mdns or some broker mechanism. |
Support assignment of the core device IP address by DHCP.
See also #955
The text was updated successfully, but these errors were encountered: