Data Link Layer and Transport Layer

18,317

Solution 1

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.

Solution 2

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

http://books.google.ca/books?id=9c1FpB8qZ8UC&pg=PA216&lpg=PA216&dq=why+error+detection+and+correction+both+in+transport+and+link+layer+?&source=bl&ots=RI7-DU8RO0&sig=0U5Z9AmKkx3m3TA71WfIe1uTeW0&hl=en&sa=X&ei=LbqPUsahOtDEqQHyvIHQCw&ved=0CDUQ6AEwAQ#v=onepage&q=why%20error%20detection%20and%20correction%20both%20in%20transport%20and%20link%20layer%20%3F&f=false

Solution 3

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:
18,317

Related videos on Youtube

Utkarsh Srivastav
Author by

Utkarsh Srivastav

Updated on July 18, 2022

Comments

  • Utkarsh Srivastav
    Utkarsh Srivastav almost 2 years

    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 ?

  • matanc1
    matanc1 almost 10 years
    Can you elaborate on how that's possible? If every packet arrived error free how can the message as a whole contain errors?
  • wroniasty
    wroniasty almost 10 years
    @Shookie look at the edited answer for a possible scenario illustrating this
  • matanc1
    matanc1 almost 10 years
    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).
  • wroniasty
    wroniasty almost 10 years
    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.
  • Ron Maupin
    Ron Maupin over 7 years
    Very few data-link protocols do any error correction. Most do error detection, and they drop any frames which have errors, but they don't correct the errors.