3 Datalink Framing
3 Datalink Framing
3 Datalink Framing
Framing
Data Link Layer
Data link achieving reliable, efficient communication between two
adjacent machines.
Machines are connected by a communication channel that acts
conceptually like wire (coaxial cable, telephone line, or point-to-
point wireless channel)
Data Link Layer – design issues
Services Provided to the Network Layer
Framing
Error Control
Flow Control
Access Control
Data Link Layer – design issues
Services Provided to the Network Layer
(a) Virtual communication
(b) Actual communication
Fixed-Size Framing
Variable-Size Framing
Framing
A B C D
0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1
The trouble with this method is that the count can be garbled by a transmission error.
Parts of Frame
Frame Header − It contains the source and the destination addresses of the
frame.
Payload field − It contains the message to be delivered.
Trailer − It contains the error detection and error correction bits.
Flag − It marks the beginning and end of the frame.
Byte Stuffing ( character oriented protocol)
1 2 3 4 6 7 9 3 1 2 1
Flag 9 3 1 2 1 Flag
Byte Stuffing ( character oriented protocol)
Problem : FLAG byte is occur in data
Byte Stuffing ( character oriented protocol)
Byte Stuffing ( character oriented protocol)
Byte Stuffing ( character oriented protocol)
Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape
character in the text.
Byte Stuffing
Uses a special 8- bit pattern flag 01111110 as the delimiter to define the beginning of the
frame
Byte Stuffing
Bit Stuffing ( bit oriented protocol)
Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the
data, so that the receiver does not mistake the pattern 0111110 for a flag.
Bit Stuffing ( bit oriented protocol)
Bit Stuffing and unstuffing
Physical layer coding violations
It only applicable to network in which the encoding on the physical medium contains some redundancy
Example
LANs encode 1 bit of data by using 2 physical bits.
Normally ,a 1 bit is high-low pair and 0 bit is a low-high pair
Easy for the receiver to locate the bit boundaries
High-High and Low-Low are not used for data but are used for delimiting frames in some protocols
11.25