how respond only to specific clients

Holger Honert holger.honert at signal-iduna.org
Fri Jun 23 07:16:16 UTC 2006


Hi All, 

I am working with user-classes, i.e. class IDs with the following statements:

class "nessi-a.local" {
        match if suffix (option user-class, 7) = "nessi-a";
        option domain-name "nessi-a.local";
        ddns-domainname "nessi-a.local.";
}

The clients have the DCI configured as this:

        DHCP Class ID . . . . . . . . . . : nessi-a

HTH

Holger 

Douglas Sterner schrieb:

> The workstation shows this: 
>         DHCP Class ID . . . . . . . . . . : Internal
>
> Ethereal is showing this as Option 77 User Class Information
>
> Is this correct?
>
>
> Thanks
>  
> Douglas Sterner 
>
>  
>
>
>
> Simon Hobson <dhcp1 at thehobsons.co.uk> 
> Sent by: dhcp-users-bounce at isc.org
> 06/22/2006 12:05 PM
> Please respond to
> dhcp-users at isc.org
>
>
> To
> dhcp-users at isc.org
> cc
>
> Subject
> Re: how respond only to specific clients
>
>
>
>
>
>
> Douglas Sterner wrote:
>
>   
>> Trying to use the dhcp-client-identifier option to only give out IP's to
>> authorized workstations. Well the short story is it doesn't work. My
>> clients all have Internal as there DCI but are unable to get an address
>> with this config. Do I need to use pools, the man pages have been vague 
>>     
> on
>   
>> examples. In addition dhcp-client-identifier, 0, 3 where can I find out
>> what the 0 and 3 mean, I haven't found a good reference as of yet.
>>
>> #192.168.40.X Network
>> class "Internal" {
>>   match if substring (option dhcp-client-identifier, 0, 3) = "Internal";
>> }
>> subnet 192.168.40.0 netmask 255.255.254.0 {
>>         pool {
>>                 option netbios-node-type 8;
>>                 ddns-updates on;
>>                 range 192.168.41.120 192.168.41.245;
>>                 option subnet-mask 255.255.254.0;
>>                 option routers 192.168.40.1;
>>                 allow members of "Internal";
>>               deny unknown-clients;
>>               authoritative;
>>         }
>>     
>
> Try this, though as Glenn points out, you may find you need to start 
> at character 1 instead of 0.
>
> class "Internal" {
>    match if substring (option dhcp-client-identifier, 0, 8) = "Internal";
> }
> subnet 192.168.40.0 netmask 255.255.254.0 {
>    authoritative;
>    option netbios-node-type 8;
>    ddns-updates on;
>    option subnet-mask 255.255.254.0;
>    option routers 192.168.40.1;
>    pool {
>      range 192.168.41.120 192.168.41.245;
>      allow members of "Internal";
>    }
> }
>
>
> Glenn wrote:
>
>   
>> The substring operator is described in the dhcp-eval man page. The 0,3
>> describe the offset and length, so a substring of length 3 can never
>> equal "Internal". You probably want to just drop the whole substring bit
>> and use something like this:
>>
>> #192.168.40.X Network
>> class "Internal" {
>>   match if option dhcp-client-identifier = "Internal";
>> }
>>     
>
> No, that WILL NOT WORK. If the clients give "Internal" as their 
> client ID then they will all get the same IP address.
>
> Simon
>
>
>
>
>
>
>
>   




More information about the dhcp-users mailing list