Chapter 5 Peer-to-Peer Protocols and Data Link Layer Timing Recovery.

Slides:



Advertisements
Similar presentations
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 20 – Transport Protocols.
Advertisements

Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Transportation Layer (2). TCP full duplex data: – bi-directional data flow in same connection – MSS: maximum segment size connection-oriented: – handshaking.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transmission Control Protocol (TCP)
Transportation Layer. Very similar to the data link layer. – two hosts connected by a link or two hosts connected by a network differences: – When two.
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
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.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Layer3-1 Summary of Reliable Data Transfer Checksums help us detect errors ACKs and NAKs help us deal with errors If ACK/NAK has errors sender.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols 5.1 Peer-to-Peer Protocols and Service Models 5.2 ARQ Protocols and.
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
Chapter 3 outline 3.1 transport-layer services
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer Transport Layer: TCP. Transport Layer 3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer3-1 Data Communication and Networks Lecture 7 Transport Protocols: TCP October 21, 2004.
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.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
Process-to-Process Delivery:
The Transport Layer.
1 Transport Layer Computer Networks. 2 Where are we?
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
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.
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 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols Peer-to-Peer Protocols and Service Models ARQ Protocols and Reliable.
1 End-to-End Protocols (UDP, TCP, Connection Management)
81 Sidevõrgud IRT 0020 loeng okt Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
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.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
09-Transport Layer: TCP Transport Layer.
Chapter 3 outline 3.1 Transport-layer services
DMET 602: Networks and Media Lab
CS 1652 Jack Lange University of Pittsburgh
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
Introduction to Networks
TCP.
CS1652 TCP Jack Lange University of Pittsburgh
Chapter 6: Transport Layer (Part I)
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
Magda El Zarki Professor, ICS UC, Irvine
TCP - Part I Karim El Defrawy
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Process-to-Process Delivery:
Transportation Layer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Chapter 3 Transport Layer
EEL 5718 Computer Communications
Presentation transcript:

Chapter 5 Peer-to-Peer Protocols and Data Link Layer Timing Recovery

Network Synchronous source sends periodic information blocks Network output not periodic Timing Recovery for Synchronous Services Applications that involve voice, audio, or video can generate a synchronous information stream Information carried by equally-spaced fixed-length packets Network multiplexing & switching introduces random delays Packets experience variable transfer delay Jitter (variation in interpacket arrival times) also introduced Timing recovery re-establishes the synchronous nature of the stream

Introduce Playout Buffer Playout Buffer Packet Arrivals Packet Playout Delay first packet by maximum network delay All other packets arrive with less delay Playout packet uniformly thereafter Packet Arrivals Packet Playout T max Sequence numbers help order packets

Send times Playout times Arrival times T playout time Time Receiver too slow; buffer fills and overflows T playout time Time Receiver too fast buffer starvation Many late packets T playout time Time Receiver speed just right Playout clock must be synchronized to transmitter clock

Recovered clock t4t4 t3t3 t2t2 t1t1 Timestamps Add Smoothing filter Adjust frequency Counter + - Buffer for information blocks Error signal Playout command Clock Recovery Counter attempts to replicate transmitter clock Frequency of counter is adjusted according to arriving timestamps Jitter introduced by network causes fluctuations in buffer & in local clock Timestamps inserted in packet payloads indicate when info was produced

Network clock fnfn Transmitter Network Receiver fsfs frfr M M Synchronization to a Common Clock Clock recovery simple if a common clock is available to transmitter & receiver E.g. SONET network clock; Global Positioning System (GPS) Transmitter sends  f of its frequency & network frequency Receiver adjusts network frequency by  f Packet delay jitter can be removed completely f r =f n -  f M=#ticks in local clock In time that net clock does N ticks N ticks f n /f s =N/M  f=f n -f s =f n -(M/N)f n

Example: Real-Time Protocol RTP (RFC 1889) designed to support real- time applications such as voice, audio, video RTP provides means to carry: Type of information source Sequence numbers Timestamps Actual timing recovery must be done by higher layer protocol MPEG2 for video, MP3 for audio

Chapter 5 Peer-to-Peer Protocols and Data Link Layer TCP Reliable Stream Service & Flow Control

Send buffer Segments Receive buffer Application Layer writes bytes into send buffer through socket ACKs Transmitter Receiver TCP Reliable Stream Service Application Layer reads bytes from receive buffer through socket TCP transfers byte stream in order, without errors or duplications Application layer Transport layer Write 45 bytes Write 15 bytes Write 20 bytes Read 40 bytes

