Skip to content

CS2204: unit 7: Written Assignment

Q1

Why does the maximum packet lifetime have to be large enough to ensure that not only the packet but also its acknowledgments have disappeared?


Q2

Give one potential disadvantage when Nagle’s algorithm is used on a badly congested network.

  • Nagle’s algorithm buffers small packets until it reaches an agreed upon size then it sends them into one TCP/IP package.
  • consider an open ssh connection on TCP/IP protocol, without the Nagle’s algorithm, the ssh will send a lot of small packets (eg. for every character you type in the terminal) which indicates ineffective use of the network.
  • instead, using the Nagle algorithm, will buffer these small packets, till you reach few characters (for example) and send them in one packet.
  • The problem arises if the Nagle’s algorithm buffers its packet to a size that is larger than the network can handle, worsening the congestion on the network.
  • in this case, the packet may take longer time to arrive to the server causing the client to retransmit which increases the possibility of duplicate packets.
  • another problem might arise with the last packet, if another full packet has already been sent, this packet may never reach a full packet size, causing the client waiting for the ACK of the previous packet before sending this partial packet to the server, this may be a minor problem since the it will only adds few milliseconds of wait on the last packet.
  • references:

Q3

Give two examples of cases where TCP sends data-less packets on an established connection (which is not being torn down).

  • A TCP has its window size reduced to 0, then this sender will keep sending data-less packets at regular intervals; each of those polling packets acknowledges the receiver’s current ACK, till it receives the receiver’s ACK containing window-enlargement announcement.
  • packets that its only purpose is to acknowledge a previous packet from the other end, might be also data-less.
  • references:
    • Dordal, P. (2019). An introduction to computer networks. chapter 12.17 TCP flow control.

Q4

Exercise 5.0 from section 12.24 of the textbook:

1. Suppose you see multiple TCP connections on your workstation in state FIN_WAIT_1. What is likely going on? Whose fault is it?

  • the host who is wishing to close the connection enters FIN_WAIT_1, waiting for the other end’s acknowledgment of its FIN.
  • this state should not last long, unless the acknowledgment of the other end has been lost.
  • in this case, either the other end is not communicating, as if it is busy or stuck or even unexpectedly disconnected or shutdown; or the acknowledgment from the other end have not being arrived due to congestion on the network; or that our device is disconnected.
  • since we have multiple hosts with state, then the problem is probably on our side, mostly that our very close network is congested, or our device is disconnected.

2.What might be going on if you see connections languishing in state FIN_WAIT_2?

  • FIN_WAIT_2 happens after receiving the acknowledgements of our FIN, waiting for the other end’s FIN;
  • before the other end can send its FIN, it must send us all of the remaining data from the connection, before the connection can be closed safely.
  • finding multiple connections on this state, means either these connections have large amount of data left, that need to be transmitted before the FIN; or we are not able to receive those FINs; or even our very close network is congested and all the FINs may arrive at once shortly.
  • finding multiple connections with this state indicates that the problem is on our side of the network.