LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-23-2009, 06:58 PM   #1
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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:

Code:
lease 192.168.0.163 { #my own Debian
        starts 2 2009/11/24 00:19:07;
        ends 2 2009/11/24 01:19:07;
        hardware ethernet 00:02:a5:77:56:9e;
}
lease 192.168.0.162 {        #Windows
        starts 1 2009/11/23 23:51:08;
        ends 2 2009/11/24 00:51:08;
        hardware ethernet 00:15:99:23:2c:61;
        uid 01:00:15:99:23:2c:61;
        client-hostname "SEC001599232C61";
}
lease 192.168.0.161 {        #Knoppix
        starts 1 2009/11/23 21:35:57;
        ends 1 2009/11/23 23:35:57;
        hardware ethernet 00:02:a5:95:95:7b;
        client-hostname "Knoppix";
}
jlinkels
 
Old 11-24-2009, 01:52 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 11-24-2009, 05:08 PM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Original Poster
Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by acid_kewpie View Post
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 View Post
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.

Thanks for your help

jlinkels
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPD no free leases HiOctane21 Linux - Networking 6 10-02-2013 11:21 PM
How to show IP address and Client Names on Squid Logs slacker_me Linux - Server 12 02-21-2009 08:52 AM
DHCPD Has No free leases? FishGills Linux - Networking 7 01-24-2009 06:49 PM
dhcpd.leases desertwanderer Linux - Server 0 10-25-2007 03:39 PM
cannot show the traditional Chinese names on a ftp client tony yu Mandriva 4 09-09-2003 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration