Computer Networks · Module 4 — Physical & Data Link Layer
Framing and error detection
Bits arrive as a continuous stream. There are no gaps and no punctuation. Without markers, the receiver has no idea whether the message was 500 bits or 5,000.
Sign in to track your score
The physical layer hands you 40,000 bits in a row. Where does one message stop and the next begin?
Why & what
Why framing exists. Bits arrive as a continuous stream. There are no gaps and no punctuation. Without markers, the receiver has no idea whether the message was 500 bits or 5,000.
So the sender wraps each chunk with markers that say "starts here" and "ends here". That wrapped chunk is a frame.
Why error detection exists. Signals get damaged. A bit sent as 1 can arrive as 0 — electrical noise, a weak radio signal, a bent cable. The receiver must be able to tell whether what arrived is what was sent. It cannot just hope.
How damage is spotted. Three methods, from weakest to strongest.
- Parity bit — one extra bit that makes the total number of 1s odd (or even). Cheap. Catches one flipped bit, but if two bits flip it cancels out and the error slips through.
- Checksum add up the bytes and send the total. The receiver adds them again and compares. Better, but two errors can still cancel each other.
- CRC (Cyclic Redundancy Check) — treat the data as a big number, divide it by a fixed number, send the remainder. The receiver repeats the division. Very strong, and cheap in hardware. This is what Ethernet uses, and it lives in that FCS trailer from Topic 3.4.
How it works
- The sender takes the packet handed down from the network layer.
- It adds header markers so the receiver knows where the frame starts.
- It runs the CRC calculation over the frame and puts the result in the FCS trailer at the end.
- The receiver reads the frame, runs the same calculation, and compares its answer with the FCS.
- If they match, the frame is passed up. If not, the frame is silently dropped.

Common confusion
Students think the data link layer fixes errors. Actually, it only detects them and throws the bad frame away.
Nobody at this layer asks for the frame again. There is no "please resend" message. The damaged frame just disappears. Noticing that something went missing and asking for it again is TCP's job, at the transport layer, in Module 6. Detection and recovery are two different layers doing two different jobs.
Interview angle
Asked as: "Difference between error detection and error correction?" or "Why does Ethernet use CRC?"
Model answer:
The data link layer adds a frame check sequence, normally a CRC, calculated over the whole frame. The receiver recalculates it and compares. If they differ, the frame is discarded. That is error detection, not correction — the layer never repairs the data and never requests a resend. Recovery is left to a higher layer, normally TCP, which notices a missing acknowledgement and retransmits. CRC is preferred over parity or a simple checksum because it catches burst errors, where several neighbouring bits are damaged at once, and it is very cheap to implement in hardware.
- 1.
What does Ethernet put in the FCS field?
- 2.
A frame arrives and the CRC check fails. What happens?
- 3.
The main weakness of a single parity bit is
- 4.
Framing exists because