Transport Layer Exam Review

0.0(0)
studied byStudied by 1 person
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/38

flashcard set

Earn XP

Description and Tags

Flashcards based on Transport Layer lecture notes for exam review.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

39 Terms

1
New cards

TCP provides both reliable data transfer and congestion control.

True. TCP provides mechanisms for reliable data transfer (e.g., sequence numbers, acknowledgments, retransmissions) and congestion control (e.g., AIMD algorithm).

2
New cards

UDP is connection-oriented and ensures in-order delivery of packets.

False. UDP is connectionless and does not guarantee in-order delivery. Packets may arrive out of order or be lost.

3
New cards

A socket is defined by the 4-tuple: source IP, source port, destination IP, destination port.

True. A socket is uniquely identified by the source IP address, source port number, destination IP address, and destination port number.

4
New cards

Multiplexing allows multiple application processes to use the network simultaneously.

True. Multiplexing allows multiple application processes on a host to share the same network connection, improving efficiency.

5
New cards

TCP guarantees bandwidth and delay for time-sensitive applications.

False. TCP does not guarantee bandwidth or delay. It provides best-effort service and cannot ensure resources for real-time applications.

6
New cards

A TCP segment must always include an ACK number.

False. Only SYN packets during connection establishment do not include an ACK number; otherwise, most TCP segments include an ACK number to acknowledge received data.

7
New cards

TCP uses a sliding window protocol for reliable data transfer.

True. TCP uses a sliding window protocol to manage the amount of data sent without requiring immediate acknowledgments, improving throughput and reliability.

8
New cards

UDP provides flow control through a receiver window.

False. UDP does not provide flow control mechanisms. It sends data at a rate determined by the sending application, which can lead to congestion if the receiver is overwhelmed.

9
New cards

TCP uses a three-way handshake to establish connections.

True. TCP uses a three-way handshake (SYN, SYN-ACK, ACK) to establish a reliable connection before data transfer begins.

10
New cards

Error checking is implemented in both TCP and UDP through checksums.

True. Both TCP and UDP include a checksum field in their headers for error detection. The checksum is used to verify the integrity of the data.

11
New cards

Which of the following is NOT a TCP feature?

Guaranteed bandwidth. TCP does not guarantee bandwidth, unlike some other Quality of Service (QoS) mechanisms.

12
New cards

Which transport protocol is best suited for real-time applications like video calls?

UDP. UDP is preferred for real-time applications because it has lower overhead and avoids delays associated with TCP's reliability mechanisms.

13
New cards

What is the size of the UDP header?

8 bytes. The UDP header includes source port, destination port, length, and checksum fields.

14
New cards

Which of the following is NOT a TCP state?

SHUTDOWN. TCP states include LISTEN, SYN-SENT, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT, and CLOSED.

15
New cards

A transport layer service that ensures no duplicate packets are delivered is:

Reliable delivery. A transport layer service may ensure reliable delivery by retransmitting lost packets, using acknowledgments, and employing sequence numbers.

16
New cards

What does the TCP RST flag indicate?

Reset connection. The RST flag is used to abruptly terminate a TCP connection, often in response to an error or unexpected condition.

17
New cards

Which mechanism does TCP use for congestion control?

AIMD (Additive Increase Multiplicative Decrease). TCP employs AIMD to adjust the congestion window size. It increases the window size additively when no congestion is detected and decreases it multiplicatively when congestion occurs.

18
New cards

In connectionless demultiplexing, packets are delivered based on:

Destination IP and port. In connectionless demultiplexing, packets are delivered to the correct application process on the destination host based on the destination IP address and port number.

19
New cards

TCP segment retransmission occurs when:

Timer expires. If an acknowledgment for a TCP segment is not received within a certain time period, the segment is retransmitted.

20
New cards

Which of these is NOT used in TCP congestion control?

Random Early Detection. RED is a congestion avoidance technique used in network routers to reduce the likelihood of global synchronization.

21
New cards

Define the role of port numbers in the transport layer:

Port numbers identify specific processes on a host and enable correct data delivery to applications. They allow multiple applications to use the network simultaneously.

22
New cards

What is the difference between multiplexing and demultiplexing?

Multiplexing merges streams from multiple applications for transmission; demultiplexing separates them at the receiver. This allows multiple applications to share a single network connection.

23
New cards

Explain why UDP is preferred for real-time communication despite being unreliable:

It avoids delays from retransmissions and handshakes, offering faster delivery even if some packets are lost. This makes it suitable for applications where timely delivery is more critical than reliability.

24
New cards

