TCP Flashcards
What occurs when TCP host wants to send and receive data from another host?
Connection establishment - the two TCP hosts establish a virtual connection
Data transfer - data are exchanged in both directories
Connection termination - the connection is terminated
What happens if a segment is lost or corrupted in TCP?
It is retransmitted
What happens if a segment arrives out of order in TCP?
TCP holds it until the missing segments arrive
What mode does TCP transmit data in? And what does this imply?
It transmits it in full duplex mode and this implies that each party must get approval from the other party before any data is transferred.
What happens to establish a connection?
The three way handshake.
The active open is performed by the client sending a SYN segment to the server
In response the server replies with a SYN–ACK segment
Finally the client sends an ACK segment back to the server
What is a half close?
This is where one end stops sending data while stile receiving data.
How do you perform a half close?
By sending a FIN segment. The server accepts the half close by sending the ACK segment. Data transfer from client to server stops. When the server has sent all of its data, it sends a FIN segment which is acknowledged by an ACK from the client.
How is the amount of data sent controlled?
It is controlled by the receiver (flow control) but also the level of congestion in the network
What is the difference between flow control and congestion control?
Feedback from the receiver is used to determine the rate at which the sender sends data in flow control whereas in congestion control the feedback from within the network is used to determine the rate at which the sender sends data.
If the receiver cannot deal with the data as fast as it is sent by the sender it must tell the sender to slow down, congestion tells the sender to slow down if the network cannot deal with the data.
Flow control deals with end receiver and congestion control deals with intermediate routers
How is the sender’s actual window size determined?
It is the minimum of the receiver advertised window size and congestion window size
What are the three phases for TCP handling congestion?
Slow start (Exponential Increase)
Congestion Avoidance (Additive Increase)
Congestion Detection (Multiplicative Decrease)
Describe Congestion Control: Slow Start
The size of the congestion window starts with one maximum segment size.
The size of the window increases one maximum segment size each time an acknowledgement is received
After the first successful transmission and acknowledgement of a TCP segment increases the window to two segments. After successful transmission the window increases to 4 segments
Describe congestion control additive increase
Since slow start can’t continue indefinitely. The sender keeps track of a variable slow start threshold. When the size of the window reaches this slow start stops and additive increase begins.
Each time the whole window of segments is acknowledged (one round), the size of the congestion window is increased by 1. This occurs until congestion is detected or the receiver’s advertised window size is reached
Describe congestion control: multiplicative decrease
The sender guesses that congestion has occurred if a timer expires and it needs to retransmit a segment.
Slow start threshold is set to one half the current congestion window size
Congestion window size is then set to one maximum segment size
Start the slow start phase again