L5 Transport Layer 2 Flashcards

1
Q

What services does the transport layer provide to applications?

A

Process-level addressing
Multiplexing and demultiplexing
Integrity checking and error detection
Connection management (TCP only)
Acknowledgments and retransmissions (TCP)
Flow control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two transport protocols available in the Internet?

A

Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a TCP socket consist of?

A

Source IP address
Source port number
Destination IP address
Destination port number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the three-way handshake in TCP connection establishment?

A
  1. Client sends SYN segment (SYN=1, random Seq=x)
  2. Server responds with SYN-ACK segment (SYN=1, ACK=x+1, Seq=y)
  3. Client sends ACK segment (ACK=y+1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What components are created at each host during TCP connection setup?

A

Send buffer
Receive buffer
State variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of the TCP rwnd (receive window)?

A

Prevents sender from overflowing the receiver’s buffer
Controls flow rate based on available buffer space
Updated dynamically and communicated via TCP header

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe TCP reliable data transfer.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is fast retransmit in TCP?

A

Triggered after receiving 3 duplicate ACKs
Sender immediately retransmits missing segment without waiting for timeout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is AIMD (Additive Increase Multiplicative Decrease) in TCP congestion control?

A

Additively increases congestion window (cwnd) by 1 MSS per RTT
Cuts congestion window in half on packet loss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the TCP state LISTEN mean?

A

The server is waiting for incoming TCP connection requests from any remote client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the TCP state SYN_SENT mean?

A

The client has sent a SYN segment and is now waiting for a matching SYN-ACK from the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the TCP state SYN_RCVD mean?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the TCP state ESTAB (Established) mean?

A

The TCP connection is fully established; data transfer can now occur in both directions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the TCP state FIN_WAIT_1 mean?

A

The client has sent a FIN segment (request to close) and is waiting for an ACK from the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the TCP state FIN_WAIT_2 mean?

A

The client has received the ACK for its FIN and is now waiting for the server’s FIN segment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the TCP state TIMED_WAIT mean?

A

The client is waiting for a duration (2 × Maximum Segment Lifetime) to ensure delayed packets are flushed before closing completely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does the TCP state CLOSE_WAIT mean?

A

The server has received a FIN from the client and acknowledged it but still has data to send before it closes its side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does the TCP state LAST_ACK mean?

A

The server has sent its own FIN segment and is waiting for an acknowledgment from the client before closing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does the TCP state CLOSED mean?

A

The TCP connection is fully closed, and all resources (buffers, variables) have been deallocated.

20
Q

What does the ‘Spare room’ represent in the TCP receive buffer diagram?

A

Unused space available to receive new TCP data

21
Q

What does rwnd measure?

A

Size of the spare room (available buffer space) at the receiver

22
Q

What happens when TCP data fills the buffer?

A

Sender must stop or slow down transmission to avoid overflow

23
Q

What causes multiple duplicate ACKs to be sent?

A

Receiver notices a gap (missing data segment) and keeps acknowledging last in-order byte

24
Q

What does the repeated ACK=100 mean?

A

Receiver is still missing data starting from byte 100

25
What action should the sender take after seeing 3 duplicate ACKs?
**Perform fast retransmit of the missing segment**
26
What happens when the client sends ‘C’ to the server?
**Client sends segment with Seq=42, ACK=79, Data='C'**
27
How does the server acknowledge and echo the character?
**Server sends back segment with Seq=79, ACK=43, Data='C'**
28
What does Seq=43, ACK=80 mean in the final exchange?
**Client has received data up to byte 79 and is now expecting byte 80**
29
What happens when an ACK is lost in TCP?
**Sender retransmits data after timeout expiration**
30
Why is timeout-based retransmission slower?
**Waiting for the timeout period increases end-to-end delay**
31
How are sequence numbers assigned in TCP file transmission?
**Each segment's Seq number is the byte number of the first byte in the segment**
32
What Seq number will the second segment have if MSS=1000 bytes?
**Seq=1000**
33
Name three important fields in the TCP header.
**Source port**, **Destination port**, **Sequence number**, **Acknowledgment number**, **Flags (URG, ACK, PSH, RST, SYN, FIN)**
34
What is the purpose of the options field in a TCP segment?
**Used for MSS negotiation, window scaling, and timestamping**
35
What fields do TCP and UDP segments always have?
**Source port**, **Destination port**, **Application data (payload)**
36
What does 'logical end-to-end transport' mean?
**Applications at the endpoints communicate logically across multiple physical networks**
37
Which layers participate end-to-end in transport?
**Application layer**, **Transport layer**
38
What does the AIMD sawtooth pattern show?
**Window size increases linearly until loss occurs, then drops sharply**
39
Why is TCP congestion control called 'probing for bandwidth'?
**TCP incrementally increases transmission rate until congestion (loss) is detected**
40
What are the client states during TCP connection setup?
**LISTEN → SYN_SENT → ESTAB**
41
What are the server states during TCP connection setup?
**LISTEN → SYN_RCVD → ESTAB**
42
When is the connection considered established?
**After receiving ACK for the SYN-ACK segment**
43
What client states are involved during TCP termination?
**ESTAB → FIN_WAIT_1 → FIN_WAIT_2 → TIMED_WAIT → CLOSED**
44
What server states are involved during TCP termination?
**ESTAB → CLOSE_WAIT → LAST_ACK → CLOSED**
45
Why does TCP enter TIMED_WAIT after closing?
**To ensure delayed or duplicate segments do not cause confusion if connection is reused**