I am trying to find out what the difference between packet loss and packet duplication problems is. Does anyone know what 'packet duplication' is all about? Is it the same as re-transmitting packets when a loss is detected in TCP?
No. In TCP
delivery of "packets" is reliable(I think the term data should be better in this case, since it's a stream oriented protocol).
Packet loss and duplication are problem related to unreliable protocols datagram oriented like UDP
. In UDP when you send a datagram this could arrive duplicated, out of order or even don't arrive at all.
Is it the same as re-transmitting packets when a loss is detected in TCP?
Yes and no. Let's say that TCP uses internally an ack mechanism to detect missing data, and automatically retrasmit them. So the missing data are trasparent to the user, and handled by the protocol itself.
Does anyone know what 'packet duplication' is all about?
In certain situations could happen that IP
packets are duplicate along the path to their destination. For example a router could decide to forward incoming traffic thorugh 2 different network interfaces. In this case could happen that both IP packets will reach the destination.
TCP
handle duplicated IP
packets problem, so you don't care about them.
UDP
doesn't handle them. When you receive a datagram it's not guaranteed that you didn't have received the same datagram before. You should check it.