TCP Protocol: Features, Handshake, Flow Control, and Reliability

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/78

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

79 Terms

1
New cards

https://moodle.maynoothuniversity.ie/pluginfile.php/2001435/mod_resource/content/0/Lab5%20-%20TCP%20notes%20from%20Hannah%20.pdf

2
New cards

What do negative acknowledgements indicate in TCP?

They inform the sender that a packet was not received correctly.

3
New cards

What is the purpose of sequence numbers in TCP?

They allow the sender to keep track of the order of packets and identify lost packets.

4
New cards

What is window/pipelining in TCP?

It allows the sender to transmit multiple packets without waiting for acknowledgements, as long as they are within a specified sequence number range.

5
New cards

What are the main features of TCP's connection-oriented transport?

TCP relies on error detection, retransmission, cumulative acknowledgements, and timers for reliable data transfer.

6
New cards

What must occur before data can be sent in a TCP connection?

A handshake process must take place to establish connection parameters.

7
New cards

What is the maximum segment size (MSS) in TCP?

It is the maximum amount of application data that can be sent in a TCP segment, determined by the largest link-layer frame.

8
New cards

What is the role of the TCP header?

It contains important fields such as source and destination port numbers, sequence and acknowledgment numbers, and flags for controlling the connection.

9
New cards

What does the ACK bit in the TCP flag field signify?

It indicates that the acknowledgment number in the segment is valid.

10
New cards

What is the purpose of the SYN bit in TCP?

It is used for connection setup and teardown.

11
New cards

What does the FIN bit in TCP indicate?

It signals the termination of a connection.

12
New cards

How does TCP ensure reliable data transfer?

By using sequence numbers, acknowledgment numbers, and retransmission of lost packets.

13
New cards

What is the function of the receive window in TCP?

It indicates the number of bytes the receiver can accept at a given time.

14
New cards

What does the options field in a TCP header allow?

It allows the sender and receiver to negotiate parameters such as the maximum segment size.

15
New cards

How does TCP handle urgent data?

It uses the URG bit and the Urgent Data Pointer field to indicate the location of urgent data.

16
New cards

What happens to data in TCP after it is received?

It is placed in the TCP connection's receive buffer for the application to read.

17
New cards

What is the significance of the acknowledgment number in TCP?

It indicates the sequence number of the next byte that the sender expects to receive.

18
New cards

What is the structure of a TCP segment?

It includes a header with source and destination ports, sequence and acknowledgment numbers, and a payload.

19
New cards

What is a third-way handshake in TCP?

It is the process where the client and server exchange special TCP segments to establish a connection.

20
New cards

How does TCP manage data flow between two processes?

It allows full-duplex communication, enabling data to flow simultaneously in both directions.

21
New cards

What is the role of timers in TCP?

They are used to retransmit packets if they are lost during transmission.

22
New cards

What is the significance of the 32-bit sequence number field in TCP?

It numbers the data flowing from sender to receiver, helping to identify lost packets.

23
New cards

What type of acknowledgements does TCP provide?

Cumulative acknowledgements.

24
New cards

How does TCP handle out of order data?

TCP can either discard out of order segments or keep them and wait for missing bytes.

25
New cards

What is the purpose of the timeout/retransmit mechanism in TCP?

To recover lost segments.

26
New cards

What should the length of the timeout be in relation to the round-trip time (RTT)?

It should be larger than the connection's round-trip time.

27
New cards

How is SampleRTT estimated in TCP?

SampleRTT is estimated for transmitted but currently unacknowledged segments.

28
New cards

What is the formula for calculating EstimatedRTT?

EstimatedRTT = (1 - a) EstimatedRTT + a SampleRTT, with a recommended value of 0.125.

29
New cards

What does DevRTT estimate in TCP?

It estimates how much SampleRTT deviates from EstimatedRTT.

30
New cards

What is the recommended value for B in the DevRTT calculation?

0.25.

31
New cards

What is the relationship between the timeout interval and EstimatedRTT?

The timeout interval should be greater than or equal to EstimatedRTT.

32
New cards

What happens to the timeout interval after a timeout occurs?

The timeout interval is doubled.

33
New cards

What is the purpose of TCP's cumulative acknowledgements?

To ensure reliable data transfer by acknowledging one or more previous unacknowledged segments.

34
New cards

What does TCP do when it receives three duplicate ACKs?

It performs a fast retransmit of the missing segment before the timer expires.

35
New cards

What is the difference between Go-Back-N (GBN) and TCP's selective acknowledgment?

GBN retransmits all subsequent packets after a lost packet, while TCP only retransmits the lost packet.

36
New cards

What is flow control in TCP?

A service that prevents the sender from overflowing the receiver's buffer by matching the sending rate with the reading rate of the application.

37
New cards

What variables does TCP maintain for flow control?

Receive window (rwnd), LastByteRead, and LastByteRcvd.

38
New cards

What happens when the receive window (rwnd) is full?

The sender will continue to send 1-byte segments and will receive ACKs with new rwnd values once space is made.

39
New cards

What are the steps for establishing a TCP connection?

1. Client sends a SYN segment to the server. 2. Server allocates resources and sends a connection-granted segment back.

40
New cards

What does the SYN bit indicate in a TCP segment?

It indicates that the segment is a request to establish a connection.

41
New cards

What information is contained in the connection-granted segment from the server?

SYN = 1, acknowledgment field set to client_isn + 1, and the server's initial sequence number.

42
New cards

What is the purpose of the SYNACK segment in TCP?

It indicates that the server has granted the connection and is part of the three-way handshake process.

