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 -----
From: [EMAIL PROTECTED]
To: Mailing list for lwIP users
Sent: Friday, November 23, 2007 4:27 PM
Subject: Re:RE : [lwip-users] Ping target ip address with a packet data
bigthan 1500
4)、When I ping target with a 1500-data packet, lwip then dies and doesn't
work anymore.
my target board just set up a netif with ip adress 192.168.2.13, then,PC ping
target board with command:
ping 192.168.2.13 -l 1400
(etc.)
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users