Error Checking OSI Model.
Question, so layer 2 handles error detection and error correction. But so does layer 4 correct? Can someone elaborate?
Comments
-
SharkDiver Member Posts: 844I think this is what you are looking for.
From Wikipedia:
EthernetSince bit errors are very rare in wired networks, Ethernet does not provide flow control or automatic repeat request (ARQ), meaning that incorrect packets are detected but only cancelled, not retransmitted (except in case of collisions detected by the CSMA/CD MAC layer protocol). Instead, retransmissions rely on higher layer protocols.
So, Layer 2 will detect the error and cancel it, but Layer 4 TCP will request retransmission when it notices a segment is missing (using sequencing). -
quinnyfly Member Posts: 243 ■■■□□□□□□□Layer 4 is the one that guarantees the reliable delivery of data, error detection and correction take place here. TCP and UDP operate at layer 4, TCP request a packet be resent if it is corrupt (checksum different) or has parts missing. (error detection). It then has the transmittting device resend packets (error correction).
Layer 2 on the otherhand is the part that prepares the packets for transmission over the media before it is handed down to the physical layer, here a packet becomes a frame. If the receiving device is getting too much data sent at once, it will tell the transmitting device to slow down (flow control). The LLC (Logical Link Control) part of layer 2 tells the recieving device what protocols will be used and controls the flow of data, if data is being transmitted too fast, it will slow the flow and re-synchronise with the receiving device (error detection and flow control).
Sorry that's my effort straight out of bed...I'll post my table on the OSI for you.
OSI Model.pdfThe Wings of Technology -
MrXpert Member Posts: 586 ■■■□□□□□□□Layer 4 the Transport layer does allow for error recovery if TCP is used because TCP is a reliable protocol which uses Sequence and ACK bits. If a packet is sent with sequence number 10 then the receiver is expected to send back an ACK#11 indicating the next seq in the series. The sender uses something called Positive Ack With Retransmission to keep track of all this. If the sender does not receive this ACK in a particular time frame he then retransmits the packet.
Layer 2 uses a checksum known as Frame Check Sequence(FCS). The FCS is a 4 byte value and it is purely used for error checking not correction.For example when the data is sent the sender calculates the FCS to be equal to 1000. The receiver when he gets this packet will also expect the FCS to still = 1000. If it doesnt then he knows an error occured during transit.
You may find that checksums exist even on other layers such as the network layer but it is only layer 4 TCP that does proper error recovery.I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.