43
New cards

What happens when a client receives a SYNACK segment?

The client allocates buffers and variables for the connection and sends an acknowledgment segment back to the server.

44
New cards

What does the FIN bit signify in a TCP segment?

It indicates that the sender wants to terminate the connection.

45
New cards

What are the states a client TCP transitions through during a connection?

CLOSED, SYN_SENT, ESTABLISHED, FIN_WAIT_1, FIN_WAIT_2, TIME_WAIT.

46
New cards

What occurs in the FIN_WAIT_1 state?

The client waits for an acknowledgment segment from the server after sending a FIN segment.

47
New cards

What is the purpose of the TIME_WAIT state in TCP?

It allows the client to resend the final acknowledgment in case it was lost.

48
New cards

What triggers a TCP sender to reduce its send rate?

Perceived congestion on the path or a lost segment.

49
New cards

What is a SYN Flood Attack?

A DoS attack that sends numerous TCP SYN segments without completing the handshake, exhausting server resources.

50
New cards

What is the role of TCP congestion control?

To manage the rate of data transmission to avoid overwhelming the network.

51
New cards

What does cwnd stand for in TCP?

Congestion window, which limits the amount of unacknowledged data that can be sent.

52
New cards

How does TCP use acknowledgments to manage congestion?

TCP increases the congestion window size when acknowledgments are received, indicating successful data delivery.

53
New cards

What is the slow start mechanism in TCP?

A method where the congestion window starts at 1 MSS and doubles each time a segment is acknowledged.

54
New cards

What happens when a loss event occurs in TCP?

The congestion window is reset to 1 MSS, and the slow start process begins again.

55
New cards

What is the purpose of bandwidth probing in TCP?

To adjust the transmission rate in response to received ACKs until a loss event occurs.

56
New cards

What is the significance of the ssthresh variable in TCP?

It represents the slow start threshold, which is set to half the congestion window value when congestion is detected.

57
New cards

What are the three major components of TCP congestion control?

Slow start, congestion avoidance, and fast recovery.

58
New cards

What does the term 'self-clocking' refer to in TCP?

The mechanism where TCP uses acknowledgments to trigger increases in the congestion window size.

59
New cards

What happens if a host receives a TCP segment with mismatched port numbers?

The host sends a special reset segment with the RST flag set to 1.

60
New cards

What does the term 'half-open connections' refer to?

Connections that are allocated resources but not fully established due to incomplete handshakes.

61
New cards

What is the effect of a high delay or low-bandwidth link on TCP's congestion window?

The congestion window will increase at a slow rate.

62
New cards

What is the initial sending rate in TCP when the connection begins?

It is roughly MSS/RTT, where MSS is the maximum segment size and RTT is the round-trip time.

63
New cards

What happens when the congestion window (cwnd) equals the slow start threshold (ssthresh)?

Slow start ends, and TCP transitions into congestion avoidance mode.

64
New cards

How does TCP increase the congestion window in congestion avoidance mode?

TCP increases cwnd cautiously by 1 Maximum Segment Size (MSS) for each round-trip time (RTT).

65
New cards

What triggers TCP to perform a fast retransmit?

The detection of three duplicate acknowledgments (ACKs).

66
New cards

What is the effect of TCP splitting on networking delay?

It reduces networking delay from approximately 4 RTT to RTT.

67
New cards

What is the behavior of TCP when entering the congestion avoidance state?

Cwnd is set to approximately half the value it was when congestion was last encountered.

68
New cards

How does TCP adjust the congestion window when a timeout occurs?

Cwnd is reset to 1 MSS, and ssthresh is updated to half of cwnd when a loss occurs.

69
New cards

What happens to cwnd during fast recovery after detecting three duplicate ACKs?

Cwnd is increased by 1 MSS for each duplicate ACK received.

70
New cards

What is the difference between TCP Tahoe and TCP Reno in terms of congestion control?

TCP Tahoe unconditionally cuts cwnd to 1 MSS after a timeout, while TCP Reno incorporates fast recovery.

71
New cards

What is the additive-increase, multiplicative-decrease (AIMD) approach in TCP congestion control?

It refers to the linear increase of cwnd by 1 MSS per RTT and halving cwnd on triple duplicate ACK events.

72
New cards

What is the purpose of the TCP Vegas algorithm?

To avoid congestion while maintaining good throughput by detecting congestion before packet loss occurs.

73
New cards

How does the average throughput of a long-lived TCP connection relate to cwnd and RTT?

TCP's transmission rate is roughly equal to cwnd divided by RTT.

74
New cards

What is the average throughput of a TCP connection when a loss event occurs?

The average throughput ranges from W/(2 RTT) to W/RTT, where W is the value of cwnd at the time of loss.

75
New cards

What is the formula for average throughput of a TCP connection as a function of loss rate?

Average throughput = (1.22 MSS) / (RTT √L), where L is the loss rate.

76
New cards

What is meant by fairness in TCP congestion control?

Fairness is achieved when the average transmission rate of each connection is approximately R/K, where R is the transmission rate and K is the number of TCP connections.

77
New cards

How do sessions with smaller RTTs affect bandwidth usage in TCP?

Sessions with smaller RTTs can grab available bandwidth more quickly, resulting in higher throughput compared to connections with larger RTTs.

78
New cards

What is the impact of UDP traffic on TCP congestion control?

UDP sources do not decrease their transmission rate in response to congestion, which can crowd out TCP traffic.

79
New cards

What happens when an application uses multiple parallel TCP connections?

It can obtain a larger fraction of bandwidth in a congested link.

Explore top flashcards