clients with no hostname

jeffrey j donovan donovan at beth.k12.pa.us
Thu Jan 19 02:49:24 UTC 2012


On Jan 18, 2012, at 10:03 AM, Glenn Satchell wrote:

> There are a few ways you can do it on the server, eg:
> 
> option hostname = pick-first-value (option hostname, binary-to-ascii( ...) );
> 
> where the unique string for the default hostname can be derived from the mac or ip address using binary-to-ascii, eg:
> 
> concat (binary-to-ascii (10, 8, "-", leased-address), "-dhcp");
> 
> concat (binary-to-ascii (16, 8, "-", substring (hardware, 1, 6), "-dhcp");
> 
> Useful man pages are dhcp-options and dhcp-eval.
> 
> regards,
> -glenn
> 

thanks for the reply glenn,

I'm a little confused on how to trigger if the hostname is blank. Ive already been able to group by the first characters in the hostname.
sample of my config.
class "FHS" {
        match if substring (option host-name,0,3) = "FHS"
         or substring (option host-name,0,3) = "CFF";        
}


could i do something like this ?

class "FOO" {
        match if substring (option host-name,0,8) = " ";       
}


does that look correct ?

-j


> On 01/19/12 00:05, jeffrey j donovan wrote:
>> Greetings
>> 
>> I have been giving out ip addresses to machines on my network. I'm looking at my lease file and I have found many devices do not have a hostname identifier.
>> 
>> IP address: 10.153.15.101    Lease status: Active    Lease start: 17/01/2012 09:01:11    Lease end: 18/01/2012 09:01:11    Mac address: 00:1e:52:70:f7:53    WINS name: FHS-CFF-LA06-06
>> IP address: 10.153.15.114    Lease status: Active    Lease start: 17/01/2012 09:01:35    Lease end: 18/01/2012 09:01:35    Mac address: 00:1e:52:70:f7:5e    WINS name: FHS-CFF-LA06-02
>> IP address: 10.153.15.115    Lease status: Active    Lease start: 17/01/2012 08:27:05    Lease end: 18/01/2012 08:27:05    Mac address: 00:23:12:06:20:4a
>> IP address: 10.153.15.117    Lease status: Active    Lease start: 17/01/2012 08:45:28    Lease end: 19/01/2012 08:45:28    Mac address: 00:23:12:06:20:6e
>> 
>> 
>> how can I ensure a client has a hostname before dhcp hands out an address . in this case, two machines have the correct WINS name, the other has nothing.
>> 
>> Is there a way I can say,...
>> 
>> If WINS name =  " blank" then send this address , else send this.
>> 
>> or
>> 
>> if WINS name = F00 then send " ipaddress "
>> 
>> 
>> any insight would be helpful.
>> -j
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
> 
> 
> -- 
> regards,
> -glenn
> --
> Glenn Satchell                            |  Miss 9: What do you
> Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
> mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
> http://www.uniq.com.au tel:0409-458-580   |  types random stuff.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users




More information about the dhcp-users mailing list