Data Link Control
exercises
1. Compare and contrast byte-stuffing and bit-stuffing. Which
technique is used in byte-oriented protocols? Which technique
is used in bit-oriented protocols?
Ans:
Character-oriented protocols use byte-stuffing to be able to
carry an 8-bit pattern that is the same as the flag. Byte-stuffing
adds an extra character to the data section of the frame to
escape the flag-like pattern. Bit-oriented protocols use bit-
stuffing to be able to carry patterns similar to the flag. Bit-
stuffing adds an extra bit to the data section of the frame
whenever a sequence of bits is similar to the flag.
2. Compare and contrast flow control and error control
Ans:
Flow control refers to a set of procedures used to restrict the
amount of data that the sender can send before waiting for
acknowledgment. Error control refers to a set of procedures
used to detect and correct errors.
3. Explain the reason for moving from the Stop-and-Wait ARQ
Protocol to the Go Back-N ARQ Protocol.
Ans:
Go-Back-N ARQ is more efficient than Stop-and-Wait
ARQ. The second uses pipelining, the first does not. In the
first, we need to wait for an acknowledgment for each frame
before sending the next one. In the second we can send several
frames before receiving an acknowledgment.
4. Compare and contrast the Go-Back-NARQ Protocol with
Selective-Repeat ARQ.
Ans:
In the Go-Back-N ARQ Protocol, we can send several frames
before receiving acknowledgments. If a frame is lost or
damaged, all outstanding frames sent before that frame are
resent. In the Selective- Repeat ARQ protocol we avoid
unnecessary transmission by sending only the frames that are
corrupted or missing. Both Go-Back-N and Selective-Repeat
Protocols use sliding windows. In Go-Back-N ARQ, if m is the
number of bits for the sequence number, then the size of the
send window must be at most 𝟐𝒎 −1; the size of the receiver
window is always 1. In Selective-Repeat ARQ, the size of the
sender and receiver window must be at most 𝟐𝒎−𝟏 .
5. Byte-stuff the data in Figure 1
Ans:
6. Bit-stuff the data in Figure 2
Ans:
7. Using 5-bit sequence numbers, what is the maximum size of the
send and receive windows for each of the following protocols?
a. Stop-and-Wait ARQ
b. Go-Back-NARQ
c. Selective-Repeat ARQ
Ans:
a. Stop-And-Wait ARQ send window = 1 receive window = 1
b. Go-Back-N ARQ send window = 25 −1 = 31 receive window = 1
c. Selective-Repeat ARQ send window = 25−1 = 16 receive window = 16
8. The timer of a system using the Stop-and-Wait ARQ Protocol
has a time-out of 6 ms.
Draw the flow diagram for four frames if the round trip delay
is 4 ms. Assume no data frame or control frame is lost or
damaged.
Ans:
9. Repeat Exercise 8 if the time-out is 4 ms and the round trip
delay is 6.
Ans:
10. Repeat Exercise 8 if the first frame (frame 0) is lost.
Ans: