views:

102

answers:

3

What could be good list of failure scenaros for testing a reliable udp layer? I have thought of the below cases: - Drop Data packets - Drop ACK, NAK Packets - Send packets in out of sequence. - Drop intial hand shaking packets - Drop close / shutdown packets - Duplicate packets

Please help in identifying other cases that reliable udp needs to handle?

Thanks, Sunil

+1  A: 

Have you tried intentionally corrupting packets in transit?

Also, have you considered a scenario where only one-way communication is possible? In this case, the sending host thinks that the send failed, but the receiving end successfully processes the message. For instance:

  1. host A sends a message to host B
  2. B successfully receives message and replies with ACK
  3. ACK gets dropped in the network
  4. A waits for timeout and re-sends message (repeats steps 1-3)
  5. host A exceeds retry count and thinks the send failed, but host B has in fact processed the message
intgr
A: 

I have thought UDP is a connectionless and unreliable protocol and that is does not require and specific transport handshake between hosts. And hence there is no such thing as a reliable UDP protocol.

tommieb75
Yes, UDP *is* an unreliable protocol, but you can make it "reliable" by implementing TCP-like acknowledgement on top of UDP -- just like TCP does on top of the unreliable IP layer."Reliable" doesn't mean "flawless"; it simply means you will be notified of failures.
intgr
Thanks intgr for the heads up...did not realize that can be done! Cheers! :)
tommieb75
.... but the actual "server layer" i.e. UDP is still connectionless and unreliable. If one implements a protocol ontop of UDP, then it is just that: ANOTHER protocol ontop of UDP.
jldupont
There is an emerging "stackoverflow for networking" site it seems: http://www.packetdrop.net/
jldupont
Cool! Thanks jldupont for the heads up on that - look forward to checking it out...! ;)
tommieb75
+2  A: 

The list you've given sounds pretty good. Also think about:

  • Very delayed packets (where most packets come through fine, but one or two are delayed by several minutes);
  • Very delayed duplicates (where the original came through quickly, but the duplicate arrived after several minutes delay);
  • Silent dropping of all packets above a certain size (both unidirectional and bidirectional cases);
  • Highly variable delays;
  • Sequence number wrapping tests.
caf