Lecture 3

MultiPath TCP (MPTCP)

A device often has multiple interfaces
E.g. a phone with WiFi and Cellular
They do have different IPs

How can we use TCP across multiple paths?

Resilience: Failover from one path to another
Performance: Use multiple interfaces to increase bandwidth
Mobility: Smooth handover when connectivity changes

How to manage multipath TCP?
Control plane to create/remove subflows
Advertise addresses
Set path priorities
How to transport data reliably?

Connection Establishment

3-way sync, with MP_CAPABLE TCP Option
Start initial subflow
Added DSN (Data Sequence Number) field
Also includes a key exchange used in subsequent subflows

Adding a Subflow

Even if Host B knows Host A has a second address A2, it cannot send data there
New subflow requires new TCP connection
Middleboxes will not allow data without SYN, need another 3-way handshake

Data Transfer

There are two levels of sequence number
The one for the entire bytestream (DSN)
One per subflow (sn)
Pasted image 20260210114512.png|400
Packet 2 goes through the bottom subflow
sn per subflow, DSN is global

Retransmission

When no ACK is received before the RTO, the packet will be re-sent
This can be on the same subflow, but it does not have to be

Flow Control

Each subflow is a normal TCP connection
Per subflow seq. numbers and ACKs
MPTCP adds a connection-level Data Sequence Number (DSN) and a cumulative Data ACK
Receiver often uses 1 buffer for the connection
Advertised rwnd is shared across subflows

Congestion Control

Uncoupled CC: Each subflow runs its own CC
Coupled CC: MPTCP couples the CC parameters, to move traffic away from the congested path

Goals

Fairness: use the same capacity as normal TCP, no matter how many flows through the same bottleneck
Efficiency: send all its traffic on the least congested path (scheduling)
Scheduling can be e.g. minRTT or round-robin
Performance: perform as least as well as TCP

Linked Increase Algorithm CC

Use the same slow-start, fast retransmit and fast recovery from Reno
Maintain a cwnd per path
Increase cwnd for each ACK by: Pasted image 20260210115906.png|400
Increase less-congested flows more than congested ones

LIA Example

Pasted image 20260210120132.png

https://www.youtube.com/watch?v=Wp0Kr3B64tA

Quality of Service (QoS)

What mechanisms can we use to meet the requirements of the application(s)

A network operator needs to transport various types of traffic, with different needs
Some care about delay (e.g. VoiP)
Some care about bandwidth (e.g. video streams)

A set of techniques to ensure that various types of traffic are delivered with the level of performance that meets the application requirements

QoS != QoE

QoS = performance of packet transport
Quality of experience is more subjective
Also depends on the application
Is impacted by QoS

Performance Metrics

How is QoS enforced?

Router has two key functions:
Run routing algorithms (RIP, OSPF, BGP)
Forward packets, based on routing choices
Pasted image 20260213102413.png|400
Each input port:

  1. Receives the physical signal
  2. Runs the link layer protocol
  3. Does the lookup and forwarding, or queue if the packets are arriving faster than they can be passed on into the switch fabric

Switching Fabrics

Transfer packets from input buffer to correct output buffer
Switching rate: max rate at which packets can be transferred from input to output
Switching rate is N times line rate of a single port to avoid blocking
Pasted image 20260213102648.png|400

Input Port Queueing

Fabric slower than input ports combined: packets queue up, and might be lost due to input buffers being full
Output port contention: if multiple ports target the same output, they will have to queue
Head-of-the-line (HOL) blocking: queued IP packets block those behind from being transmitted
(e.g. the first packet in the queue needs to wait due to output port contention, but those behind target a different port)

FIFO queue

Simple queue
Packets arriving when the buffer is full, get discarded
May be discarded before the buffer is full, according to some discard policy
Alternatively, packets may be marked (if %full>50, then mark), like in ECN

Scheduling Multiple Queues

Not all traffic should be treated the same
A classifier determines what queue a packet should go into
A scheduler serves queues according to some policy

Strict Priority: always serve more important queues first
Weighted Round Robin: do round robin, but put the more important queues in there multiple times, according to their weight (empty queues are skipped = work conserving scheduler)
When dividing based on packet size, you get an unequal distribution, as not all packet sizes are equal
Instead use Weighted Deficit Round Robin, which gives divides based on bytes, instead of number of packets (runs into issues when packets are bigger than credit)
Fair Queueing: approximate bit-based round robin
Compute virtual finish time for each packet, based on clock ticks per bit sent
Send packets in order of finish time
Pasted image 20260213104705.png

Todo

there's more slides on Fair Queueing + wtf is it

Types of QoS

Fine-grained control: QoS to specific applications or flows
Coarse-grained control: QoS to large classes of traffic

Classification

Classify based on certain bits in the packet header

Differentiated Services Code Point (QoS Class): DSCP

IntServ

Guarantee QoS per flow
Use path signalling
Sender sends traffic specification (Tspec) message, path sets up flow state
RESV message:
Carries FlowSpec
Check in each node in the path if enough resources are available
Install reservation state
Send packets according to requirements
State needs to be maintained in each router

DiffServ

Defines per-hop behaviour
Three main classes:

QoS enablers, what can routers do?

Change packet headers (e.g. DSCP, ECN)
Accept, delay or discard packets
Schedule packets

Unresponsive Flows

Those that do not respond to congestion messages
Token Bucket: a counter that builds up credit for saving data
Token accumulation rate r
Burst tolerance/bucket size b
Leaky bucket: a counter instead of a queue
Arrival rate R, the bucket empties, output rate equal to arrival rate
Arrival rate >R, the bucket is non-empty, output rate is R, excess packets are dropped

Policing vs Shaping

Pasted image 20260213110244.png

Responsive Flows, Active Queue Management (AQM)

A.k.a, TCP and QUIC
Active = do not wait until the queue is full, act earlier

Tail Drop

Drop packets when queue is full
Does not handle burst traffic well
But most internet traffic is 'bursty'
All TCP connections experience packet loss, and react at the same time
Congestion repeats periodically as all TCP connections scale back up
Creates a standing queue
Keep increasing cwnd until loss
React to congestion
Partially empty queue
Rinse and repeat
(Buffer will never be empty, there is always delay)

Random Early Detection (RED)

Based on queue fill
Set a probability to drop random packets
fill<minThresh, don't drop
minThresh<fill<maxThresh randomly drop
fill<maxThresh drop all incoming

Proportional Integral Enhanced)

Based on queuing delay
Estimate queuing delay D=Q/C
Drop or mark packet with probability