[Dnsmasq-discuss] Suggestion: use arp rather than ping to check
for addresses in use in DHCP
Rune Kock
rune.kock at gmail.com
Thu Jul 13 14:34:20 BST 2006
> The problem with using ARP for this is that a DHCP server can be
> attempting to allocate addresses on a remote subnet on which it doesn't
> have a interface. (DHCP works over routers, providing they provide a
> "DHCP-relay" function.) Since ARP isn't routed, it's only useful for
> checking that an address is in use on the local subnet. ICMP _is_
> routed, so it allows the DHCP server to check for in-use addresses even
> when they are not local; provided that it's not blocked, of course.
Oh, so DHCP is possible across routers! That could be useful at times...
> Interestingly DHCP clients do the address-in-use check too, and since
> the client only needs to check the local network, it does use ARP.
Okay, if most DHCP-clients do an ARP-check, then it is of course
pointless for the server to do the same.
It might be possible for the server to use ARP for local addresses and
ICMP for routed ones. But it seems that it would gain nothing (except
perhaps shorter time-out times), so I can see that it won't be worth
the extra complications to the code.
> All this stuff is specified in RFC 2131, which is well worth a read if
> you're interested in the nuts-and-bolts.
Well, I skimmed it just now, but luckily, I don't have to write my own
DHCP-server, since there are already such excellent ones available for
free :-)
Rune
More information about the Dnsmasq-discuss
mailing list