Practice Questions: Congestion Control and Queuing
description
Transcript of Practice Questions: Congestion Control and Queuing
![Page 1: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/1.jpg)
Practice Questions:Congestion Control and Queuing
COS 461: Computer Networks
http://www.cs.princeton.edu/courses/archive/spr14/cos461/
![Page 2: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/2.jpg)
Today’s Plan
• Fork() example• Wireshark practice• TCP Review Questions
![Page 3: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/3.jpg)
Handle Multiple Clients using fork()• Steps to handle multiple clients– Go to a loop and accept connections using accept()
– After a connection is established, call fork() to create a new child process to handle it
– Go back to listen for another socket in the parent process
– close() when you are done
3
![Page 4: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/4.jpg)
while (1) { fd = accept (srv_fd, (struct sockaddr *) &caddr, &clen); ... pid = fork(); children++; /* child process to handle request */ if (pid == 0) { /* exit(0) on success, exit(1) on error */ } /* parent process */ else if (pid > 0) { while ((waitpid(-1, &status, WNOHANG)) > 0) children--; if (children > MAX_PROCESSES) ... } else { perror("ERROR on fork"); exit(1);}}
4
![Page 5: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/5.jpg)
Wireshark
• Selecting and listening on interface– Root for promiscuous mode: sniff on neighbors!
• Writing filters to select packets– “udp.dstport == 53”, “http.request_method is present”
• Examining packet formats– Look at Ethernet, IP, TCP, HTTP headers
• Following TCP streams– Trace HTTP request(s) belonging to a TCP connection
5
![Page 6: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/6.jpg)
One node on an Ethernet network uses TCP to send data to another node on the same network. If there are no other nodes transmitting on the network, can there be any collisions?
A. YesB. No
![Page 7: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/7.jpg)
One node on an Ethernet network uses TCP to send data to another node on the same network. If there are no other nodes transmitting on the network, can there be any collisions?
A. Yes – Can collide with TCP ACKsB. No
![Page 8: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/8.jpg)
Ben Bitdiddle’s home network connection can upload at 125,000 bytes/second. His router has a 100,000 byte first in first out buffer for packets awaiting transmission.
If the buffer is completely full, how long will it take for the buffer to clear?A. 0.4 secondsB. 0.6 secondsC. 0.8 secondsD. 1 secondE. 1.25 seconds
![Page 9: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/9.jpg)
Ben Bitdiddle’s home network connection can upload at 125,000 bytes/second. His router has a 100,000 byte first in first out buffer for packets awaiting transmission.
If the buffer is completely full, how long will it take for the buffer to clear?A. 0.4 secondsB. 0.6 secondsC. 0.8 secondsD. 1 secondE. 1.25 seconds
![Page 10: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/10.jpg)
Ben Bitdiddle’s home network connection can upload at 125,000 bytes/second. His router has a 100,000 byte first in first out buffer for packets awaiting transmission.
At time 0, Ben’s client starts sending 1,000 byte packets at 150 packets/s. When will the first packet be dropped by the router?
A. 2 secondsB. 3 secondsC. 4 secondsD. Buffer will never discard a packet in this case
![Page 11: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/11.jpg)
Ben Bitdiddle’s home network connection can upload at 125,000 bytes/second. His router has a 100,000 byte first in first out buffer for packets awaiting transmission.
At time 0, Ben’s client starts sending 1,000 byte packets at 150 packets/s. When will the first packet be dropped by the router?
A. 2 secondsB. 3 secondsC. 4 secondsD. Buffer will never discard a packet in this case
![Page 12: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/12.jpg)
Alyssa P. Hacker and Ben Bitdiddle communicate over a link with capacity of 100 pkts / sec. The latency (RTT) on this link is 100 ms.
If a sliding window protocol with acknowledgement packets is used, and there is a FIXED window size of 4 packets, what is the maximum rate of traffic on the link?
A. 20 pkts / sB. 40 pkts / sC. 80 pkts / sD. 100 pkts /s
![Page 13: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/13.jpg)
Alyssa P. Hacker and Ben Bitdiddle communicate over a link with capacity of 100 pkts / sec. The latency (RTT) on this link is 100 ms.
If a sliding window protocol with acknowledgement packets is used, and there is a FIXED window size of 4 packets, what is the maximum rate of traffic on the link?
A. 20 pkts / sB. 40 pkts / sC. 80 pkts / sD. 100 pkts /s
![Page 14: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/14.jpg)
14
1. Name the event at B which occurs that causes the sender to decrease its window
(a)Triple Duplicate Ack (b)Slow Start(c)Packet loss(d)Time out
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 15: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/15.jpg)
15
1. Name the event at B which occurs that causes the sender to decrease its window
(a)Triple Duplicate Ack (b)Slow Start(c)Packet loss(d)Time out
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 16: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/16.jpg)
16
2. Does the event at B necessitate that the network discarded a packet ?
(a)Yes(b)No(c)Don’t know
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 17: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/17.jpg)
17
2. Does the event at B necessitate that the network discarded a packet ?
(a)Yes(b)No(c)Don’t know
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
No. It could be due to either reordering or queuing or asymmetric paths.
![Page 18: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/18.jpg)
18
3. Name the event at D which occurs that causes the sender to decrease its window.
(a)Triple Duplicate Ack (b)Slow Start(c)Packet loss(d)Time out
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 19: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/19.jpg)
19
3. Name the event at D which occurs that causes the sender to decrease its window.
(a)Triple Duplicate Ack (b)Slow Start(c)Packet loss(d)Time out
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 20: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/20.jpg)
20
4. Does the event at D necessitate that the network discarded a packet
(a)Yes(b)No(c)Don’t know
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 21: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/21.jpg)
21
4. Does the event at D necessitate that the network discarded a packet
(a)Yes(b)No(c)Don’t know
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
No. Congestion in either direction could cause RTT > RTO (retrans. timeout).
![Page 22: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/22.jpg)
22
5. For a lightly-loaded network, is the event at D MORE likely or LESS likely to occur when the sender has multiple TCP segments outstanding
(a)MORE (b)LESS (c)ALMOST SAME
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 23: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/23.jpg)
23
5. For a lightly-loaded network, is the event at D MORE likely or LESS likely to occur when the sender has multiple TCP segments outstanding
(a)MORE (b)LESS (c)ALMOST SAME
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 24: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/24.jpg)
24
6. Consider the curved slope labeled by point A. Why does the TCP window behave in such a manner, rather than have a linear slope? (Put another way, why would it be bad if region A had a linear slope?)
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 25: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/25.jpg)
25
6. Consider the curved slope labeled by point A. Why does the TCP window behave in such a manner, rather than have a linear slope? (Put another way, why would it be bad if region A had a linear slope?)
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
This “slow-start” period quickly discovers the maximum acceptable throughput that the path supports – otherwise, AI (additive increase) could take too long (each a full RTT).
![Page 26: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/26.jpg)
26
Assume that the network has an MSS of 1000 bytes and the round-trip-time between sender and receiver of 100 milliseconds.
Assume at time 0 the sender attempts to open the connection.
Also assume that the sender can “write” a full window’s worth of data instantaneously, so the only latency you need to worry about is the actual propagation delay of the network.
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 27: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/27.jpg)
27
RTT = 100ms, MSS = 1000 bytes7. How much time has progressed by point B ?
(a)200ms(b)300ms(c)400ms(d)600ms(e)700ms
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 28: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/28.jpg)
28
RTT = 100ms, MSS = 1000 bytes7. How much time has progressed by point B ?
(a)200ms(b)300ms(c)400ms(d)600ms(e)700ms
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 29: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/29.jpg)
29
RTT = 100ms, MSS = 1000 bytes8. How much time has progressed between points C and D?
(a)800ms(b)1000ms(c)1200ms(d)1400ms
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 30: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/30.jpg)
30
RTT = 100ms, MSS = 1000 bytes8. How much time has progressed between points C and D?
(a)800ms(b)1000ms(c)1200ms(d)1400ms
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 31: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/31.jpg)
31
RTT = 100ms, MSS = 1000 bytes9. How much time has progressed between points E and F?
(a)400ms(b)600ms(c)800ms(d)900ms
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 32: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/32.jpg)
32
RTT = 100ms, MSS = 1000 bytes9. How much time has progressed between points E and F?
(a)400ms(b)600ms(c)800ms(d)900ms
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 33: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/33.jpg)
33
10. If the sender shares its network with other clients whose traffic traverses the same IP routers, give one explanation for why point D is higher than point B?
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
![Page 34: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/34.jpg)
34
10. If the sender shares its network with other clients whose traffic traverses the same IP routers, give one explanation for why point D is higher than point B?
TCP CONGESTION CONTROLTCP CONGESTION CONTROL
Changing cross-traffic by other concurrent senders across same routers.
![Page 35: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/35.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F
35
![Page 36: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/36.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F
36
![Page 37: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/37.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F2 In steady state, a sender increases its window size by one packet for each acknowledgement
T/F
37
![Page 38: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/38.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F2 In steady state, a sender increases its window size by one packet for each acknowledgement
T/F – increases by one MSS for every RTT
38
![Page 39: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/39.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F2 In steady state, a sender increases its window size by one packet for each acknowledgement
T/F – increases by one MSS for every RTT3 A sender that underestimates the round-trip time of a connection may unnecessarily induce a TCP timeout
T/F
39
![Page 40: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/40.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F2 In steady state, a sender increases its window size by one packet for each acknowledgement
T/F – increases by one MSS for every RTT3 A sender that underestimates the round-trip time of a connection may unnecessarily induce a TCP timeout
T/F
40
![Page 41: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/41.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F2 In steady state, a sender increases its window size by one packet for each acknowledgement
T/F – increases by one MSS for every RTT3 A sender that underestimates the round-trip time of a connection may unnecessarily induce a TCP timeout
T/F4 After detecting packet loss through a timeout, TCP halves its window size as a response to the path congestion
T/F41
![Page 42: Practice Questions: Congestion Control and Queuing](https://reader033.fdocuments.in/reader033/viewer/2022061509/56815911550346895dc63e7a/html5/thumbnails/42.jpg)
1 In slow start, a sender doubles its window size every RTT if all sent packets were acknowledged
T/F2 In steady state, a sender increases its window size by one packet for each acknowledgement
T/F – increases by one MSS for every RTT3 A sender that underestimates the round-trip time of a connection may unnecessarily induce a TCP timeout
T/F4 After detecting packet loss through a timeout, TCP halves its window size as a response to the path congestion
T/F – TCP resets its window size to one MSS42