Professional Documents
Culture Documents
Lect 10
Lect 10
Lecture-10
• The data link layer has a number of specific functions it can carry out.
These functions include
▪ The data link layer needs to pack bits into frames, so that
each frame is distinguishable from another. Our postal
system practices a type of framing. The simple act of
inserting a letter into an envelope separates one piece of
information from another; the envelope serves as the
delimiter.
Framing :
Breaking the bit stream into frames
1. Character count.
2. Flag bytes with byte stuffing.
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations.
Framing:
Character Count
Framing:
Character Count
• The trouble with this algorithm is that the count can be
changed by a transmission error.
• Each frame begins and ends with a special bit pattern, 01111110 (in fact,
a flag byte).
• Whenever the sender's data link layer encounters five consecutive 1s in
the data, it automatically stuffs a 0 bit into the outgoing bit stream. This
bit stuffing is analogous to byte stuffing, in which an escape byte is
stuffed into the outgoing character stream before a flag byte in the data.
A frame in a character-oriented protocol
Byte stuffing and un stuffing
host
layer control bus
▪ combination of hardware, n
datagra datagra
m m
controll controll
er er