Computer Network
Computer Network
Packet Packet
Solution:
• Character count
5 A B ESC FLAG
00000001 01000111 11100011 11100000 01111110
• FLAG Byte (with byte stuffing)
FLAG A B ESC ESC ESC FLAG FLAG
01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110
• Starting & ending flag( with bit stuffing)
FLAG A B ESC FLAG FLAG
01111110 01000111 11100011 11100000 01111110 01111110
01111110 01000111 101100011 111000000 011111010 01111110
2. Utilization of stop & wait flow control:
𝑇𝑓𝑟𝑎𝑚𝑒 𝑇𝑝𝑜𝑝.
𝑈= 𝑎=
2𝑇𝑝𝑜𝑝. + 𝑇𝑓𝑟𝑎𝑚𝑒 𝑇𝑓𝑟𝑎𝑚𝑒
1 𝑓𝑟𝑎𝑚𝑒 𝑠𝑖𝑧𝑒
𝑈= 𝑇𝑓𝑟𝑎𝑚𝑒 =
2𝑎 + 1 𝑏𝑖𝑡 𝑟𝑎𝑡𝑒
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒
𝑇𝑝𝑟𝑜𝑝. =
𝑠𝑝𝑒𝑒𝑑
• Utilization of problems:
Satellite link with propagation delay 270 ms & frame size is 4000 bits, Data rate is 56kps
calculate utilization?
Given Data:
Propagation delay = 270 ms
Frame size = 4000 bits
Data rate = 56 Kbps
Solution:
1 𝑇𝑝𝑜𝑝.
• 𝑈 = 2𝑎+1 • 𝑎=𝑇
𝑓𝑟𝑎𝑚𝑒
Sender Receiver
SWS RWS
• Stop & wait => SWS = RWS = 1 bit
• Go Back N => SWS (2n-1) , RWS (+1) = 2n => SWS =N , RWS =1
• Selective Repeater => SWS (23-1 = 7 = 8bit => SWS= N , RWS=M usually M=N
• Problem 1:
Suppose you are designing a sliding window protocol for 1Mbps P-to-P link to the stationary satellite revolving
a round the earth at an altitude of 3 x 104 km. Assuming that each frame carriers 1KB of data, What is min.
number of bit you need for the sequence number in the following cases? Assume speed of light 2 x 108m/s.
• RWS=1
• RWS=SWS
Given Data:
• Frame size = 1Kbyte
• Bandwidth of channel (bit rate) = 1Mbps
• Distance = 3 x104 km
• Speed = 3 x 108 m/s
Solution:
Given data:
• Capacity =1.54Mbps
• Distance = 3000 km
• Prop. Speed = 6 Msec / sec
• Frame size = 64 byte
Solution:
In order to get best utilization. We want to have large window size:
2 CI
W≥1+
F
• I= speed x distance
= 6 x 10-6 x 3000 = 1.8 msec