Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows...

56
Part1: Lecture 3 Beyond TCP

Transcript of Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows...

Page 1: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Part1: Lecture 3 !Beyond TCP!

Page 2: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Summary of last time!

TCP congestion control

Slow startCongestion avoidanceFast retransmitFast recovery

BDP and effect on flow control

What is congestion?

TCP options

SACKs

TCP flavours

Page 3: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Congestion control !

Page 4: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Summary!

timeout ssthresh = cwnd/2 cwnd = 4 KBytes dupACKcount = 0 retransmit missing segment

Λcwnd > ssthresh

congestion avoidance

cwnd = cwnd + MSS (MSS/cwnd) dupACKcount = 0 transmit new segment(s), as allowed

new ACK .

dupACKcount++

duplicate ACK

fast recovery

cwnd = cwnd + MSS transmit new segment(s), as allowed

duplicate ACK

ssthresh= cwnd/2 cwnd = ssthresh + 3

retransmit missing segment

dupACKcount == 3

timeout ssthresh = cwnd/2 cwnd = 1 dupACKcount = 0 retransmit missing segment

ssthresh= cwnd/2 cwnd = ssthresh + 3MSS retransmit missing segment

dupACKcount == 3 cwnd = ssthresh dupACKcount = 0

New ACK

slow start

timeout ssthresh = cwnd/2 cwnd = 1 MSS dupACKcount = 0 retransmit missing segment

cwnd = cwnd+MSS dupACKcount = 0 transmit new segment(s), as allowed

new ACK dupACKcount++

duplicate ACK

Λcwnd = 4Kbytes ssthresh = rwnd dupACKcount = 0

New ACK!

New ACK!

New ACK!

Page 5: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Open problems!Performance, performance, performance. !!•  How do we achieve consistent performance for end nodes on

low-end devices?!•  How do we achieve better performance for nodes that have

multiple interfaces? !•  Is UDP the way to go?!

Page 6: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Test Time!

Page 7: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Instructions!1.  Group according to the topics you have read.!2.  Use the guidelines sheet to prepare the presentation. !3.  Be ready to deliver 10 (content) slides.!

Grading.!There are 4 grades available: 7,8,9 and 10. !Every group and the lecturer will rank the other presentations based:!-  On clarity!-  Learning outcome!Cumulative rank will determine the grade. !

Page 8: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Bufferbloat: instructions!•  What is the role of buffers in routers and switches? !•  What is bufferbloat? !•  When was it noticed for the first time? !•  What are the consequences for applications? !•  What is optimal sizing of buffers? !

Page 9: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP: instructions !•  What are the main features of SCTP? !•  What are the main differences compared to TCP?!•  How are data transmitted between end points? !•  How are multiple paths used in SCTP? !

Page 10: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

MPCTP: instructions!•  Why is MPTCP needed? !•  How does MPTCP establish and terminates connections?!•  How does MPTCP handle the transmission of data across

subflows?!•  How does MPTCP handle the receive window and the

congestion window?!

Page 11: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

QUIC: instructions !•  How and for what reasons QUIC originated?!•  What are its distinguishing features? !•  How does the protocol establish connection? !•  How does the protocol transport data? !•  What are the security considerations taken in developing the

protocol?!

Page 12: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Pause !

Page 13: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Bufferbloat!

An introduction offered to you by: !!

Page 14: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

BufferbloatAdvanced Networking 09/04/2016

A. SiretaY. SinghS. HermansJ. SchutrupJ. van LeurA. Tatar

Page 15: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Role of buffers

● Used before bottleneck links● Avoid dropping packets

Page 16: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

What is bufferbloat? (1/2)

“Bufferbloat is the undesirable latency that comes from the existence of excessively large (bloated) buffers in systems, particularly network communication systems.” - J. Gettys

Page 17: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

What is bufferbloat? (2/2)

1. TCP stream starts sending traffic2. Large buffer on bottleneck node starts filling up3. TCP does not notice packet loss, increases CWND4. Large buffer is completely filled5. Packet loss is only detected when buffer is full6. Huge delay and jitter 7. Throughput is bad

Page 18: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Consequences for applicationMission-critical applications and services suffer from Bufferbloat:

● DNS - adding hundreds of ms of latencies to turning a website into an IP address is not good. With a typical web page doing dozens, even hundreds of DNS lookups, DNS not getting through in a timely fashion results in vastly slower browsing.

