SV: Matching in a class based upon a variable
Lars Jacobsen
lars-jacobsen at newmail.dk
Thu Oct 19 18:49:35 UTC 2006
> Þórhallur Hálfdánarson 19. oktober 2006 16:05
>
> # Group 1 declaration and hosts belonging to the group
> group {
> set AccessGroup = "Group1"
> host Host1 { hardware ethernet 00:11:22:33:77:66:55:44; set ExpCID =
> "A/B/C"; }
> }
>
Here you set the variable "ExpCID" to the text string "A/B/C". This means A,
B and C are not values that change, but part of a constant string.
And for the match
> match if AccessGroup = "Group1" and option agent.circuit-id = ExpCID;
> }
to be true you need to be sure that the CID is equal to the text string
"A/B/C".
If A, B and C are variables that can have different values, then you need a
different "group match" statement.
/Lars
More information about the dhcp-users
mailing list