Distributed Systems 11. Transport Layer

Slides:



Advertisements
Similar presentations
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
Advertisements

Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 6 Transport Layer.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
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.
Transport Layer 3-1 Outline r TCP m Congestion control m Flow control.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
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.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Gursharan Singh Tatla Transport Layer 16-May
The Transport Layer.
1 Transport Layer Computer Networks. 2 Where are we?
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.
Transport Layer Chapter 6 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Transport Service Elements of Transport.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
Networking Basics CCNA 1 Chapter 11.
Transport Layer Chapter 6 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Transport Service Elements of Transport.
Transport Layer Chapter 6 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Transport Service Elements of Transport.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
Congestion Control: UDP. What is Congestion Control? Refers to the management of packet loss and signal degradation Handled by both Network and Transport.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
Distributed Systems 8. Transport Layer Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2014/2015.
Distributed Systems 12. Transport Layer Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2015/2016.
Chapter 6 The Transport Layer
Introduction to Networks
The Transport Layer Implementation Services Functions Protocols
The Transport Layer Congestion Control & UDP
Chapter 9: Transport Layer
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Unit-7 The Transport Layer.
Chapter 3 outline 3.1 Transport-layer services
Instructor Materials Chapter 9: Transport Layer
Chapter 3 outline 3.1 transport-layer services
Introduction to Networks
COMP 431 Internet Services & Protocols
5. End-to-end protocols (part 1)
Process-to-Process Delivery, TCP and UDP protocols
Process-to-Process Delivery
06- Transport Layer Transport Layer.
PART 5 Transport Layer Computer Networks.
Chapter 6: Transport Layer (Part I)
Magda El Zarki Professor, ICS UC, Irvine
Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
CS 1652 Jack Lange University of Pittsburgh
Introduction to Networks
Introduction of Transport Protocols
Congestion Control, Internet transport protocols: udp
Transport Layer Unit 5.
Transport Layer Our goals:
Transport Layer Chapter 6
September 19th, 2013 CS1652 Jack Lange University of Pittsburgh
Process-to-Process Delivery:
Congestion Control, Internet Transport Protocols: UDP
Process-to-process delivery UDP TCP SCTP
Transport Protocols: TCP Segments, Flow control and Connection Setup
Chapter 5 Transport Layer Introduction
Transport Layer: Congestion Control
The Transport Layer Chapter 6.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Chapter 3 Transport Layer
Transport Layer 9/22/2019.
Transport Layer Our goals:
Presentation transcript:

Distributed Systems 11. Transport Layer Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2016/2017

Notes Youtube Pakete? UDP, RTP https://ask.wireshark.org/questions/5597/how-to- capture-traffic-from-youtube

Transport Layer Transport Service Elements of Transport Protocols Internet Protocols – UDP Internet Protocols – TCP

The Transport Layer Responsible for delivering data between applications across networks with the desired reliability or quality 2 differences to network layer? Physical Link Network Transport Application

Services Provided to the Upper Layers (1) Transport layer adds reliability to the network layer Offers connectionless (e.g., UDP) and connection- oriented (e.g, TCP) service to applications Adds multiplexing via ports Congestion-handling Flow-control

Elements of Transport Protocols Transport Service Elements of Transport Protocols Adressing Connection handling Flow control Congestion control Internet Protocols – UDP Internet Protocols – TCP

Addressing Transport layer adds ports Multiple clients and servers can run on a host with a single network (IP) address Analogy: Office numbers Connections are differentiated by quadruple of source and destination IPs and ports)

Network address translation (NAT) NAT (Network Address Translation) box maps one external IP address to many internal IP addresses Uses TCP/UDP port to tell connections apart How can two machines connect to the same webserver? How can we set up our own web/game server? http://stackoverflow.com/questions/1982222/how-do-two-computers-connect-to-same-external-address-through-nat

Connection Establishment (1) Key problem is to ensure reliability even though packets may be lost, corrupted and duplicated Don’t treat an old or duplicate packet as new (Use ACKs and checksums for loss/corruption) Approach: Don’t reuse sequence numbers within 2 minutes Three-way handshake for establishing connection

Connection Establishment (2) Three-way handshake used for initial packet Since no state from previous connection Both hosts contribute fresh seq. numbers CR = Connect Request

What if we used a simpler connection setup? Three-way handshake protects against odd cases: Duplicate CR. Spurious ACK does not connect Duplicate CR and DATA. Same plus DATA will be rejected (wrong ACK). a) X b) X X

