[Dnsmasq-discuss] Why is dnsmasq handing out the same IP to different MACs?

Jan 'RedBully' Seiffert redbully at cc.hs-owl.de
Tue Apr 13 00:30:59 BST 2010


Paul Smith schrieb:
> On Mon, 2010-04-12 at 20:51 +0100, Simon Kelley wrote:
[snip]
>> You are seeing problems because you are running lots of hosts through
>> the address-aquisition process simultaneously and their MAC addresses
>> are all very similar because they have the same manufacturer. This is
>> causing the rather unsophisticated hash function to generate lots of
>> collisions.
> 
> Would it be better to give the lower octets in the MAC more impact on
> the hash, on the assumption they will be "more random" in general than
> the higher octets which are vendor-based?
> 

Hmm, maybe i'm missing something here, but what you suggest is "the most
natural" thing in the world.
For a good hash one always wants that a single bit change generates a big
difference in result, and esp. for "hashtable" hashes (thats what basically
happens here) uniform distribution.

So i'm a little supprised Simon reinvented the wheel.

Since this does not look like the most performance critical code, whats wrong
with something like the Jenkins hash. Just to through a name out there. Pick one
of the "tested" (tests like
<http://sites.google.com/site/murmurhash/avalanche>). And no, i would not
recommend murmur for dnsmasq, because it will not work well with the embedded
mips and arm cpus without hardware multiplication.

Greetings
	Jan


-- 
class WindowsVista extends WindowsXP implements nothing
{}



More information about the Dnsmasq-discuss mailing list