Chapter 3 Flashcards

(62 cards)

1
Q

What is multiplexing in the transport layer?

A

Multiplexing is the process of gathering data from multiple application processes, adding transport-layer headers, and sending the data to the network layer.

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

What is demultiplexing in the transport layer?

A

Demultiplexing is the process of directing incoming transport-layer segments to the correct application process based on the destination port number.

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

What information does the transport layer use to demultiplex incoming segments?

A

It uses the destination port number to determine which socket/application should receive the data.

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

How does UDP perform multiplexing and demultiplexing?

A

UDP uses a 2-tuple (Destination IP, Destination Port) to send data to the correct application without requiring a connection.

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

How does TCP perform multiplexing and demultiplexing?

A

TCP uses a 4-tuple (Source IP, Source Port, Destination IP, Destination Port) to uniquely identify each connection.

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

Why does UDP use a 2-tuple instead of a 4-tuple like TCP?

A

UDP does not establish connections; it sends each packet independently, only needing a destination IP and port to deliver the data.

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

Why does TCP use a 4-tuple for connection management?

A

TCP connections must be uniquely identified so that multiple connections between the same hosts can coexist.

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

What are common applications that use UDP multiplexing and demultiplexing?

A

DNS, VoIP, video streaming, and online gaming.

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

What are common applications that use TCP multiplexing and demultiplexing?

A

Web browsing (HTTP/HTTPS), file transfers (FTP), and email (SMTP, IMAP, POP3).

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

What is the main advantage of UDP’s multiplexing/demultiplexing?

A

Low overhead and fast data transmission without connection setup.

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

What is the main advantage of TCP’s multiplexing/demultiplexing?

A

Reliable, ordered delivery with congestion control.

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

What happens if two UDP packets have different source IPs but the same destination IP and port?

A

Both packets will be delivered to the same application process at the destination.

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

What happens if two TCP packets have different source ports but the same destination IP and port?

A

They will be treated as separate connections since TCP differentiates connections using a 4-tuple.

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

Why does DNS use UDP instead of TCP?

A

UDP is faster and avoids connection setup delays, which is important for quick domain name resolution.

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

Why does HTTP use TCP instead of UDP?

A

HTTP requires reliable, in-order delivery of web pages and data, which TCP provides.

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

What transport services does UDP provide?

A

Multiplexing/demultiplexing, error detection (checksum), best-effort delivery, no congestion control, and stateless communication.

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

Why is UDP faster than TCP?

A

No connection setup, minimal header, no retransmissions, and no congestion control.

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

Why does DNS use UDP instead of TCP?

A

Because DNS queries need to be fast and avoid connection setup delays.

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

What happens when a UDP packet is lost?

A

The packet is simply discarded; no retransmission occurs.

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

Why is UDP useful for live video streaming?

A

Delayed packets are useless in real-time streaming; minor data loss is better than buffering.

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

What is the main challenge of providing reliable transport over an unreliable network?

A

Packets may be lost, duplicated, delayed, or corrupted.

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

What does a transport protocol use to detect errors?

A

A checksum.

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

What is the purpose of acknowledgments (ACKs)?

A

To confirm that a packet was received correctly.

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

How does a sender detect lost packets?

A

