Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Data Link Layer

Numerical Questions

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.
Solution- Frame Format: A B ESC FLAG

a. in Byte count method the number of bytes in a frame is mentioned in the beginning of a
frame

Format=00000100 01000111 11100011 11100000 01111110

the first Byte has binary value=4 which indicates that next 4 bytes are part of current frame

b. Flag Byte will be inserted at the beginning and end of frame. also escape byte will be inserted
before escape and flag bytes occurring in the data part of the frame

Format=FLAG A B ESC ESC ESC FLAG FLAG

=01111110 01000111 11100011 11100000 11100000 11100000 11100000 01111110


01111110

c. flag bytes are inserted at the beginning and of frame along with bit stuffing

01111110 01000111 11100011 11100000 011111010 01111110


2. Frames of 10000 bits are sent over a 1-Mbps channel using a geostationary satellite whose
propagation time from the earth is 270 msec. Acknowledgements are always piggybacked
onto data frames. The headers are very short. Three-bit sequence numbers are used. What
is the maximum achievable channel utilization for
a) Stop-and-wait.
b) Protocol 5.
c) Protocol 6.

Solution-

3. If bit rate is 10kbps, propagation delay is 40ms then for what frame size does stop-n- wait
protocol give efficiency of 50%?
Hint: Link Utilization= 1/1+2*a where a=Tp/Tt

Solution-
4. Two stations, A & B connected via point-to-point link and exchange frames using go-back-
n sliding window protocol with window size 7. Sequence number is of 3 bits. Station A
sends frame 0 to 6. B receives them in order but frame 4 was damaged. So what will be the
buffer frames in the current window of A?
Answer- 4,5,6,7,0,1,2

5. A 3000-km-long T1 trunk is used to transmit 64-byte frames using protocol 5. If the


propagation speed is 6 μsec/km, how many bits should the sequence numbers be? Assume
the bandwidth of T1 is 1.536 Mbps.

Solution

You might also like