key conflict message for create host by Omapi

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Oct 21 12:58:17 UTC 2015


Graham Clinch <g.clinch at lancaster.ac.uk> wrote:

> Drifting gently away from the original request, just noting that
> multiple host records (in different subnets) with the same hardware
> address *does* work (at least in 4.2) when configured through the
> configuration files.  I've not tried it via OMAPI.
> 
> =-=-=
> 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.



More information about the dhcp-users mailing list