Client identifier Option

pat patkumar82 at gmail.com
Wed Jun 3 16:21:49 UTC 2009


Hi Anderson,

   Yeah it works but i have some problem in understanding this concept.

i gave { match if suffix (option dhcp-client-identifier, 8) =”\0abc.com” ;}
which is not working, and changed the length to 7 as follwos
{ match if suffix (option dhcp-client-identifier, 7) =”\0abc.com” ;} this
also not working i tried from 0 till 8 all length it's not working.

but then i changed the domain as isc.com instead of abc.com and with length
6 this concept is working fine for variable length user name and also i
checked for domain name pat.com with length 6 it is working

{ match if suffix (option dhcp-client-identifier, 6)
=”\0isc.com<http://0abc.com/>”
;}
{ match if suffix (option dhcp-client-identifier, 6)
=”\0pat.com<http://0abc.com/>”
;}

what i observerd is the length part should be (byte legth of data-expr less
one) is this correct and why is it so ?

still i don't find any explanation why for the domain abc.com it is not
working, can any one explain this interesting scenario.

Regards
Pat




On Wed, Jun 3, 2009 at 5:53 PM, Chuck Anderson <cra at wpi.edu> wrote:

> On Wed, Jun 03, 2009 at 04:05:31PM +0530, pat wrote:
> > { match if substring (option dhcp-client-identifier, 6, 12) =”\0abc.com”
> ;}
> >
> > But the problem is identifying the various address allocation classes in
> the
> > server using a substring match at character postions will cause problems
> > with variable length user names. Is there a way to match anything after
> > the "@"? using a regular expression, maybe?
>
> "suffix" might be what you want:
>
>   suffix (data-expr, length)
>
>          The suffix operator evaluates data-expr and returns the last
>  length
>          bytes  of the result of that evaluation. Length is a numeric
> expres-
>          sion.  If data-expr or length evaluate to null, then the result
>  is
>          also  null.  If suffix evaluates to a number greater than the
> length
>          of the evaluated data, then the evaluated data is returned.
>
> { match if suffix (option dhcp-client-identifier, 8) =”\0abc.com” ;}
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090603/2eeee760/attachment.html>


More information about the dhcp-users mailing list