

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

What is the need of error control at data link layer when Transport layer provides error control ? What is the difference between the two error controls ?

share|improve this question

Transport layer data could be broken down to many data-link layer frames/packets.

So it is possible that even without any data-link errors the transport layer stream/packet may be corrupt. Edit: This is because a transport layer path is usually composed of many data-link layer hops, for example:

Host1 <----> switch1 <----> switch2 <----> Host2

if a packet was lost between switch1 and switch2 then there would be no errors recorded on the switch2 Host2 link, but the corresponding transport layer stream would be corrupted.

On the other hand - once a data-link error is encountered it's possible to drop/restart the transport-layer transmission, without wasting resources.

share|improve this answer
Can you elaborate on how that's possible? If every packet arrived error free how can the message as a whole contain errors? – Shookie May 5 '14 at 16:59
@Shookie look at the edited answer for a possible scenario illustrating this – wroniasty May 5 '14 at 21:00
Thanks! But the example you gave has to do with losing a packet. I thought you were implying that all the packets could reach their destination and still be corrupt (after going through the data-link layer). – Shookie May 6 '14 at 10:05
What I meant was - the transport layer data can be corrupt, event when no data-link errors are observed. Therefore the error controls on both layers are useful. – wroniasty May 6 '14 at 11:26

This is because Data link layer deals exclusively with bit-level error correction. It takes a packet the receiving computer already has in its possession and determines if an error occurred in transmission and whether the data is intact or corrupt. However, there need to be additional controls in place to make sure the system knows that all the packets are arriving. This is called end to end error control and is the responsibility of transport layer. Transport layer couldn't care less whether the data in the payload is good or bad. That's Data link's job. Transport only cares if it is getting every packet that it is supposed to, and whether or not there are arriving in the right order. It is the transport layer that detects the absence of packets or the corruption of packets that occurred on the transmission end before they arrived at the Data link layer.

For additional details, refer to

share|improve this answer

It really depends on the protocols rather than the layer, but assuming you mean TCP...

TCP's error detection is minimal and designed more as an integrity check than any kind of reliable error detection. The reason you don't see this is practice is that data-link layers such as Ethernet, PPP, FrameRelay, etc. have much, much more robust error detection algorithms and so there are virtually no transmission errors for the TCP protocol to detect.

If you had a different transport layer protocol with robust error detection then you wouldn't strictly need it at lower levels. There is benefit, largely performance and resource use related, to discarding errors as low in the stack as possible.

Note that errors can creep in above the transport layer due to ram glitches, etc, so if data is really, really important then you should include error checking right in your application.

share|improve this answer

Assuming the checksum was correct this result meant that the data was damaged in transit. Furthermore, the damage took place not on the transmission links (where it would be caught by the CRC) but rather must have occurred in one of the intermediate systems (routers and bridges) or the sending or receiving hosts.

share|improve this answer

Your Answer


