Reputation: 3227
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 ?
Upvotes: 14
Views: 19705
Reputation: 111
Firstly, retransmission of packets from end-to-end is an expensive task and potentially takes a lot of time. Having these checks at each link reduces the "length" that the retransmitted packet has to travel. Consider a case when there is an error-prone link on the end-to-end path. This link will probably cause many packet drops, being that it is unreliable. If there wasn't any link layer reliability, the retransmission could only be handled by the transport layer protocol. Therefore, the malformed packet would have to reach its destination, send a NACK (or equivalent), and only then could the retransmission take place. On the other hand, if link layer has reliability built in the packet would be retransmitted immediately only on the unreliable link.
Secondly, link layer reliability relies on bit checks only, while transport layer reliability also utilizes sequencing and acknowledgments. Consider a case where the segment passed to the network layer needs to be fragmented because the MTU is too small. Link layer reliability will only check for the integrity of each individual fragment. If one fragment is lost, link layer may not raise an alarm. On the other hand, transport layer will because it expects all the fragmented packets.
Finally, link layer is not only carrying TCP and other transport layer protocols within its payload. Therefore, it is befitting to have reliability built in for protocols which do not have reliability built-in so that malformed payloads don't go up the stack.
Upvotes: 0
Reputation: 1
In a noisy channel where the error rate is high, like wireless networks, the error correction is done at the datalink layer.
In robust networks where the error rate is low, like LANs, the error correction is done at the transport layer, so the retransmission cost is minimized.
Upvotes: -1
Reputation: 8052
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.
Upvotes: 7
Reputation: 41
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
Upvotes: 4
Reputation: 8726
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.
Upvotes: 1
Reputation: 9098
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.
http://conferences.sigcomm.org/sigcomm/2000/conf/paper/sigcomm2000-9-1.pdf
Upvotes: 0