Archived

This topic is now archived and is closed to further replies.

Snakebite

UDP wrong order

Recommended Posts

Ramsess    100
Yes, It''s real happen. UDP sent without acception. If exist more than 1 way to destination host, router automaticaly balance channels and sends to diferent ways, as result later-sent packets read early.
This happen btw. 2 local networks if "bridge channel" btw. them overloaded. It depend of buffer usage algoritms for router.

Don''t use UDP for WAN, UDP good well only to local network.

Share this post


Link to post
Share on other sites
Waverider    169
In theory, they could arrive out of order, not at all, and in rare cases more than once! To be safe, I would code to handle all those circumstances if you plan to use any protocol, even on a LAN.

I've been told there are some cases as well where the packet ends up garbled. Again, very rare, but possible.


[edited by - Waverider on September 30, 2002 4:11:35 PM]

Share this post


Link to post
Share on other sites
JuNC    236
It''s quite common for packets to be duplicated (in my limited experience anyway). I''m pretty sure UDP checksums packets so it guarantees packets are either error free or discarded.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
UDP packets aren''t duplicated. UDP doesn''t have reliability control and therefore never send a duplicate packet. And packets are not duplicated at routers.

Share this post


Link to post
Share on other sites
fingh    142
"And packets are not duplicated at routers. "
This is what multicast is for... and that''s exactly what it does, albeit not duplicated to the same destination.

UDP over the internet, you WILL lose packets, and you will get some packets out of order. The amount of packet loss will depend on the amount of congestion along your route to the source/destination.

Yes, a UDP packet is guaranteed to be delivered in-tact, error-free, IF it arrives at all.

Share this post


Link to post
Share on other sites
Anon Mike    1098
I personally have sent out 10 packets and seen them arrive at their destination in reverse order.

Packets are dropped all the time.

The UDP checksum is not 100% reliable. Routers have been known to fiddle with packets, corrupt some data because of a bug, and re-checksum the now corrupted data. If lives or money depend on your data use your own checksum as well.

I''ve seen duplicate packets when using a high-level protocol that could ride on top of different lower level protocols. The system would send the data on each of the lower level protocols.

This is the first time I''ve ever seen anybody claim you could get merged UDP packets. I''d like to see proof. There''s a ton of code out there that would break if this was true.

Sorry, I don''t have any actual statistics.

-Mike

Share this post


Link to post
Share on other sites
fnagaton    122
What kind of proof would you like?
I had to add in code to deal with merged UDP packets when I was running a packet dump. I found, much to my amazement, that two of my UDP packets had been merged.
I can show you the packet hexdumps if you like?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
You could get merged packets, if as someone said above the routers (or the subsystems on the sending computer) had a bug causing them to write out invalid headers so that the length and possibly fragment data became corrupted. However i would see this as a very very rare and unfortunate occurence.
And as for getting duplicate packets when using higher level protocols, thats the higher level protocols sending duplicate packets...not UDP sending duplicate packets

Share this post


Link to post
Share on other sites
flipstar    122
I do not believe that RFC specifications allows for "merged" UDP packets.

Your drivers or networking hardware are probably non-RFC compliant. Having code to handle "merged" UDP packets is ridiculous IMHO.

In ANY circumstances, UDP will never be merged. Its datagram based, not stream based.

______________________________________________
(MSG_POST_DONE) ? InsertWittySignature() : ContinuePosting()

http://www.geocities.com/codeman_net/

Share this post


Link to post
Share on other sites