M2 CCN Data Link Layer
M2 CCN Data Link Layer
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receiver’s memory after destuffing.
1. The following character encoding is used in a data link protocol:
A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000
Show the bit sequence transmitted (in binary) for the four-character
frame: A B ESC FLAG when each of the following framing methods
are used:
a. Character count.
b. Flag bytes with byte stuffing.
c. Starting and ending flag bytes, with bit stuffing.
2. The following data fragment occurs in the middle of a data stream for
which the byte-stuffing algorithm is used: A B ESC C ESC FLAG FLAG D.
What is the output after stuffing?
• Error-Correcting Codes
• Error-Detecting Codes
Error-Correcting Codes
.
Elementary Data Link Protocols
• An Unrestricted Simplex Protocol
• A Simplex Stop-and-Wait Protocol
• A Simplex Protocol for a Noisy Channel
An Unrestricted Simplex Protocol
protocol 1(utopia)
frames
• sender Receiver
sender receiver
acknowledgement
The receiver has only a finite buffer capacity and a finite processing speed
The protocol prevents the sender from flooding the receiver with data faster
than it can be handled
A Simplex Protocol for a Noisy Channel
Protocol 3 (par)
Frame with seq. no
sender receiver
acknowledgement
Sends frame with expects seq. no
One bit seq. no 0,1,0,1
0,1,0,1 (alternatively 0,1)
sender receiver
Frame / ack
Piggybacking:
Frame with ack.
sender receiver
Frame with ack
Sliding Window Protocols (2)