● VOIP - needs about a single packet per 10ms flow in order to be good, and less than 30ms jitter.● Gamers will get fragged a lot more often with latencies above their twitch factor.

DiffServ does not solve the problem.

● multiple independent buffers (queues). ● ...but independently susceptible to bufferbloat.

Page 19: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Mitigation

● Optimal buffer sizing● Active Queue Management

○ Controlled Delay (CoDel)

● Smaller buffers○ DOCSIS - Smaller modem buffer movement○ Endpoints

● End-to-end bandwidth traffic shaping● Replacing FIFO queue with round-robin multiple queues

Page 20: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Thank you for your attention

Questions?

Page 21: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP !

An introduction offered to you by: !

Page 22: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTPSorry, no musical :(

Page 23: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Background- Strong convergence PSTNs, ISDN and IP-based networks- Boom in IP telephony or VOIP- Need for SS7 signaling messages (setup and teardown messages...)

Problem?

● To achieve IP telephony transporting raw voice streams over IP not enough● Need of transport protocol that satisfies stringent requirement of SS7 (billing

info, teardown/setup messages etc.)○ Reliable and Timely delivery○ Availability○ No out of order delivery○ ...

Page 24: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

TCP Problems- Head of line blocking

- Link failure loses connection

- SYN attacks

- Half open connections

Page 25: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP features - Multiple streams- Message oriented

- Pair of sequence numbers, partial ordering

- Streams are independent

Page 26: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP features - Multi-homing- Multiple IP addresses, one primary

- Single port number

- Backup paths

- No load sharing

- Primary used during association, for security reasons

Page 27: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total
Page 28: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP features - Cookies- Do not store the Transmission Control Block

- Store it at the client side

- A valid client returns the cookie

- Rebuild the TCB based on the cookie

Page 29: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP features - shutdown- Graceful shutdown

- Also possible to abort in case of an error

- So, no half-open connections

Page 30: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

SCTP adoption- TCP established itself as the common connection-oriented protocol

- Any application that is written today to use TCP will need to be modified to work with SCTP

- SCTP traffic denied by middleboxes

Page 31: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Multipath TCP !

An introduction offered to you by: !

Page 32: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Multipath TCPFrom Theory to Practice

Page 33: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Introduction● Hosts with multiple interfaces (3G, WiFi).● 95% of internet connections driven by TCP.● Network layer solutions: shim6 and Host Identity Protocol (HIP).● Several TCP extensions.● Stream Control Transmission Protocol (SCTP) with several extensions.

Page 34: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Introduction● Hosts with multiple interfaces (3G, WiFi).● 95% of internet connections driven by TCP.● Network layer solutions: shim6 and Host Identity Protocol (HIP).● Several TCP extensions.● Stream Control Transmission Protocol (SCTP) with several extensions.

Multi-homing problem still unsolved.Many of them are experimental, or have not been implemented or deployed.

Page 35: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Why multipath TCP?● Can operate at multiple interfaces.● If one subflow times out or has congestion the other subflow still works.● Maximises the resource usage.

Page 36: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Handshaking and flow managementClient and servers have to be aware of MPTCP support:

● The client sends a SYN-segment with MP_CAPABLE option.● The server replies with a SYN+ACK-segment with MP_CAPABLE option.

Other interfaces are advertised using segments with the ADD_ADDR option.

Subflows can be established using the SYN and SYN+ACK sequence using the MP_JOIN option.

Page 37: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

More on subflows● Subflows are similar to TCP connections with a local 32-bit sequence number.● Important to traverse complex middle-boxes like traffic normalizers and

transparent proxies.● Multi-path TCP maintains a global 64-bit sequence number.● DSN_MAP option used to map between the two sequence numbers.● TCP cumulative and selective ACKs are used to ACK subflows.● DSN_ACK option used to provide cumulative ACKs on the data sequence level.

Page 38: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Congestion and fairness● MPTCP must be fair to regular TCP connections:

○ With regular TCP congestion control schemes for each subflow it would demand more bandwidth than regular TCP.

○ MPTCP fairness rules:■ MPTCP must allow other TCP sessions to take precedence.■ Subflows must not slow down regular TCP flows.

● Solution: Coupled Congestion Control:○ Uses total of the congestion window of all subflows.○ Implementation in the Linux kernel can only use integer math.

■ Solution: limit the amount of divisions and use scaling factors.

Page 39: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Linux MPTCPThe Architecture has three elements:

1. Master subsocket2. Multi-path control block3. Slave subsocket

Page 40: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Connection Establishment1. The initiator establishes an Initial connection.2. Learn from the peer the set of addresses.3. Try to establish subflows on every known path to the peer.4. Use the token-based hash table lookup to find mpcb.5. Append the new half-open socket in the accept queue.6. Add the subsocket to the active subsockets list when it is established.

Page 41: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Scheduling and sending data● The scheduler tries to fill all subflows.● The scheduler must deal with the number of contiguous bytes that are sent over

the same subflow before moving to the next one.

First Implementation: whenever an application performs a sendmsg() system call or equivalent, the scheduler is invoked and data is immediately pushed to a specific subflow.

Second Implementation: A connection-level send buffer is used where subflows pull data from it whenever they receive an acknowledgement.

Page 42: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Receive data1. Receive data at the subflow level, and reorder it according to the 32-bits subflow

sequence numbers. 2. Reorder the data at the connection level by using the data sequence numbers, and

finally deliver it to the application. 3. The multipath control block maintains a connection level COPIED_SEQ and a

RCV.NXT pointer, to track the next byte to deliver to the application and the next expected data sequence number that is used when returning a DATA_ACK option.

4. A single connection-level receive queue is use in order to store data until the application asks for it.

Page 43: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Evaluation● Coupled Congestion Control:

○ Is fair to other TCP sessions:■ MPTCP allows other TCP sessions to take precedence.■ Subflows do not slow down regular TCP flows.

○ MPTCP-reno worse than MPTCP-CCC.

- Variable # of TCP connections - 1 MPTCP connection with 2 subflows- More TCP connections should result in less bandwidth for MPTCP

- Variable # of MPTCP subflows - 1 TCP connection

- More MPTCP subflows should not result in more bandwidth for the MPTCP connection

Page 44: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Evaluation● Receive buffers:

○ MPTCP may require large receive buffers (head-of-line blocking problem).

● Delay:○ Only affects MPTCP in extreme cases (500 ms & receive buffer < 8 MB).

● Packet loss:○ Other subflows impacted at => 4% loss of one subflow.

● MSS:○ MSS of 1400 bytes can saturate a 1 Gb link.○ MSS of 4500 bytes can saturate two 1 Gb links.

● Improvements:○ Specialised segment reordering algorithm.○ TCP segment offloading.○ Take performance of each path into account (drop low performance paths).

Page 45: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

QUIC!

An introduction offered to you by: !

Page 46: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

QUIC

● TCP + TLS + HTTP/2

● Implemented on the top of UDP in the application layer

Page 47: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

QUIC:The motivation

● Connection oriented applications performance improvement

● Reduction of the transport latency● Need for the new protocol ASAP● Built on top of existing protocol stacks

Page 48: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Features

● Reliable UDP multiplexed protocol

● Zero RTT handshake

● Security layer integrated into the protocol

● Flexible congestion control

● Forward Error Correction

● SACKs and NACKs

● No head-of-line blocking

Page 49: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Features

Page 50: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Features

Page 51: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Connection establishment

● The handshake is required only on the very first time when client connects to the server

● The (client, server) tuple agreed during the handshake is cached and can be used for the future connections

Page 52: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Connection establishment

● http://blog.chromium.org/2015/04/a-quic-update-on-googles-experimental.html

Page 53: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Data transport

● Multiplexed (Streams concept)

● All data (payload) are being encrypted

● Header is often encrypted too

● Highly integrated with HTTP/2

● Uses Connection ID → migration proof (immune to IP address changes etc.)

Page 54: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Security considerations

● Everything is encrypted → middleware boxes can not temper with the the data

● Some parts of packet header not encrypted but still authenticated

● DoS mitigation – server can challenge the client for more info.

● Workload is placed to the client

Page 55: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Home readings!

For the test on Apr. 12 read: !!

J. Glasmann et al., !"Service architectures in H.323 and SIP: A comparison," !

in IEEE Communications Surveys & Tutorials, vol. 5, no. 2, pp. 32-47, Fourth Quarter 2003 !!

http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=5341337!!

Page 56: Part1: Lecture 3 Beyond TCP · MPTCP must allow other TCP sessions to take precedence. Subflows must not slow down regular TCP flows. Solution: Coupled Congestion Control: Uses total

Literature !See readings per topic on: !https://www.os3.nl/2015-2016/courses/an/coursematerial?&#lecture_friday_8th!