string data expressions (was Re: using option 82 to assign a static ip-address)

Sten Carlsen stenc at s-carlsen.dk
Wed Dec 19 14:41:31 UTC 2012


On 19/12/12 15:35, Simon Hobson wrote:
> perl-list wrote:
>> bah - that is what I feared. The problem I have is not knowing what will be received at each site (depends on vendor) and hoping to find a solution that works with all to prevent re-configsevery timesomeone somewhere adds some new equipment, and worse yet, matching things in a multi-vendor environment when you aren't sure what will come from where.
> Sorry, I don't understand what the problem is.
>
> If you are having to match on <some option> then presumably you have some idea what is in the option. In all cases, if you are using something like "option blah = <something>" then there's no problem. If you expect <something> to look like a string then specify the string in quotes :
> option option-82 = "Switch 0 Port 3"
> If you expect it to be "non text" then specify it as a hex string :
> option option-82 = "00:03" # if, for example, the equipment just sent two octets with switch and port number
Shouldn't this be: option option-82 = 00:03  --> no quotes?
>
> This will work with all sites, using a common config format. All it requires is that you put quotes in your database round text values, and not around hex representations.
>
>
> If this doesn't cover your problem, then perhaps you'd better expand on what your problem is.
>
>

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

        "MALE BOVINE MANURE!!!"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20121219/b36ed6ca/attachment.html>


More information about the dhcp-users mailing list