Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Reliable data transfer

  1. Feb 24, 2015 #1
    Not sure if this is the right forum, but I'l give it a shot. This question regards reliable data transfer in the context of transport-layer protocols in communication networks.
    Let's say a sender sends a packet of information over a channel. The packet is corrupted, and the receiver replies with a negative acknowledgment (telling the sender that the packet wasn't properly transmitted).

    However, the acknowledgment is corrupted during transmission, so the sender doesn't realize that the packet he originally sent wasn't properly transmitted. He therefore proceeds to send the next packet, with a different sequence number.

    However, suppose the sequence number is corrupted during transmission. Then the receiver has no way of knowing whether the packet received is retransmission of the original packet, or transmission of the next packet.
    This raises an issue and I am rather confused on how protocols would deal with this. Is it even possible for the sequence number to be corrupted during transmission?

    Thanks!

    BiP
     
  2. jcsd
  3. Feb 24, 2015 #2

    berkeman

    User Avatar

    Staff: Mentor

    It depends on the protocol, but in general everything has a CRC as part of the packet, so it is very unlikely that a corrupted packet will be interpreted as anything. So the sending node knows that it never got an ACK for some packet it sent, and it has to retry that packet again. It will retry until it gets a positive ACK for that packet, or until the configured number of retries is exceeded.

    BTW, if the receiver receives a corrupted packet, it does not NACK, at least not in the protocols I'm familiar with. I suppose that in some point-to-point applications, the receiver could NACK in response to a CRC error. The times I've seen NACKs coming back from receivers is not for physical errors, but instead for logical errors in a packet that has a valid CRC. For example, if the receiver is told to write some memory that is write-protected, or out of range, etc.
     
  4. Feb 25, 2015 #3

    donpacino

    User Avatar
    Gold Member

    depending on the expected environment and how robust you need your system to be a few steps can be taken.

    You can have a hard interrupt line to signal an error.
    you can use ECCs
    you can put in logic that tracks the sequence number order, and flags an error if they come out of order.

    and finally you can use a better transmission system
     
  5. Mar 1, 2015 #4

    Svein

    User Avatar
    Science Advisor

    In modern networking, transport layer protocols do not even receive corrupted packets - they are deleted in the data link layer.
    The receiving end of the transport layer only acknowledges perfect packets, using the packet number. It is the responsibility of the transmitting end of transport layer to figure out whether or not to retransmit a packet.
    There are several timers involved in each end, since not only can data packets get lost, but so also can acknowledgements.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Reliable data transfer
Loading...