Peer-to-Peer Networks 13 Internet – The Underlay Network

Slides:



Advertisements
Similar presentations
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
Advertisements

Computer Networks Transport Layer. Topics F Introduction (6.1)  F Connection Issues ( ) F TCP (6.4)
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
1 TCP Congestion Control. 2 TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement.
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Transport Layer 3-1 outline r TCP m segment structure m reliable data transfer m flow control m congestion control.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
Transport Layer 3-1 Outline r TCP m Congestion control m Flow control.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
TCP in Heterogeneous Network Md. Ehtesamul Haque # P.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
Transport Layer TCP and UDP IS250 Spring 2010
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Transport Layer Computer Networks. 2 Where are we?
Transport Layer 4 2: Transport Layer 4.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
1 Transport Layer Lecture 7 Imran Ahmed University of Management & Technology.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
What is TCP? Connection-oriented reliable transfer Stream paradigm
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
81 Sidevõrgud IRT 0020 loeng okt Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
ECE 4110 – Internetwork Programming
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 4th edition. Jim Kurose, Keith Ross Chapter.
TCP Lecture 4.
Transport Layer CS 381 3/7/2017.
Chapter 3 outline 3.1 transport-layer services
COMP 431 Internet Services & Protocols
Introduction to Congestion Control
Transmission Control Protocol (TCP)
TCP.
TCP.
Internet and Intranet Protocols and Applications
Transport Layer Unit 5.
Chapter 17. Transport Protocols
CS4470 Computer Networking Protocols
TCP Congestion Control
TCP Overview.
Transport Layer: Congestion Control
TCP flow and congestion control
Transport Layer 9/22/2019.
Presentation transcript:

Peer-to-Peer Networks 13 Internet – The Underlay Network Christian Schindelhauer Technical Faculty Computer-Networks and Telematics University of Freiburg

Data/Packet Encapsulation Stevens, TCP/IP Illustrated 2

Network Congestion (Sub-)Networks have limited bandwidth Injecting too many packets leads to network congestion network collapse Source B Gigabit Ethernet 2 Mbps DSL Link Gigabit Ethernet Destination Buffer overflow Source A 3

Congestion and capacity 4

Congestion Prevention 5

Congestion Prevention by Routers IP Routers drop packets Tail dropping Random Early Detection Source B Gigabit Ethernet 2 Mbps DSL Link X Gigabit Ethernet Destination X X Source A Packet deletion 6

Random early detection (RED) Packet dropping probability grows with queue length Fairer than just “tail dropping”: the more a host transmits, the more likely it is that its packets are dropped P(drop) 1.0 MaxP MinTh MaxTh AvgLen 7