Flow vs. congestion control Sender may need to slow down for different reasons: Flow control, when the receiver is not fast enough Congestion control, when the network is not fast enough

Flow Control (1) Foundation for flow control is a sliding window with checksums and retransmissions Flow control manages buffering at sender/receiver Issue is that data goes to/from the network and applications at different times Window tells sender available buffering at receiver Makes a variable-size sliding window

Flow Control (2) Flow control example: A’s data is limited by B’s buffer 1 2 3 4 5 6 7 8 9 10 B’s Buffer

Congestion Control Two layers are responsible for congestion control: Transport layer, controls the offered load [here] Network layer, experiences congestion [previous lecture]

Desirable Bandwidth Allocation Efficient use of bandwidth gives high goodput, low delay Goodput rises more slowly than load when congestion sets in Delay begins to rise sharply when congestion sets in

Regulating the Sending Rate Different congestion signals the network may use to tell the transport endpoint to slow down (or speed up)

Regulating the Sending Rate (3) If two flows increase/decrease their bandwidth in the same way when the network signals free/busy they will not converge to a fair allocation + /– constant +/– percentage

Magic solution: Additive increase, multiplicative decrease Increase: +10 Decrease: -20% Let’s try it. Suppose A, B and C share a link. Sender A starts with 70% link utilization, Sender B with 20%, Sender C with 0%. All would like to use as much as possible bandwidth.

Regulating the Sending Rate (4) The AIMD (Additive Increase Multiplicative Decrease) control law does converge to a fair and efficient point! TCP uses AIMD for this reason User 1’s bandwidth User 2’s bandwidth

In Java

MIAD Does it work?

Wireshark and packet sniffing…

Internet Protocols – UDP Transport Service Elements of Transport Protocols Internet Protocols – UDP Internet Protocols – TCP

Introduction to UDP (1) UDP (User Datagram Protocol) is a minimal extension on top of IP Header has ports (TSAPs), length and checksum.

Wireshark…

Real-Time Transport (1) RTP (Real-time Transport Protocol) provides support for sending real-time media over UDP Often implemented as part of the application Application also takes care of buffering (jitter)

Real-Time Transport (2) RTP header contains fields to describe the type of media and synchronize it across multiple streams

Internet Protocols – TCP Transport Service Elements of Transport Protocols Internet Protocols – UDP Internet Protocols – TCP

The TCP Service Model (1) TCP provides applications with a reliable byte stream between processes; it is the workhorse of the Internet Popular servers run on well-known ports

The TCP Service Model (2) Applications using TCP see only the byte stream [right] and not the segments [left] sent as separate IP packets Four segments, each with 512 bytes of data and carried in an IP packet 2048 bytes of data delivered to application in a single READ call

Wireshark…

The TCP Segment Header TCP header includes addressing (ports), sliding window (seq. / ack. number), flow control (window), error control (checksum) and more.

TCP Connection Establishment TCP sets up connections with the three-way handshake Release is symmetric

TCP Sliding Window TCP adds flow control to the sliding window as before WIN is window size

TCP Timer Management TCP estimates retransmit timer from segment RTTs Tracks both average and variance Timeout is set to average plus 4 x variance LAN case – small, regular RTT Internet case – large, varied RTT

TCP Congestion Control (1) TCP uses AIMD with loss signal to control congestion Implemented as a congestion window (cwnd) for the number of segments that may be in the network Congestion window controls the sending rate Rate is cwnd / RTT; window can stop sender quickly Cwnd typically much smaller than flow control window (WIN)

TCP Congestion Control (2) Slow start grows congestion window exponentially by sending increasing cwnd with every ACK Increment cwnd for each new ACK

TCP Congestion Control (3) Additive increase grows cwnd slowly Adds 1 every RTT ACK

TCP Congestion Control (4) Slow start followed by additive increase (TCP Tahoe) Threshold is half of previous loss cwnd Loss causes timeout; so slow-start again Is this AIMD?

TCP Congestion Control (7) SACK (Selective ACKs) extend ACKs with a vector to describe received segments and hence losses Allows for more accurate retransmissions / recovery No way for us to know that 2 and 5 were lost with only ACKs Negotiated at connection setup, whether both hosts support it

Learned today Adressing with ports TCP versus UDP TCP: 3-way-handshake and why Sliding window for flow control Congestion control using AIMD I'd tell you a UDP joke, but you might not get it.