COMPUTER NETWORKS (MCA) – QUIZ 3

October 15, 2013


  1. Which transport protocol will you use for developing an application which is based on wireless networks such as 802.11?

    (Ans: Since 802.11 is an unreliable medium, the preferred transport layer protocol is TCP unless the application itself does not require reliability.)

  2. What is the demultiplexing field in UDP or TCP?

    (Ans: Destination Port)

  3. If the path from the source to the destination has the following MTUs on the links of the path – 1500, 1500, 3100, 576, 1500, 3100 – what is the size of the MSS in TCP?

    (Ans: Path MTU is the minimum MTU of the path – 576. MSS is 576-40 = 536.)

  4. If the window advertised by the receiver is 16MSS and there is a retransmission timeout that occurs when data transmitted is 14MSS, what does TCP assume this to mean?

    (Ans: TCP assumes that this is due to congestion)

  5. An application uses UDP to send 7000 bytes of data in a single message on a path with MTU = 1500 and there is an error in one of the datagrams transmitted. The application is a reliable application and so retransmits the 7000B again. How much more data is transmitted by this application as compared to it using TCP as the transport protocol?

    (Ans: UDP transmits 14000B – since this will be split into segments of 1460 and there will be five segments and only one is lost, TCP transmits 8460B – i.e., 5540B more data is transmitted by UDP)

  6. A user logs into a remote system using SSH and then goes off to lunch. He is unable to come over to the lab due to heavy rain for 4hrs. What will happen to the SSH session?

    (Ans: The keepalive timer kicks in couple of times and a probe packet is sent and an ack received. So, the connection stays alive.)

  7. A student uses the AI lab client system to connect to the home page of a teacher in SCIS. Then, because of a problem in the power and since there is no UPS backup, the system shuts down abruptly. What happens to the HTTP connection the student has set up to the server?

    (Ans: This leads to a half-close connection with the server still retaining the connection.)

  8. What is the problem with estimating RTT when a segment is retransmitted?

    (Ans: There is no way to decide whether the ack. received is to the first or second transmission. In one case we have an unnecessarily long timeout interval keeping the line idle and in the other we have a shorter time interval than the real one. This leads to too many retransmissions and so adds to the congestion.)

  9. When a retransmission timeout occurs, what does Karn's algorithm propose that TCP should do?

    (Ans: Karn's algorithm states that no RTT estimate should be made with this sample. Instead, the timeout should be exponentially backed off and a retransmission made.)

  10. What is the purpose of the URG bit in TCP?

    (Ans: URG is set to indicate that the segment carries out-of-order data.)

  11. What is the purpose of the PSH bit in TCP?

    (Ans: PSH bit is set to indicate that there should be no buffering for the data in question. Typically used by interactive applications.)

  12. The segments of data sent in a new connection have 100B, 200B, 300B, 200B and 100B. The acknowledgments received are 101, 101, 601, 601 and 901 without a retransmission timeout. What is the order in which the datagrams have been received?

    (Ans: The first segment should return an ack of 101 since it is the next expected in-sequence byte. When it is received again, it means that the second segment has not reached but some other segment has reached the receiver. You cannot tell which segment yet. When the next segment's ack comes and it is 601, you know that 600B have been received in sequence. This means that the second and third segments have been received and so on. )

  13. What does the Nagle algorithm state that the receiver should do when the window size becomes zero?

    (Ans: The receiver should wait until either half the receive-buffer is free or 1MSS is free.)

  14. The user application gives the following data to TCP with each data coming after 10ms gap: 10B, 20B, 50B, 100B, 250B. The RTT is 100ms. How many segments are sent out by TCP if MSS = 1460B? What about if RTT = 20ms?

    (Ans: Using Nagle algorithm, after the first segment is sent, we wait until the ack. comes back before sending the data. Since RTT is 100ms and all other data is given by the application in this time, it sends one single segment as it is not yet 1MSS. Answer similarly for 20ms RTT.)

  15. Why does TCP header have a header length field whereas UDP does not?

    (Ans: Because TCP has options unlike UDP.)

  16. Which of client and server does active and passive TCP socket open?

    (Ans: The server opens a listening socket and just waits for connections – therefore it is called passive open (look up the meaning of passive vs active in the dictionary). The client actually initiates the connection through the 3-way handshake and so is called active open.)

  17. What are the slow start and congestion avoidance phases of TCP transmission?

    (Ans: Slow start is the first phase of data transmission on a TCP connection. When TCP encounters a retransmission timeout, it enters the congestion avoidance phase by reducing its congestion window to half the previous value.)

  18. Why are ports used in UDP and TCP and not process IDs of the client/server processes?

    (Ans: Process IDs need not be same when run across machines or even within one machine across different times. Thus, they cannot be used to identify a server process by a client trying to reach it.)

  19. What is piggybacking and how does it help in TCP?

    (Ans: Carrying acks along with data going in reverse direction is called piggybacking. This improves bandwidth utilization by reducing the overhead associated with acks.)

  20. A receiver of a connection has advertised a window of 64MSS. The sender sends 40 MSS of data at one point of time. It finds that the retransmission timeout occurs at this point of time, what happens at this time? How does the sender proceed with its transmission?

    (Ans: The cwnd is reduced to 32MSS – since the cwnd is exponentially increased, it must have reached 64MSS for 40MSS of data to be transmitted without an ack. It enters congestion avoidance phase and therefore uses additive increase. It increases cwnd to 33MSS when all outstanding acks are received and so on.)

  21. What is the difference between window and MSS in TCP?

    (Ans: Window is the buffer space available in the receiver – it represents the maximum amount of data that can be transmitted to the receiver without getting any ack. MSS represents the maximum amount of data that can be sent in a single segment.)

  22. How is UDP checksum calculated?

    (Ans: The UDP header, Pseudo header and data are all used in checksum calculation.)

  23. What is probe timer in TCP and why is it used?

    (Ans: When a receiver advertises a window of 0, it does not send ack for the last byte received. When the receiver is ready to advertise a non-zero window, it uses this last byte for the ack that carries a non-zero window size. However, if this ack is lost, the sender and receiver will be in deadlock. Therefore, the sender sends a probe periodically when the window size is zero to ensure that there is no deadlock.)

  24. What happens in a TCP connection open/close?

    (Ans: Open uses 3-way SYN handshake and Close uses 3-way FIN handshake.)

  25. If we have congestion in a router, how does TCP congestion algorithm reduce congestion?

    (Ans: TCP uses the multiplicative decrease to reduce congestion immediately and then the additive increase to add data slowly to the network rather than at a shot.)

  26. If we have congestion in a router, can it be reduced if the only traffic going through it is UDP traffic?

    (Ans: UDP is an unreliable, connectionless transport layer protocol that does not have any congestion control algorithm. So, unless the routers implement some congestion control at the network layer, there is nothing that can be done about congestion due to UDP traffic.)