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

Post on 13-Jul-2020

5 views 0 download

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

Part1: Lecture 3 !Beyond TCP!

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

Congestion control !

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!

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?!

Test Time!

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. !

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? !

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? !

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?!

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?!

Pause !

Bufferbloat!

An introduction offered to you by: !!

BufferbloatAdvanced Networking 09/04/2016

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

Role of buffers

● Used before bottleneck links● Avoid dropping packets

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

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

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.

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

Thank you for your attention

Questions?

SCTP !

An introduction offered to you by: !

SCTPSorry, no musical :(

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○ ...

TCP Problems- Head of line blocking

- Link failure loses connection

- SYN attacks

- Half open connections

SCTP features - Multiple streams- Message oriented

- Pair of sequence numbers, partial ordering

- Streams are independent

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

- Single port number

- Backup paths

- No load sharing

- Primary used during association, for security reasons

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

SCTP features - shutdown- Graceful shutdown

- Also possible to abort in case of an error

- So, no half-open connections

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

Multipath TCP !

An introduction offered to you by: !

Multipath TCPFrom Theory to Practice

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.

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.

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.

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.

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.

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.

Linux MPTCPThe Architecture has three elements:

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

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.

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.

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.

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

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).

QUIC!

An introduction offered to you by: !

QUIC

● TCP + TLS + HTTP/2

● Implemented on the top of UDP in the application layer

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

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

Features

Features

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

Connection establishment

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

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.)

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

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!!

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