TCP ARQ Method TCP uses Selective Repeat ARQ Transfers byte stream without preserving boundaries Operates over best effort service of IP Packets can arrive with errors or be lost Packets can arrive out-of-order Packets can arrive after very long delays Duplicate segments must be detected & discarded Must protect against segments from previous connections Sequence Numbers Seq. # is number of first byte in segment payload Very long Seq. #s (32 bits) to deal with long delays Initial sequence numbers negotiated during connection setup (to deal with very old duplicates) Accept segments within a receive window

Transmitter S last S last + W s – 1... Send Window S recent octets transmitted & ACKed... S last + W a -1 S last oldest unacknowledged byte S recent highest numbered transmitted octet S last +W a -1 highest-numbered byte that can be transmitted S last +W s -1 highest-numbered byte that can be accepted from the application Receiver Receive Window R next R last R last + W R – 1 R last highest numbered octet not yet read by the application R next next expected byte R new highest numbered byte received correctly R last +W R -1 highest-numbered byte that can be accommodated in receive buffer R new

TCP Connections TCP Connection One connection each way Identified uniquely by Send IP Address, Send TCP Port #, Receive IP Address, Receive TCP Port # Connection Setup with Three-Way Handshake Three-way exchange to negotiate initial Seq. #’s for connections in each direction Data Transfer Exchange segments carrying data Graceful Close Close each direction separately

Host A Host B SYN, Seq_no = x SYN, Seq_no = y, ACK, Ack_no = x+1 Seq_no = x+1, ACK, Ack_no = y+1 Three-way Handshake Data Transfer Three Phases of TCP Connection Graceful Close FIN, Seq_no = w ACK, Ack_no = w+1 Data Transfer FIN, Seq_no = z ACK, Ack_no = z+1

1st Handshake: Client-Server Connection Request SYN bit set indicates request to establish connection from client to server Initial Seq. # from client to server

2 nd Handshake: ACK from Server ACK bit set acknowledges connection request; Client- to-Server connection established ACK Seq. # = Init. Seq. # + 1

2nd Handshake: Server-Client Connection Request SYN bit set indicates request to establish connection from server to client Initial Seq. # from server to client

3 rd Handshake: ACK from Client ACK bit set acknowledges connection request; Connections in both directions established ACK Seq. # = Init. Seq. # + 1

TCP Data Exchange Application Layers write bytes into buffers TCP sender forms segments When bytes exceed threshold or timer expires Upon PUSH command from applications Consecutive bytes from buffer inserted in payload Sequence # & ACK # inserted in header Checksum calculated and included in header TCP receiver Performs selective repeat ARQ functions Writes error-free, in-sequence bytes to receive buffer

Data Transfer: Server-to-Client Segment 12 bytes of payload carries telnet option negotiation Push set 12 bytes of payload

Graceful Close: Client-to-Server Connection Client initiates closing of its connection to server

Graceful Close: Client-to-Server Connection Server ACKs request; client- to-server connection closed ACK Seq. # = Previous Seq. # + 1

Flow Control TCP receiver controls rate at which sender transmits to prevent buffer overflow TCP receiver advertises a window size specifying number of bytes that can be accommodated by receiver W A = W R – (R new – R last ) TCP sender obliged to keep # outstanding bytes below W A (S recent - S last ) ≤ W A Receive Window R last R last + W R – 1 R new WAWA S last S last + W s – 1... Send Window S recent... S last + W A -1

Host AHost B Seq_no = 2000, Ack_no = 1, Win = 1024, Data = Seq_no = 1, Ack_no = 4048, Win = 512, Data = Seq_no = 3024, Ack_no = 1, Win = 1024, Data = Seq_no = 4048, Ack_no = 129, Win = 1024, Data = t1t1 t2t2 t3t3 t4t4 Seq_no = 1, Ack_no = 2000, Win = 2048, No Data t0t0 TCP window flow control

TCP Retransmission Timeout TCP retransmits a segment after timeout period Timeout too short: excessive number of retransmissions Timeout too long: recovery too slow Timeout depends on RTT: time from when segment is sent to when ACK is received Round trip time (RTT) in Internet is highly variable Routes vary and can change in mid-connection Traffic fluctuates TCP uses adaptive estimation of RTT Measure RTT each time ACK received:  n t RTT (new) =  t RTT (old) + (1 –  )  n  typical

RTT Variability Estimate variance  2 of RTT variation Estimate for timeout: t out = t RTT + k  RTT If RTT highly variable, timeout increase accordingly If RTT nearly constant, timeout close to RTT estimate Approximate estimation of deviation d RTT (new) =  d RTT (old) + (1-  ) |  n - t RTT | t out = t RTT + 4 d RTT