[Kea-users] Can I provide a local server url to clients?

Olaf Greve ogreve at millennics.com
Wed Mar 13 14:42:26 UTC 2024


Dear Darren (and others),

Thank you kindly for your answer and the time spent on writing it!
I wanted to share that I managed to solve it now. After further searching I (finally) learnt that there are basically two ways this is normally done:

1) with dhcp option 252. Apparently this option is not supported by every dhcp server though and from what I gathered such is the case with Kea too (that is, I see option 252 listed as ‘reserved for internal use’).
2) by setting up an MDNS (‘zeroconf’) service. Essentially what that does is that it multicasts the name of the machine on which it runs (as stored in /etc/hostname) with ‘.local’ appended to it. So it is something like ‘hostname.local’.

Option two works nicely for us, without having to install and configure a full blown ‘true’ DNS server.

So ‘yes’, indeed it is best done with a kind of DNS server, but can be done in a lightweight way with an mdns setup if only the server name needs to be made available to the clients this way. 

For completeness (and for sharing some knowledge in case someone wants to do something similar): I solved it using the Yocto (open embedded) ‘mdns’ recipe. It seems to also be possible under yocto using ‘avahi’.

Thanks again!


> El 13 mar 2024, a las 10:47, Darren Ankney <darren.ankney at gmail.com> escribió:
> Hi Olafo,
> 
> What you are describing would require a DNS server or some custom
> programming on the client computer.  You could send some URL from Kea
> in some custom option, but the client wouldn't know what to do with it
> without being told.  Additionally, it would have to be IP based or the
> client computer would still need to do a lookup somewhere.  Could you
> not just tell the user in documentation to always connect to
> http://192.168.10.2:<some port?> to perform admin operations (assuming
> the admin.local URL would point at that IP address)?  This would seem
> like the simplest solution.  Otherwise, I fear you are either going to
> have to do some client side programming of some kind or embed a DNS
> server in your embedded device.
> 
> Thank you,
> Darren Ankney
> 
> On Mon, Mar 11, 2024 at 8:24 AM Olaf Greve <ogreve at millennics.com> wrote:
>> 
>> Hi,
>> 
>> I’m fully new to the realm of DHCP servers and may hence be asking something that is not possible with them. I tried to search for the following request online and couldn’t find any sample configurations, which leads me to think that maybe it can’t be solved with Kea alone. Please bear with me a little if I’m asking a silly thing here :P
>> 
>> The set-up:
>> Last Friday I installed Kea 2.0.2 in an embedded platform (running on a BeagleBone Red, industrial) using a custom Ubuntu 22.04 build created via yocto Kirkstone.
>> So far so good and on board I managed to set up and run Kea just fine as desired, configuring and starting only the dhcp4 part of it, giving out IP addresses in the range of 192.168.10.100 - 192.168.10.200 in subnet 192.168.10.0/24.
>> Our BeagleBone always (hard) is set to listen at 192.168.10.2
>> 
>> The above set-up is configured on the usb0 device which in normal conditions is not connected but is required for local administration of our embedded set up when we connect a host computer directly to our embedded setup via a 1-on-1 cabled usb connection (rather than using our eth0 interface that we require for normal Ethernet functionality.
>> 
>> The above works fine as for giving out an IP address to the host computer when connected via usb and indeed we can the from it successfully ssh to the BeagleBone and do what we need, taking care of the first part of what I wanted to achieve.
>> 
>> The question is about ‘the remaining part’ I’d like to achieve, if possible. What we’d like to achieve is that when a host computer is connected as described above they can always ‘automatically’ (as in: without the end users making /etc/host entries on the host computer) reach our on board administration web interface via some local url like e.g. ‘admin.local’ just by pointing their web browser to that local address. Much like often is available for commercially available routers so anyone can easily access the admin interface when connected locally.
>> 
>> OK, so here’s where my knowledge falls short. Normally I’d say the this sounds like a DNS task, right?
>> However, looking through the MANY options that Kea offers I wonder if this can be done with Kea alone or how I would otherwise go about it.
>> Can I somehow simply pass the (fake) server url admin.local, associate that to address 192.168.10.2, to all clients that connect via dhcp and will the client then understand that and do what I want or do I need to do it differently?
>> From what I see in configuration examples and the documentation, I fear a bit that that will not be possible with Kea alone and that I’d need to set up a DNS server on the BeagleBone too and let Kea pass the ip address(es) of that in the domain-name-servers field for the IP pool that Kea serves.
>> 
>> As we normally rarely connect a computer via usb this way, and the connection is always one on one then, and we have a need to keep resources usage in the BeagleBone to a minimum (!), it feels like a terrible overkill to fully configure a DNS server for giving out just that 1 local server URL.
>> 
>> Does anyone have experience for this and/or know how to achieve this is an as ‘lightweight as possible’ manner?
>> Can Kea dhcp4 do this, perhaps together with kea-ddns-dhcp ?
>> 
>> Hopefully someone can help me with this request; any ideas and pointers to information are very much appreciated!
>> 
>> Thanks in advance for taking the time to address this and kind regards,
>> Olafo
>> 
>> 
>> 
>> --
>> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>> 
>> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>> 
>> Kea-users mailing list
>> Kea-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/kea-users
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> 
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> 
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users



More information about the Kea-users mailing list