[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Why the delay after ARP?

From: FreeRTOS Info
Subject: Re: [lwip-users] Why the delay after ARP?
Date: Tue, 13 Oct 2009 09:15:17 +0100
User-agent: Thunderbird (Windows/20090812)

Simon Goldschmidt wrote:
I am using lwIP 1.3.0 and it works great, but I've always wondered where
there's an approx. three second delay after the ARP response before lwIP
sends the SYN.  In other words:

1. I initiate a TCP connection
2. lwIP sends an ARP request almost immediately
3. The host responds (relatively) immediately
4. lwIP waits about three seconds before sending the SYN

When the MAC is in the ARP cache, this doesn't happen, but still, what is
it doing during that time? Incidentally, I've noticed uIP does the same.

I guess the three seconds delay is a TCP timeout, i.e. TCP re-sends the SYN 
after three seconds. This is because the initial packet gets dumped because the 
target MAC is unknown.

In contrast to uIP, lwIP has a feature called ARP queueing: if a target MAC is 
unknown, packets are not thrown away but held back until the ARP response 
arrives. This must not beturned off via the corresponding define (ARP_QUEUEING, 
MEMP_NUM_ARP_QUEUE defines how many packets may be queued) in your lwipopts.h!


I've never been sure why it is done like that. I normally change it to store the MAC address or the ARP request origin as it comes in, then you can send the request out immediately.


+ http://www.FreeRTOS.org
Designed for Microcontrollers.  More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]