|
From: | David Empson |
Subject: | Re: [lwip-users] Ping target ip address with a packet data bigthan 1500 |
Date: | Fri, 23 Nov 2007 18:03:26 +1300 |
Some information which might help to explain what
is going on:
If you use the 'ping' command in Windows to send a
packet of any length up to 1472 bytes, it will send a single IP frame, which is
normally echoed back by the target computer in a single IP frame (assuming both
ends have an MTU of 1500). You can get a maximum length single frame ICMP echo
request and echo reply with:
ping 192.168.2.13 -l 1472
If you increase the length beyond this, it is no
longer possible to fit the ping into a single IP frame. The ICMP echo
request is fragmented into two frames at the IP layer, using the
offset field in the IP header. The first one is a full frame containing 1472
bytes of the ping data (plus 8 for the ICMP header and 20 for the IP header,
1500 in total) and a "more" flag. The second frames contains the remaining data
(28 bytes of ping data plus 20 byte IP header), with an offset in the
header.
With my LWIP port (based on LWIP 1.2.0), we
have set a shorter MTU, so if I send a maximum length ping from Windows (-l
1472), the reply comes back as two fragments. My port is also working fine
with longer pings. If I use -l 1500 then the PC sends two IP frames (a
fragmented ICMP packet) and I get two IP frames back (with different
distribution of data and lengths due to our lower MTU).
In order to get this working, we might have
had to modify some of the IP fragmentation code. A colleague of mine worked on
this part and I'm not familiar with the details.
----- Original Message -----
|
[Prev in Thread] | Current Thread | [Next in Thread] |