OMAPI "key conflict"

Phil Mayers p.mayers at imperial.ac.uk
Mon Sep 10 20:59:56 UTC 2007


> So, at the moment all my hosts are declared with one "host" stanza for
> the mac alone, and zero or more for each IP (there's no particular
> reason for this - it's just the way the code has always generated them,
> and it pre-dates me) like so:
> 
> host 11-22-33-44-55-66 {
>   hardware ethernet 11:22:33:44:55:66;
> }
> 
> host 192.168.0.10 {
>   hardware ethernet 11:22:33:44:55:66;
>   fixed-address 192.168.0.10;
> }
> 
> host 192.168.1.10 {
>   hardware ethernet 11:22:33:44:55:66;
>   fixed-address 192.168.1.10;
> }
> 
> If instead I move to:
> 
> host 11-22-33-44-55-66 {
>   hardware ethernet 11:22:33:44:55:66;
>   fixed-address 192.168.0.10, 192.168.1.10;
> }
> 
> ...then I can be sure that:
> 
>  1. the behaviour of the latter setup is exactly equivalent to the
> former, without even considering OMAPI

Bah. It's not is it?

"""The host declarations will only match a client if one of their
fixed-address statements is viable on the subnet (or shared network)
where the client is attached.  Conversely, for a host declaration to
match a client being allocated a dynamic address, it must not have
any fixed-address statements.  You may therefore need a mixture of
host declarations for any given client...some having fixed-address
statements, others without."""

So if a host initially has no fixed IPs, I'll start with:

host foo { hardware ethernet $MAC; }

...and if someone updates it in my database, it will be impossible using
OMAPI to either add the fixed-address statements to the host (since that
will stop it picking up dynamic addresses) or create a 2nd host (since
the MAC address conflicts).

How annoying.



More information about the dhcp-users mailing list