Lesson 2: Study Guide Flashcards

1
Q

What does the transport layer provide?

A

provides an end-to-end connection between two applications running on different/same hosts.

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

What is a packet for the transport layer called?

A

segment

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

What are the two main protocols within the transport layer?

A

1) Transmission Control Protocol - TCP (reliability)
2) User Datagram Protocol - UDP (basic functionality)

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

What is multiplexing, and why is it necessary?

A

transport layer’s ability for a host to run multiple applications to use the network simultaneously, this is performed by using ports; each application opens socket and has own port number, which enables multiple applications on same IP address and same host

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

Describe the two types of multiplexing/demultiplexing.

A

1) Connectionless (UDP): The identifier of a UDP socket is a two-tuple that consists of a destination IP address and a destination port number. Transport layer encapsulates application message by appending source and destination port.
2) Connection-oriented (TCP): The identifier for a TCP socket is a four-tuple that consists of the source IP, source port, destination IP, and destination port. Client sends request from socket to server’s welcoming socket, 3-way handshake, then server creates a new socket for the connection. send and receive is enabled on this connection.

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

What are the differences between UDP and TCP?

A

UDP
- Connectionless (no 3-way handshake)
- Unreliable (no delivery guarantee)
- Basic functionality
- Relies on application layer to implement the other functionalities
- Less delay, better control over sending data
- NO transmission control (flow or congestion)

TCP
- Connection oriented (3-way handshake)
- Reliable, guarantees IN ORDER delivery without any loss
- Flow control, congestion control
- Goal of end-to-end communication

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

When would an application layer protocol choose UDP over TCP?

A

if application is senstive to delays, despite possible higher packet loss

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

Explain the TCP Three-way Handshake

A
  1. TCP client sends connection request, a special segment with no data (SYN = 1)
  2. Server sends back a special “connection-granted” segment (SYNACK)
  3. TCP client sends acknowledgement (SYN = 0)

the network layer is unreliable

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

Explain the TCP connection tear down.

A
  1. TCP client sends special segment with no data (FIN = 1).
  2. Server acknowledges the request to close connection (ACK).
  3. Server sends segment to indicate the connection is closed (FIN=1).
  4. TCP client sends acknowledgment to the server (ACK).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Automatic Repeat Request or ARQ?

A

method that uses acknowledgements and timeouts to determine if a segment was lost or not. Purpose is to achieve reliability

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

What is Stop and Wait ARQ?

A

Sender sends a packet and waits for acknowledgement from the receiver for a specified time (timeout period)

Simplest way to implement ARQ, but low performance

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

What is Go-back-N?

A
  1. Receiver notifies sender of a missing packet by sending an ACK for the most recently received packet
  2. Sender sends ALL packets from the most recently received packet, even if some have been sent before
  3. Receiver discards any out-of-order received packets

Can cause a lot of unnecessary retransmissions, so a sender can send AT MOST N segments without waiting for acknowledgements

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

What is selective ACKing?

A
  1. Sender retransmits only the packets it suspects were received in error
  2. Receiver acknowledges a correctly received packet, even if out of order
  3. Out of order packets are buffered until missing packets received
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is fast retransmit?

A

When a sender receives 3 duplicate ACKs for a packet from the receiver, the sender considers the packet to be lost and will retransmit instead of waiting for timeout

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

What is transmission control, and why do we need to control it?

A

controlling the transmission rate from one host to another. need it for fairness

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

What is flow control, and why do we need to control it?

A

MECHANISM to control the transmission rate to protect the receiver’s buffer from overflowing. helps match the sender’s rate against the receiver’s rate of reading the data. sender uses a receive window - how much data can receiver receive

TCP receiver buffer - checks which packets have not been transmitted

17
Q

What is congestion control?

A

control the transmission rate from sender to avoid congestion in the network

18
Q

What are the goals of congestion control?

A
  1. Efficiency
  2. Fairness (share network bandwidth)
  3. Low delay (avoid buffering)
  4. Fast convergence (despite short or long flow)
19
Q

What is network-assisted congestion control?

A

Relies on network layer (e.g. routers) to provide feedback about congestion in the network

20
Q

What is end-to-end congestion control?

A

Hosts infer congestion from network behavior, NO explicit feedback from the network/router. this is the TCP approach

21
Q

How does a host infer congestion?

A
  1. packet delay (increase in ACKs takes up time)
  2. packet loss (more loss and more congestion)
22
Q

How does a TCP sender limit the sending rate?

A

congestion window that represents the maximum number of unacknowledged data that a sending host can have in transit
TCP uses a probe-and-adapt approach in adapting the congestion window (makes it larger or smaller).
TCP sender cannot send faster than the slowest component, between either the network (congestion window) or the receiving host (receiving window)

23
Q

Explain Additive Increase/Multiplicative Decrease (AIMD) in the context of TCP

A

this is how TCP controls congestion. increases congestion window when congestion is down, decreases window when congestion is up.

Additive Increase: starts at 2, increases window by 1 packet every RTT (round trip time; whenever an ACK is received). increment is proportional to MSS (maximum segment size)
Multiplicative Decrease: when packet loss is detected, window size is halved

congestion window size over time looks like a sawtooth pattern: ^^^^^

24
Q

What is a slow start in TCP?

A

in TCP Reno, this process helps to rapidly increase a new connection’s congestion window from a cold start. Rate = double packet size after each RTT; exponential increase until it hits exponential threshold, then goes back to linear (AIMD)

25
Q

Is TCP fair in the case where connections have the same RTT? Explain.

A

YES - both connections adjust congestion windows at similar pace

26
Q

Is TCP fair in the case where two connections have different RTTs? Explain.

A

NO - connection with smaller RTT will adjust congestion window FASTER (because it’s based on received ACKs); results in unequald bandwidth sharing

27
Q

Explain how TCP CUBIC works

A

uses a cubic function for congestion window growth; aggressive increase in window size in the beginning, then slows down as it approaches MAX window size

28
Q

Explain TCP throughput calculation.

A

BW (bandwidth) < (MSS/RTT)(1/p^1/2)

p = probability loss