0% found this document useful (0 votes)
78 views3 pages

CS 2204 Written Assignment Unit 7

The document discusses TCP connection termination states. It explains that the CLOSE_WAIT state occurs when one device sends a FIN but must wait for the other device to respond. It also describes that the TIME_WAIT state ensures enough time for ACKs to be received between devices and prevents confusion from old duplicate packets. The Nagle algorithm aims to reduce network congestion by buffering small packets into larger messages before sending, though this can increase latency for applications that require quick responses like video calls. FIN bits are used by each side to terminate their connection, and states like FIN_WAIT_1 and FIN_WAIT_2 occur during the termination process.

Uploaded by

Tophine Katei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views3 pages

CS 2204 Written Assignment Unit 7

The document discusses TCP connection termination states. It explains that the CLOSE_WAIT state occurs when one device sends a FIN but must wait for the other device to respond. It also describes that the TIME_WAIT state ensures enough time for ACKs to be received between devices and prevents confusion from old duplicate packets. The Nagle algorithm aims to reduce network congestion by buffering small packets into larger messages before sending, though this can increase latency for applications that require quick responses like video calls. FIN bits are used by each side to terminate their connection, and states like FIN_WAIT_1 and FIN_WAIT_2 occur during the termination process.

Uploaded by

Tophine Katei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CS 2204 Written Assignment Unit 7

Question 1

While waiting for the application being served to respond for connection termination, the device

with the first FIN may experience more extended periods in the CLOSE-WAIT state (Duc,

2019). The TCP protocol does not make assumptions about the length of this period. While

waiting, the server continues delivering data with the client receiving it. Nevertheless, data is not

sent to the server by the client.

The server eventually sends FIN for termination of the connection from its end. The client from

whom the termination request originated sends the FIN'sFIN's ACK. The client does not

immediately switch to the CLOSED state since it has to wait for the server to receive the ACK.

Despite this being expected to be fast, delays do occur.

Two reasons justify the necessity of the TIME-WAIT state and its length. First, it ensures

sufficient time is provided, ensuring that the other device receives the ACK and retransmission

when lost. It ensures that ACK and the packet have the required time for traveling from one end

to another. Second, it ensures a buffering period in the current and following connections

preventing confusion and duplication due to connection mix-ups. Duplication and loss of data

may result from packet delays and a smaller maximum lifetime compared to the processing time.

Question 2

The Nagle algorithm aims to minimize congestion of networks in TCP applications due to minor

packet issues. The algorithm has been a TCP standard characteristic since the 1980s.

Nagling is a technique adopted by the Nagle algorithm for processing data from the sender. It

functions by detecting small-sized packets and then accumulating them into large TCP messages.

The process prevents the production of unintended larger numbers of small messages. The
algorithm's general performance depends on its choices of the quantity of data accumulation and

the waiting period while sending and receiving data.

During congestion, applications requiring quick network responses, such as online games and

video calls, show decreased performance when nagling is used. Delays are seen as the algorithm

uses additional time in assembling the small packets triggering lags noticeable in audio

streaming and on the screen. As such, the applications deactivate Nagle (Herrero, 2020).

Question 3

 Data-less packets are sent regularly during idle connections, ensuring the said

connection's validity. An ACK is provided as indicative of the validity.

 A data-less TCP reset (RST) bit is sent for termination or resetting of the connection

during issues with established connections.

Question 4

Generally, using the finish (FIN) bit sets, individual sides (server and client) terminate their

specific communication ends by sending specified messages. The request for termination

message, also known as FIN, similarly carries data as regular segments. The receiver of the FIN

message sends an ACK to the sender, indicating its receipt. Ideally, the termination process must

be completed for the entire connection to be regarded as terminated. This involves receiving the

ACK and sending the FIN.

i. FIN-WAIT-1 indicates the initial stage point where activation of the 4-way handshake

took place (Cluzel et al., 2021). The remote endpoint receives a request to terminate the

connection from the local endpoint.

ii. FIN-WAIT-2 indicates an ACK from the remote endpoint has been sent due to the

previous request for termination of the connection. The remote endpoint is now required
to send a request for termination of active connection by the local endpoint. Generally,

CLOSE-WAIT, TIME-WAIT, and FIN_WAIT_2 are utilized since they have connection

relations. When there is an active connection between the client and server and needs to

terminate the connection, FIN_WAIT_2 occurs.

References

Cluzel, G., Georgiou, K., Moy, Y., & Zeller, C. (2021, October). Layered Formal Verification of

a TCP Stack. In 2021 IEEE Secure Development Conference (SecDev) (pp. 86-93).

IEEE.

Duc, S. N., Mimura, M., & Tanaka, H. (2019, September). An analysis of TCP ACK Storm DoS

attack on the virtual network. In 2019 19th International Symposium on Communications

and Information Technologies (ISCIT) (pp. 288-293). IEEE.

Herrero, R. (2020). Analysis of IoT mechanisms for media streaming. Internet of Things, 9,

100168.

You might also like