key conflict message for create host by Omapi

Graham Clinch g.clinch at lancaster.ac.uk
Wed Oct 21 13:35:18 UTC 2015


On 21/10/2015 13:58, Simon Hobson wrote:

>> =-=-=
>> subnet 148.88.141.0 netmask 255.255.255.0 {
>>    option routers 148.88.141.1;
>> }
>>
>> # static_allocation_id=18460
>> host 148.88.141.167 {
>>    fixed-address 148.88.141.167;
>>    hardware ethernet 00:13:44:00:05:0c;
>> }
>>
>> [...]
>>
>> subnet 148.88.186.0 netmask 255.255.254.0 {
>>    option routers 148.88.186.1;
>> }
>>
>> # static_allocation_id=24416
>> host 148.88.186.71 {
>>    fixed-address 148.88.186.71;
>>    hardware ethernet 00:13:44:00:05:0c;
>> }
> 
> Bear in mind that you *WILL* get strange effects if you put host statements within a subnet declaration. When the client connects to a different subnet, it'll still match the host declarations (so is still a "known host"), but while it'll get a dynamic IP appropriate to the subnet it is in, it'll inherit options like "router" from (one of) the subnet(s) where the host declaration(s) have been put.
> 
> Hence the standard advice - do *NOT* put host statements anywhere but the global scope.

Hm?  Am I missing something, or was that just a general warning?  The
hosts are defined in the same 'global' scope as the subnets.  Given the
configuration above (though 1000x longer..), we don't see hosts being
given the wrong router addresses when they visit other subnets.

Graham


More information about the dhcp-users mailing list