What is the function of TCP’s flow control mechanism?

It regulates data flow to prevent the sender from overwhelming the receiver. This ensures that the receiver can process data at its own pace without being overloaded.

25
New cards

Describe the three-way handshake in TCP connection setup:

1) SYN from client, 2) SYN-ACK from server, 3) ACK from client — establishes a reliable connection. This process ensures that both sides are ready to communicate and agree on initial parameters.

26
New cards

Compare and contrast TCP and UDP in terms of features, overhead, and applications:

TCP is reliable, ordered, connection-oriented, and has 20-byte headers; used in email, web browsing. UDP is unreliable, connectionless, with 8-byte headers; used in gaming, VoIP. TCP is suitable for applications requiring reliability, while UDP is preferred for real-time applications.

27
New cards

Describe how TCP provides reliable data transfer using acknowledgments and retransmissions:

TCP tracks bytes via sequence numbers. ACKs confirm receipt; if not received in time, the data is retransmitted. This ensures that no data is lost or corrupted during transmission.

28
New cards

Explain TCP congestion control, detailing slow start, congestion avoidance, and fast recovery:

TCP begins with a small congestion window, grows it exponentially (slow start), then linearly (avoidance). On packet loss, it reduces window (multiplicative decrease) and uses fast recovery to avoid restarting from scratch. These mechanisms help TCP adapt to network conditions and avoid congestion.

29
New cards

A TCP segment with Seq=2000 and Ack=3000 is sent. What does this imply?

Sender is sending byte 2000; receiver has received all up to 2999 and expects 3000 next. The sequence number indicates the starting byte of the data being sent, while the acknowledgment number indicates the next expected byte.

30
New cards

You observe a TCP connection with duplicate ACKs. What could be happening and how does TCP react?

Likely indicates packet loss. TCP triggers fast retransmit to quickly resend lost data. This helps to quickly recover from packet loss without waiting for a retransmission timeout.

31
New cards

A host sends a 1500-byte TCP segment including a 20-byte TCP header. How many bytes are left for application data?

1480 bytes for data. The total segment size is 1500 bytes, and after subtracting the 20-byte TCP header, 1480 bytes are left for application data.

32
New cards

Estimate the time to download a webpage using non-persistent HTTP with 5 objects. RTT = 100ms, object transmission time negligible:

Each object = 2 RTTs = 200ms. Total = 5 * 200ms = 1000 ms = 1 second. Non-persistent HTTP requires a new TCP connection for each object, resulting in two RTTs per object.

33
New cards

A TCP connection starts with cwnd = 1 MSS. It doubles cwnd every RTT. After 3 RTTs, what is cwnd?

8 MSS. The congestion window doubles every RTT. After 1 RTT: 2 MSS, after 2 RTTs: 4 MSS, after 3 RTTs: 8 MSS.

34
New cards

If a UDP segment has a checksum mismatch at the receiver, what happens?

It is discarded or ignored based on implementation; UDP does not guarantee correction. UDP provides no mechanism for error correction, so the segment is simply dropped.

35
New cards

TCP always uses cumulative ACKs and does not support selective acknowledgments.

False. TCP supports Selective Acknowledgments (SACKs) as an option, allowing the receiver to acknowledge non-contiguous blocks of data.

36
New cards

Which field in the TCP header indicates how much data a sender is willing to receive?

Window Size. The window size field indicates how much data the sender is willing to receive, used for flow control.

37
New cards

Suppose a TCP sender has sent segments with sequence numbers 1000, 1500, 2000. If it receives three duplicate ACKs for ACK=1500, what does it do according to TCP’s fast retransmit algorithm?

It infers that segment with sequence number 1500 was received but the one with 1000 was lost. It retransmits the segment with sequence number 1500 immediately without waiting for a timeout. Fast retransmit helps to quickly recover from packet loss.

38
New cards

Sketch or describe the TCP three-way handshake, labeling the flags and sequence numbers exchanged:

Client sends: SYN, Seq = x; Server replies: SYN-ACK, Seq = y, Ack = x + 1; Client responds: ACK, Seq = x + 1, Ack = y + 1. This handshake ensures both sides agree to start the connection and synchronizes sequence numbers.

39
New cards

Briefly describe the role of state machines (FSM) in implementing reliable data transfer protocols like rdt2.0.

FSMs define the sender and receiver states and transitions triggered by events (e.g., message from above, ACK/NAK reception). They help manage actions such as retransmissions, error checking, and flow control logic under unreliable conditions. FSMs provide a structured way to implement reliable data transfer protocols.