Problem when multiple dhcrelay instances relay to a common server
dhcp1 at thehobsons.co.uk
Wed Jun 13 06:17:50 UTC 2007
mark mckinstry wrote:
>On our system (Linux-based) we are running an instance of dhcrelay for
>each client interface, so that relay configuration (e.g. -m option) can
>be different for each client, and so that requests from each client can
>optionally be relayed to a different server.
>This seems to work OK as long as each relay instance is configured with
>a different server address, but whenever they have a common server
>address the relay starts relaying multiple duplicate packets to the
>server for each client request. We get around 10 such duplicate packets
>per request when there are two dhcrelay instances running, and 100 when
>there's three instances running.
You need to provide more info on your setup. Initially my thought was
that the relay agents are picking up relayed packets and relaying
them again - but that wouldn't explain why the packet counts are so
few. The same applies if there was a loop for broadcast packets.
Thinking some more, I'm assuming you have a box with multiple
interfaces (eth0, eth1, ... ethm). If eth0 is facing the server, then
you'll be running an instance of the relay for eth1<->eth0,
eth2<->eth0, ... ethm<->eth0. Perhaps the other instances are
detecting the outbound packets on eth0 (which they are listening on),
this is a case that wasn't considered in the design, and they don't
get filtered out. This could explain multiple packets, but not why
they actually stop instead of continuing indefinitely !
With two instances you would get (for one packet via A) extra packets
that went AB, ABA, ABAB, ABABA, ...
With three it goes up much faster :
A generates a packet which gets picked up by B & C, B & C generate
extra packets and so on. For just 4 hops you would get :
AB, AC, ABA, ABC, ACA, ACB, ABAB, ABAC, ABCA, ABCB, ACAB, ACAC, ACBA, ACBC ...
I think it looks like 1 + (m-1) + (m-1)^2 + (m-1)^3 ... (m-1)^(n-1)
after n hops so it's not hard to see the packet count go up so fast
with number of relay agents.
I've seen network loops that rebroadcast broadcast traffic - it isn't
pretty to see what it does to the network and the machines that are
attached ! Saturated 100Mbps of small broadcast traffic, that's a
heck of a packet count for EVERY device to process.
More information about the dhcp-users