- Asked 3/11
- 2069 Chaitra · 8 marks
- 2072 Chaitra
- 2071 Shrawan · 5 marks
Data link layer framing
Short answer
Framing mechanisms include character count (prone to desynchronisation), byte stuffing with flag and ESC bytes, bit stuffing where a 0 follows five consecutive 1s inside 01111110 flags, and physical coding violations using invalid signal patterns.
Explain the different types of data link layer framing mechanisms (framing in detail).
Framing is the data link layer function of splitting the bit stream from the network layer into discrete units called frames, so the receiver can identify where each frame starts and ends and check it for errors. Each frame has a header, data and trailer.
1. Character (byte) count
A field in the header tells the number of characters in the frame.
| 5 | a b c d | 6 | e f g h i | 4 | j k l |
Problem: if the count is corrupted, the receiver loses synchronization and cannot find the next frame. Rarely used.
2. Flag bytes with byte stuffing
Each frame starts and ends with a special FLAG byte (for example 01111110). If the flag pattern (or escape byte) appears in the data, the sender inserts an ESC byte before it. The receiver removes the ESC.
FLAG | A FLAG B | FLAG --> FLAG | A ESC FLAG B | FLAG
Used in PPP. Weakness: tied to 8-bit characters.
3. Flag bits with bit stuffing
Each frame starts and ends with the flag 01111110. Whenever the sender sees five consecutive 1s in the data, it inserts a 0. The receiver deletes a 0 that follows five 1s. This allows frames of any bit length. Used in HDLC.
data : 0111111 0 1111110
stuffed : 01111101 0 11111010
4. Physical layer coding violations
Uses signal patterns not used for data, such as high-high or low-low in Manchester encoding, to mark frame boundaries. Used in LANs; wastes no bits, but only works where redundancy exists in the encoding.
| Method | Data unit | Issue |
|---|---|---|
| Character count | Bytes | Count error is fatal |
| Byte stuffing | Bytes | Overhead, fixed byte size |
| Bit stuffing | Bits | Small overhead, flexible |
| Coding violation | Signal | Needs special encoding |
In practice many protocols combine character count and another method for safety.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Functions of data link layer · Computer Networks and Security, chapter 3 · asked 3×
- Basic data transfer mechanisms in USB · Instrumentation II, chapter 3
- USB standards and data transfer mechanisms · Instrumentation II, chapter 3
- Flow control mechanisms in data communication · Telecommunications, chapter 8
- Bowditch balancing of link traverse XABCY · Surveying II, chapter 1 · asked 2×