The Transport Layer TCP (Transmission Control Protocol connection-oriented delivers a stream of bytes reliable and ordered UDP (User Datagram Protocol) delivery of datagrams connectionless, unreliable, unordered App Net Link Phy Router Host Trans end-to-end connection 8

TCP vs. UDP X X TCP reduces data rate UDP does not! UDP UDP TCP TCP Source B Gigabit Ethernet Destination B 2 Mbps DSL Link TCP TCP X Gigabit Ethernet X Source A Destination A 9

UDP-Header Port addresses Length data + header length Checksum for parallel UDP connections Length data + header length Checksum for header and data 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | Source | Destination | | Port | Port | | | | | Length | Checksum | | | data octets ... +---------------- ... 10

The Transmission Control Protocol (TCP) Connection-oriented Reliable delivery of a byte stream fragmentation and reassembly (TCP segments) acknowledgements and retransmission In-order delivery, duplicate detection sequence numbers Flow control and congestion control window-based (receiver window, congestion window) challenge: IP (network layer) packets can be dropped, delayed, delivered out-of- order ... 11

TCP-Header Sequence number Acknowledge number Port addresses number of the first byte in the segment bytes are numbered modulo 232 Acknowledge number activated by ACK-Flag number of the next data byte = last sequence number + last amount of data Port addresses for parallel TCP connections TCP Header length data offset Check sum for header and data 12

TCP Connections Connection establishment and teardown by 3-way handshake Connection establishment Connection termination Host 1 Host 2 Host 1 Host 2 13

Flow control and congestion control [Tanenbaum, Computer Networks] 14

Flow Control acknowledgements and window management 15

Network Retransmissions Retransmissions are triggered, if acknowledgements do not arrive ... but how to decide that? Measurement of the round trip time (RTT) Network DATA ACK 16

Retransmissions and RTT Sender Receiver DATA Round Trip Time ACK DATA X Retransmission after timeout DATA 17

Estimation of the Round Trip Time (RTT) If no acknowledgement arrives before expiry of the Retransmission Timeout (RTO), the packet will be retransmitted RTT not predictable, fluctuating RTO derived from RTT estimation: RFC 793: (M := last RTT measurement) RTT ← α RTT + (1-α) M, where α = 0,9 RTO ← β RTT, where β = 2 Alternative by Jacobson 88 (using the deviation D): D ← α’ D + (1-α’) |RTT - M| RTT ← α RTT + (1-α) M RTO ← RTT + 4D 18

TCP - Algorithm of Nagle How to ensure small packages are shipped fast yet, large packets are preferred Algorithm of Nagle Small packets are not sent, as long as acks are still pending Package is small, if data length <MSS when the acknowledgment of the last packet arrives, the next one is sent Example: terminal versus file transfer versus ftp Feature: self-clocking: Quick link = many small packets slow link = few large packets 19

Congestion revisited X IP Routers drop packets TCP has to react, e.g. lower the packet injection rate X 2 Mbps DSL Link Destination Source B Source A Gigabit Ethernet Packet deletion TCP 20

Congestion revisited ? ? ? from a transport layer perspective: App App Trans Trans Net Net Net Net Net Net Congestion! Link Link Link Link Link Link Phy Phy Phy Phy Phy Phy Host Router Router Host from a transport layer perspective: ? ? App App ? Trans Trans no ACKs received Net Net Net Net Net Net Link Link Link Link Link Link Phy Phy Phy Phy Phy Phy Host Router Router Host 21

Data rate adaption and the congestion window Sender does not use the maximum segment size in the beginning Congestion window (cwnd) used on the sender size sending window: min {wnd,cwnd} (wnd = receiver window) S: segment size Initialization: cwnd ← S For each received acknowledgement: cwnd ← cwnd + S ...until a packet remains unacknowledged Segment 1 ACK: Segment 1 Segment 2 Segment 3 ACK: Segment 3 Segment 4 Receiver Sender Segment 5 Segment 6 Segment 7 ACK: Segment 5 ACK: Segment 7 Segment 8 Segment 9 Segment 10 … 22

Slow Start of TCP Tahoe slow start 23

TCP Tahoe’s slow start TCP Tahoe, Jacobson 88: Congestion window (cwnd) Slow Start Threshold (ssthresh) S = maximum segment size Initialization (after connection establishment): cwnd ← S ssthresh ← 65535 If a packet is lost (no acknowledgement within RTO): multiplicative decrease of ssthresh cwnd ← S ssthresh ← If a segment is acknowledged and cwnd ≤ ssthresh then slow start: cwnd ← cwnd + S If a segment is acknowledged and cwnd > ssthresh, then cwnd ← cwnd + S/cwnd x: # Packets per RTT x ← 1 y ← max x ← 1 y ← x/2 x ← 2⋅x, until x = y x ← x +1 24

Fast Retransmit and Fast Recovery TCP Tahoe [Jacobson 1988]: If only one packet is lost retransmit and use the rest of the window Slow Start Fast Retransmit after three duplicate ACKs, retransmit Packet, start with Slow Start TCP Reno [Stevens 1994] After Fast Retransmit: ssthresh ← min(wnd,cwnd)/2 cwnd ← ssthresh + 3 S Fast recovery after Fast retransmit Increase window size by each single acknowledgement cwnd ← cwnd + S Congestion avoidance: if P+x is acknowledged: cwnd ← ssthresh y ← x/2 x ← y + 3 25

The AIMD principle TCP uses basically the following mechanism to adapt the data rate x (#packets sent per RTT): Initialization: on packet loss: multiplicative decrease (MD) if the acknowledgement for a segment arrives, perform additive increase (AI) x ← 1 x ← x/2 x ← x +1 26

AIMD additive increase multiplicative decrease 27

Throughput and Latency knee cliff Congested situation (cliff): high load low throughput all data packets are lost Desired situation (knee): high throughput few data packets get lost max. bandwidth throughput (packets delivered) latency load (packets sent) 28

Vector diagram for 2 participants b b: max. available bandwidth fairness data rate of A optimal data rate efficiency data rate of B b 29

AIAD Additive Increase/ Additive Decrease fairness data rate of A AD efficiency data rate of B

MIMD: Multiplicative Incr./ Multiplicative Decrease fairness data rate of A MD efficiency data rate of B 31

AIMD: Additively Increase/ Multiplicatively Decrease fairness data rate of A MD efficiency data rate of B 32

TCP - Conclusion Connection-oriented, reliable, in-order delivery of a byte stream Flow control and congestion control Fairness among TCP streams Unfair behavior of other protocols, e.g. UDP Impact on latency Tweaking the congestion avoidance mechanism has an impact on other applications 33

Peer-to-Peer Networks 13 Internet – The Underlay Network Christian Schindelhauer Technical Faculty Computer-Networks and Telematics University of Freiburg