0% found this document useful (0 votes)
57 views4 pages

Chapter 5 Exercises

This document contains exercises about data link control protocols: - Byte-stuffing adds extra bytes to data to escape flag patterns, used in byte protocols. Bit-stuffing adds extra bits, used in bit protocols. - Flow control restricts sending data before acknowledgment, while error control detects and corrects errors. - Go-Back-N ARQ is more efficient than Stop-and-Wait ARQ since it allows sending multiple frames before receiving acknowledgments (pipelining). - In Selective-Repeat ARQ only missing/corrupted frames are resent, while in Go-Back-N ARQ all frames sent before the lost one are resent. Both use sliding windows but Selective-Repeat ARQ windows can

Uploaded by

arrganten
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views4 pages

Chapter 5 Exercises

This document contains exercises about data link control protocols: - Byte-stuffing adds extra bytes to data to escape flag patterns, used in byte protocols. Bit-stuffing adds extra bits, used in bit protocols. - Flow control restricts sending data before acknowledgment, while error control detects and corrects errors. - Go-Back-N ARQ is more efficient than Stop-and-Wait ARQ since it allows sending multiple frames before receiving acknowledgments (pipelining). - In Selective-Repeat ARQ only missing/corrupted frames are resent, while in Go-Back-N ARQ all frames sent before the lost one are resent. Both use sliding windows but Selective-Repeat ARQ windows can

Uploaded by

arrganten
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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:

You might also like