How to add client names to DHCP client list

Very basic question about LUCI. I have several clients in the Status Overview DHCP client list that show "-" instead of a client name. I'd like to fill in names for those MAC addresses, but I don't see where to do that. I can add static leases, don't want to do that :-), just to put in the missing DHCP client names.

Anyone give me a clue on this one? I did look around, and didn't find how to do this.


  • What version are you using?
  • Did the devices show a hostname in previous versions?

Here's the firmware version from "Status Overview":

OpenWrt SNAPSHOT r12158-ffbb8ed5a2 / LuCI Master git-20.032.25176-8d8c26e|

And here's the image filename:


I haven't used LEDE firmware for over a year, and I've forgotten what I did before to get the client names for the "-" or "?" list entries entered. Seems like I did something, because I remember them in the bandwidth monitor, but don't remember how I got them there. Seems like no matter what firmware I use, I have to fill in some client names. Apparently those clients don't offer them for ARP or whatever :-).

Seems to me that with DD-WRT it was an argument list in a sub-window that was passed to dnsmasq on startup. Don't see that here. In other firmware, you just edit in the name that you want in the list itself.

I got to believe that I'm not the only one that does this, MAC addresses are cute but just don't reveal much about the client :-).

Not sure why you are not willing to arrange DHCP reservation but that is the simplest approach (combined with adding their names through Network -> Hostnames menu).
Otherwise I would think about some script associating the name with the MAC.

1 Like

Not that I'm not willing :-), more like when I saw that interface I didn't think about using it for that since it didn't have a column for MAC address. I kind of like having the addresses assigned by a global DHCP server, and being able to add the names to that.I'll see what I can do with it.

Thanks for the suggestion.

Add static DHCP leases without IP to assign names.

1 Like

I did think of and try adding static leases without IP's first, didn't work for me. Ended up going with the suggestion of using the "Hostnames" interface. When I first saw it, didn't see that the dropdown "Add" menu included the MAC Addresses. Seems to have worked okay, and now the bandwidth monitor entries are pretty much all labeled, except for a "Hon Hai Precision" one that I haven't tracked down yet. Some day I might figure out what client that is :-). Should have nailed it when it first appeared, but I made the mistake of ignoring it, and now tracking it down is problematic.

Now I know why the "Hostnames" mechanism is so weak, after putting time in to set it up. Be warned, it uses the DHCP IP addresses to figure out the hostname, not the MAC addresses. So when the DHCP address changes, as they do if a router is left out of use for a while, the hostnames don't work anymore. You have to re-do the whole thing at that point...and if the DHCP server re-assigns the IP address of any client(s) when using the router (probably not likely), you would also have to re-do the hostname entry for those client(s).

So while the hostnames thing is a good idea, the implementation of it is not.

In order for it to really work you need BOTH hostname configured and DHCP reservation.

Why should I do both? The "Static" thing works for the hostnames, as long as I assign the host an address. Which I don't really want to do, but have done to "make it work". As far as I'm concerned, adding a "Static" reservation to "make the hostname entries work" is both redundant and should be unnecessary. But, as I said, I've added the static reservations because I want the hostnames despite the implementation. I've removed the Hostname Table entries, and the "Static" reservations are working fine for me. Not sure why the "Hostname" table is there in the first place, since it just leads one to think that the hostnames have been added...which is then screwed up when DHCP redoes its IP address allocations. In fact, if DHCP reallocates a previously used IP to a different device, which it did for me, then you get an incorrect hostname...not a good thing, either.

I don't want to be argumentative, I just want things to work as they should :-).

Feel free to propose changes to DHCP RFC ;-). But for now DHCP serves whatever available IP from given scope. If the client asks for refresh only then the same address is given (slightly simplifying).
For several clients both DHCP reservation and entry in the hostname are redundant. But those not knowing their name or not willing to communicate it will then be listed with dynamically (D in DHCP) assigned IP with no name.
So that's just workaround for in my case some IoT stuff but also Android 10 devices. Other option would be to update IoT firmware to allow for name definition.
Still for the purpose of being able to review long term stats you might have to set up reservation (but not hostname entry in that case).
And last thing: familiarize yourself with ISO-OSI model to understand that MAC belongs to different layer than the name.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.