hardware type classing
Terry L. Inzauro
tinzauro at ha-solutions.net
Fri Oct 24 19:55:42 UTC 2008
Terry L. Inzauro wrote:
> Simon Hobson wrote:
>> Terry L. Inzauro wrote:
>>
>>> I am trying to assign IP information using substring MAC address
>>> matching but I can't seem to get it
>>> right. Am i going about this the correct way? If not, what am I doing
>>> wrong?
>>>
>>>
>>> class "shoretel" {
>>> match if ( (substring(hardware,1,6) = 10:49:0A) );
>>> }
>> Close, but you are fetching SIX bytes and comparing it to a THREE byte
>> value - you want substring(hardware,1,3) I think.
>>
>
>
>
> Ok, even after I altered changed the values from 1,6 to 1,3 the same result occurs. It now reads:
>
> class "shoretel" {
> match if substring (hardware,1,3) = 00:10:49;
> }
>
> Does it matter that i have 2 other "classes" defined? I have a class that is setup like this:
>
> class "ip_phone" {
> match hardware;
> }
>
> subclass "ip_phone" 1:00:E0:bb:1B:52:28; # extension 101
>
> pool {
> range 10.120.120.1 10.120.120.30;
> allow members of "ip_phone";
> #deny unknown-clients;
> }
>
> and another class that is the "default" class for that segment. If i place a "deny" statement in
> the "default" pool, i get a bunch of "no free leases" in syslog. at this point it seems that my
> matching statement isn't setup up right or i'm not applying the class definition correctly to the pool.
>
> any other ideas?
>
>
> thank you in advanced.
>
>
> _Terry
>
>
>
Never mind. I'm just stupid. The substring match was correct:
class "shoretel_handset" {
match if substring (hardware,1,3) = 00:10:49;
}
The issue I had was with my pool definition. After I created a pool definition that was
syntactically/functionally correct (along with the proper allow/deny statments), all worked as expected.
It would have been nice to see an error in syslog as to why an address couldn't be allocated from a
specific pool though.
kind regards,
_Terry
More information about the dhcp-users
mailing list