Role of the datalink layer
The Data Link Layer is responsible for:
- Framing
- Error handling
- Flow control
What is a frame
Its is the transmitted element in Data Link layer . A frame is regarded either as a block of bytes, or as a sequence of bits
Framing (to frame)
Framing extraction
The receiver must determine the first and last bit/byte of the frame so that the frames can then be extracted
Byte count
Data transparency problem
It may happen that the flag byte occurs in the data .
This would cause the protocol software to incorrectly assume that the frame was finished at that point
Solution to data transparency problem
insert a special escape byte (ESC) just before each ‘‘accidental’’ flag byte in the data. This is known as Byte stuffing
Redundant data
In the data link layer, redundant data refers to extra bits added to the data being transmitted to detect and correct errors. This helps to improve the reliability of the communication.
Error detection techniques
Flow control protocol
It controls the sending of transmission frames at a faster pace than they can be accepted e.g. Simple Stop and Wait Protocol
Stop and Wait protocol
Disadvantages of stop and wait protocol
Problems with stop and wait protocol
Timeout problem with Stop and wait protocol
Automatic Repeat ReQuest Protocols
3 types of Automatic Repeat Request Protocols
Stop and wait ARQ
piggy backing
Advantages of piggy backing
disadvantages of piggy backing
Go back N protocol
Selective Repeat ARQ Protocol
What if the frame is a block of bytes
What if the frame is a sequence of bits