By using a timer and retransmitting if an ACK is not received.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the purpose of sequence numbers in a reliable transport protocol?
To distinguish between new and duplicate packets.
26
How does rdt3.0 improve reliability over lossy networks?
It introduces timeouts and retransmissions.
27
What is the purpose of sequence numbers in reliable transport?
They differentiate new packets from retransmitted ones and ensure in-order delivery.
28
How does a transport protocol detect errors in received packets?
By using a checksum.
29
What happens if an ACK is lost in the Alternating-Bit Protocol?
The sender retransmits the packet when the timer expires.
30
Why does the receiver resend the last ACK when it receives a duplicate packet?
To let the sender know the last ACK was lost, preventing unnecessary retransmissions.
31
How does rdt3.0 handle packet loss?
It starts a timer when sending a packet and retransmits if no ACK is received.
32
Why is Stop-and-Wait inefficient?
It waits for an ACK before sending the next packet, wasting bandwidth.
33
What is the main idea behind pipelining in transport protocols?
Sending multiple packets before waiting for ACKs to improve efficiency.
34
How does Go-Back-N improve efficiency over Stop-and-Wait?
It allows multiple in-flight packets and uses cumulative ACKs.
35
What is the key disadvantage of Go-Back-N?
If a packet is lost, all subsequent packets must be retransmitted.
36
How does Selective Repeat improve upon Go-Back-N?
It only retransmits lost packets, making it more efficient.
37
What new challenge does pipelining introduce?
Out-of-order delivery, requiring buffering and larger sequence numbers.
38
What is the purpose of the sliding window in GBN?
It allows the sender to send up to N unacknowledged packets before stopping.
39
What happens when a packet is lost in GBN?
The sender retransmits the lost packet and all subsequent packets after a timeout.
40
What does an ACK(n) in GBN signify?
It acknowledges all packets up to and including packet n.
41
How does GBN improve efficiency compared to Stop-and-Wait?
It allows multiple packets to be in-flight before waiting for an acknowledgment.
42
What is a major inefficiency in GBN?
Unnecessary retransmissions—if a single packet is lost, all later packets must be resent.
43
What is the key improvement of Selective Repeat over Go-Back-N?
SR only retransmits lost or corrupted packets, while GBN retransmits all packets after a lost one.
44
How does the receiver handle out-of-order packets in SR?
It buffers them until missing packets arrive, then delivers them in order.
45
Why does SR require individual ACKs instead of cumulative ACKs?
Because the receiver may accept packets out of order, so it must acknowledge each packet separately.
46
What is the condition to avoid ambiguity in SR?
Window size must be ≤ half the sequence number space (N ≤ (SeqNumSpace/2)).
47
What happens if the SR window size is too large?
The receiver may mistake an old retransmitted packet for a new one, causing errors.
48
What is the purpose of the TCP connection establishment phase?
It ensures that both sender and receiver are ready for communication, synchronizes sequence numbers, and sets up necessary buffers and state variables.
49
What mechanism does TCP use for connection establishment?
The three-way handshake.
50
What are the three steps of the TCP three-way handshake?
SYN – The client sends a SYN segment to the server. SYN-ACK – The server responds with a SYN-ACK segment. ACK – The client acknowledges and the connection is established.
51
What does the SYN flag in a TCP segment indicate?
It signals the start of a TCP connection and synchronizes sequence numbers.
52
What does the ACK flag in a TCP segment indicate?
It acknowledges receipt of a segment.
53
What is an Initial Sequence Number (ISN)?
A randomly chosen number used to track data flow in a TCP connection.
54
What is the purpose of the SYN-ACK segment?
It acknowledges the client’s connection request and provides the server’s ISN.
55
Why does TCP use a three-way handshake instead of a two-way handshake?
To prevent old, delayed SYN segments from being mistaken for new connection requests and to ensure both sides are fully synchronized.
56
What TCP state does the client enter after sending a SYN?
SYN-SENT.
57
What TCP state does the server enter after receiving a SYN and sending a SYN-ACK?
SYN-RECEIVED.
58
What state do both client and server enter after completing the three-way handshake?
ESTABLISHED.
59
What are the consequences of skipping the TCP connection establishment phase?
Data may be lost, out-of-order, or duplicated, and communication may fail due to uninitialized buffers.
60
What does the TCP receive window (rwnd) do?
It controls how much data the sender can transmit before waiting for an acknowledgment.
61
What is a half-open connection in TCP?
A situation where one side believes a connection is open while the other has closed it, leading to potential data loss.
62
Why are TCP sequence numbers important?
They ensure ordered delivery and enable retransmissions of lost packets.