[ELDK] R: R: ARP Messages

Luigi Rizzi rizzi at algorab.com
Thu Nov 18 11:29:16 CET 2010


On my /proc/sys/net/ipv4/conf I found arp_filter = 0.
I changed this parameter directly in devinet.c and than recompiled the

Now arp_filter = 1 and there's only one answer to the ARP request!
Thanks for the precious support...


-----Messaggio originale-----
Da: Stefano Babic [mailto:sbabic at denx.de] 
Inviato: mercoledì 17 novembre 2010 20.02
A: Luigi Rizzi
Cc: 'Detlev Zundel'; 'Stefano Babic'; eldk at lists.denx.de
Oggetto: Re: R: [ELDK] ARP Messages

On 11/17/2010 05:49 PM, Luigi Rizzi wrote:
> Hi Detlev,Stefano,
> yes I really appreciate this mailing list! (and sorry if some questions
> not too much ELDK related...)

Well, you can probably find more specific answers checking in the
corresponding ML.

> Well, Module interfaces and sniffer are connected to the same Ethernet
> in this way the sniffer can see every input/output packet from Eth1 and
> Eth2.
> So, All my test were done NOT on two physical separated network. 
> Stefano, are you sure about the fact that is not allowed to have both
> interfaces sharing the same segment?

Probably "not allowed" was not the best explanation. But think about
what happens if each network has its own DHCP server. The main problem
is that broadcast messages are *not* routed, but because the two
networks are connected together, both networks receive the same
packets.And there could be a lot of side effects.

What you see is called "arp flux", or something like this - I think is
reported in one book I read, but you can easy find in internet. I tried
with google and I see there is a lot of results. The behavior you
reported *should* be correct and conform to standards (well, to be sure
you have to check in the related RFCs documents...)

> Anyway, there's in your opinion a workaround to avoid this double ARP
> packet?

Well, I have no idea if there was something for 2.4 Kernel, is too old
to remember, but...surprise ! There is a setup for 2.4 kernel, too.

Check Documentation/networking/ip-sysctl.txt and search for arp_filter.
It should be your friend:

arp_filter - BOOLEAN
        1 - Allows you to have multiple network interfaces on the same
        subnet, and have the ARPs for each interface be answered
        based on whether or not the kernel would route a packet from
        the ARP'd IP out that interface (therefore you must use source
        based routing for this to work). In other words it allows control
        of which cards (usually 1) will respond to an arp request.

        0 - (default) The kernel can respond to arp requests with addresses
        from other interfaces. This may seem wrong but it usually makes
        sense, because it increases the chance of successful communication.
        IP addresses are owned by the complete host on Linux, not by
        particular interfaces. Only for more complex setups like load-
        balancing, does this behaviour cause problems.

        arp_filter for the interface will be enabled if at least one of
        conf/{all,interface}/arp_filter is set to TRUE,
        it will be disabled otherwise

So you can try setting arp_filter to 1, and test again.

Best regards,
Stefano Babic

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

More information about the eldk mailing list