problems with log and options that are set.

Hughes, Doug Douglas.Hughes at DEShawResearch.com
Fri Oct 11 00:53:42 UTC 2013


>On 10/10/2013 7:04 AM, Hughes, Doug wrote:
>
>> Yeah, that works! But it points out that I have hit yet another
> dead-end. I can't use a variable that I construct as a
>> host-identifier to provide a fixed address to the client.. I've been
>>  battling this for a week now and am becoming more convinced by the
>> day that you just can't get there from here with the current dhcpd.
>
>I went through this a few years back and ultimately settled on building 
>classes by matching on both 'option agent.remote-id' *and* 'option 
>agent.circuit-id'.  I would then allow each class in single-host pools. 
>  It's not ideal, but works OK if you are not dealing with MAC addresses 
>changing for any given option 82 pair.  Obviously, though, 
>'fixed-address option ...' is better, since it is not a real lease from 
>DHCPD's point of view and can be offered repeatedly as long as the 
>option match is satisfied.
>
>But getting back to what you have been trying to do with fixed-address, 
>since you did not specifically state that agent.remote-id was *not* 
>globally unique, I have to ask: in your network, is it common to see the 
>same remote-id show up on different switch ports or whatever comprises a 
>circuit-id in your environment?


I poked at this for a while and there seem to be multiple possible ways:
1) define a class for the remote-id and a subclass for the circuit-id.
Advantages:
 Sub-classes use efficient hashes
Distavantage:
 Allow member syntax doesn't work for a subclass, so in the end it doesn't work.

2) define a class for every combination of remote-id and circuit-id.
Advantage:
 I could use the allow member of syntax to match with a pool of 1
Disadvantage:
 Classes are stored in a simple linked list, and wouldn't scale to thousands of hosts.

3) I tried setting a new option to the concatenation of remote-id and circuit-id
Advantage:
 Theoretically I could use host-identifier config-option <concatvar> = "$remoteid_$circuitid"
Disadvantage:
 Not supported in dhp parser, but it is a 1 line change to add OPTION and CONFIG_OPTION to the line in the appropriate .c file. (but, it still doesn't work, and debugging doesn't even show the incoming tags correctly, which is bizarre)


To answer your question, the combination of the two would be a suitable unique key. Remote-id by itself is just the switch name, in effect and we have dozens of switches.




More information about the dhcp-users mailing list