Hostnames and DHCP static leas hostname

I have static lease DHCP for all my station … I’ve already asked about it once and forgotten… what is the next list of hostnames for ?

image

image

I guess it’s /etc/hosts content, where did you find that?

note that host names must not contain underscores, I recommend chaning them to hyphens.

that is for DHCP, when you are using/having localdomain (dynamic domain) at use, see /etc/config/dhcp. With static leases (static domain), you can use oldish /etc/hosts instead.

The client gets a different IP address assigned to the network each time. Its hostname will be different each time ? I do not see a reasonable purpose in that.

In my case, I have dynamic-domain at use while having two static leases active (for my TV an one old RPI2 device). Both static-lease ones are getting always same IP. While for my local domain those listed in “luci/hostnames” are given also same IP. Those not listed there or in /etc/hosts are different each lease.

notes

Shortly “dhcp.lease and dhpc.lease.dynamic” files are pretty fine, since some time. I remember having similar issues, but that was related to specific hostname characters/letters at use (underscore, starting with number and so on). Also some time ago i found that when you have “*” in lease file instead of real hostname, it cause that dhcp-dynamic.py script to kind of fail on that entry. Aside, there is that “hint” file, which actually can have different pair of host:ip vs lease file entry (that cause some time loong delay once dhpc really starts serving/reserving ip for specific hosts.

This topic was automatically closed after 60 days. New replies are no longer allowed.