Search code examples
network-programminglocal-network

Error handling on local network LAN


Why, in the case of local networks, they judged that it is not necessary to systematically have a transmission protocol in DATA link layer to repeat the transmission of lost frames? And how are errors solved in this case?


Solution

  • Retransmission of data is left to the upper-layer protocols or applications, and not all of them do that. That leaves it up to the application to decide if it really needs all the data. There are multiple reasons:

    • Once upon a time, back when network protocols were being developed, the physical layer was often far less reliable than it is today, and retransmission could have used all the resources of a link.
    • Layer-2 protocols are mostly developed by the IEEE, independently of any other organization, but the upper level protocols are mostly developed by the IETF, two completely separate standards bodies. Even the IETF standards leave reliability to higher layers. For instance UDP, an unreliable transport protocols, was developed before TCP, a reliable transport protocol. It was thought that applications could handle reliability, but a reliable transport protocol was added later as a standard.
    • Most of the time it is better if garbled data are dropped sooner in the path, letting the reliable protocol or application miss them and ask for any missing data sooner.
    • Not all applications require dropped data to be retransmitted, and some applications, e.g. real-time applications, can suffer due to retransmission, which would cause out-of-order data delivery. Imagine if you are on a phone call (VoIP), and the dropped data were received after data already delivered. That would garble your call. Unreliable protocols deliver data faster than reliable protocols, and that may be the overriding factor for an application. Why force retransmitted data and out-of-order data delivery on applications? If an application needs that service, it can use a transport protocol which provides that, or it can handle that on its own.

    Errors in the Data-Link layer are considered corrupt frames and simply dropped, rather than waste processing power and bandwidth for possibly unnecessary retransmission.