L5 Transport Layer 2 Flashcards
What services does the transport layer provide to applications?
Process-level addressing
Multiplexing and demultiplexing
Integrity checking and error detection
Connection management (TCP only)
Acknowledgments and retransmissions (TCP)
Flow control
What are the two transport protocols available in the Internet?
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
What does a TCP socket consist of?
Source IP address
Source port number
Destination IP address
Destination port number
What is the three-way handshake in TCP connection establishment?
- Client sends SYN segment (SYN=1, random Seq=x)
- Server responds with SYN-ACK segment (SYN=1, ACK=x+1, Seq=y)
- Client sends ACK segment (ACK=y+1)
What components are created at each host during TCP connection setup?
Send buffer
Receive buffer
State variables
What is the purpose of the TCP rwnd (receive window)?
Prevents sender from overflowing the receiver’s buffer
Controls flow rate based on available buffer space
Updated dynamically and communicated via TCP header
Describe TCP reliable data transfer.
Data read at the receiver matches the sender’s data exactly
TCP uses timeouts and retransmissions
TCP uses cumulative ACKs
TCP uses duplicate ACKs to trigger fast retransmission
What is fast retransmit in TCP?
Triggered after receiving 3 duplicate ACKs
Sender immediately retransmits missing segment without waiting for timeout
What is AIMD (Additive Increase Multiplicative Decrease) in TCP congestion control?
Additively increases congestion window (cwnd) by 1 MSS per RTT
Cuts congestion window in half on packet loss
What does the TCP state LISTEN mean?
The server is waiting for incoming TCP connection requests from any remote client.
What does the TCP state SYN_SENT mean?
The client has sent a SYN segment and is now waiting for a matching SYN-ACK from the server.
What does the TCP state SYN_RCVD mean?
The server has received the SYN segment from the client and sent back a SYN-ACK segment. It is now waiting for the client’s final ACK.
What does the TCP state ESTAB (Established) mean?
The TCP connection is fully established; data transfer can now occur in both directions.
What does the TCP state FIN_WAIT_1 mean?
The client has sent a FIN segment (request to close) and is waiting for an ACK from the server.
What does the TCP state FIN_WAIT_2 mean?
The client has received the ACK for its FIN and is now waiting for the server’s FIN segment.
What does the TCP state TIMED_WAIT mean?
The client is waiting for a duration (2 × Maximum Segment Lifetime) to ensure delayed packets are flushed before closing completely.
What does the TCP state CLOSE_WAIT mean?
The server has received a FIN from the client and acknowledged it but still has data to send before it closes its side.
What does the TCP state LAST_ACK mean?
The server has sent its own FIN segment and is waiting for an acknowledgment from the client before closing.
What does the TCP state CLOSED mean?
The TCP connection is fully closed, and all resources (buffers, variables) have been deallocated.
What does the ‘Spare room’ represent in the TCP receive buffer diagram?
Unused space available to receive new TCP data
What does rwnd measure?
Size of the spare room (available buffer space) at the receiver
What happens when TCP data fills the buffer?
Sender must stop or slow down transmission to avoid overflow
What causes multiple duplicate ACKs to be sent?
Receiver notices a gap (missing data segment) and keeps acknowledging last in-order byte
What does the repeated ACK=100 mean?
Receiver is still missing data starting from byte 100