Flow and Error Control at Transport layer

Sridhar Gopinath picture Sridhar Gopinath · Jan 4, 2015 · Viewed 8k times · Source

As I understand, Flow Control as well as Error Control is employed both at Transport and Data link layer. If data link guarantees the error-free delivery of the packets, then what kind of errors are caught by the Transport layer?

Also, what kind of errors may happen in UDP which are handled in TCP?

Answer

Dodu picture Dodu · Jan 4, 2015

The Data Link Layer checks for errors when a packet moves from one machine to the next. By machine I mean a router, a packet switch or an end host(computer, phone, tablet) itself. Whereas, the transport layer only checks for errors between the end hosts.

Error checking is provided in the transport layer mainly because of the following two reasons:

  1. Even if no errors are introduced when a segment is moving over a link, it's possible for errors to be introduced when a segment is stored in a router's memory(for queuing). The data link layer's error checking fails in this scenario.

  2. There is no guarantee that all the links between source and destination provide error checking. One of the links may be using a link layer protocol which doesn't provide error checking.

As to your second question, UDP also checks for errors. It doesn't usually do anything about them, though. Sometimes, it delivers the data to the application layer and informs it that the data is corrupt. Other times it simply discards the packet.