Hostname as "-"

I set static lease for those IP's. And I can see their full names in "Static Lease" under Network section.
But in Luci Summary I see it that way. With "-" names... And the top one is also cut after esp.
It should be esp.Intercom ..
Why it's happening?


Correct - what's the issue?

It seems normal, what's the issue?


Do those devices even announce a hostname to the DHCP server? :thinking:

1 Like

If you want “intercom” as domain name you need to change lan to intercom in the dhcp domain settings.

You can’t have a ‘.’ in the client name. It needs to be - or _.

As far as I can remember a ‘-‘ means a address is given with isn’t 12h lease but the client isn’t connected or has left?

In my case, it's a device that doesn't announce a hostname when requesting a lease. The device is online.

(My example photo is of an Ama$on Echo device. They don't announce a hostname when requesting a lease.)

I've also seen this in the case of 2 devices with an idetical hostname. The 1st device will show "-" once the 2nd device gets a lease.


What the device do isn’t really important for dnsmasq and static leases as long as the device use DHCP client mode. You can put in a hostname to a mac and that name show up in the lease list.

For example RaspberryPi usually have the internal hostname RaspberryPi as default and you can have a completely different hostname in the dhcp server.

But if you change hostname to localhost in the raspberrypi o/s the it gets the name from the dhcp server.

And the PhilipsHUE hub announce the mac address as a standard hostname but you can make a static lease in dnsmasq to have PhilipsHue as name in the lease list for that mac address but still with a “random” IP. And the HUE hub still thinks everyone knows it by the mac address.

Thanks lleachii. i am having a same situation and am inspired by your answer to investigate. it appears to be a bug in openwrt reading the hostname, specifically in the question esp.something.something will be interpreted as esp alone, and will encounter a duplicate issue if othet device is also esp so showing up as -
Use - instead of . solves the problem