Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Show client names in dhcpd.leases
In /var/lib/dhcpd.leases I see client names of Windows clients, Ubuntu and Knoppix clients, but not my own Debian clients.
The clients I see the client names for are the names given to those computers. This is the computer name in Windows, and presumably the host name for the Linux computers.
The Debian clients which I do not see both have and don't have a name in the local DNS server. All Debian clients do have a valid host name. It is not that the name is shown as "" or empty, the entire line is omitted:
The name will be coming from the hostname being provided in the DHCP request, so fine tuning of your dhcp client would be required, check the manpage for the client you're using, e.g. dhclient, pump, dhcpcd. Does it matter though? If you're not configuring to require a hostname, then what's the problem? Remember that dhcpd.leases is a data for for the server, it's not there for your delectation.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Original Poster
Rep:
Quote:
Originally Posted by acid_kewpie
The name will be coming from the hostname being provided in the DHCP request, so fine tuning of your dhcp client would be required, check the manpage for the client you're using, e.g. dhclient, pump, dhcpcd.
It never occured to me that it could be a dhcp client configuration issue and that the hostname is pushed to the server. Googling was not very effective.
Quote:
Originally Posted by acid_kewpie
Does it matter though? If you're not configuring to require a hostname, then what's the problem? Remember that dhcpd.leases is a data for for the server, it's not there for your delectation.
It is convenient to know. Mostly while installing a new host. The new host obtains a DHCP address. Usually I retrieve the MAC address from dhcpd.leases and put it in dhcpd.conf. This is easier to do when you know which host belongs to which hw address.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.