CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

Similar documents
Basic Reliable Transport Protocols

Chapter 3: Transport Layer Part A

The Transmission Control Protocol (TCP)

Internet and Intranet Protocols and Applications

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

UNIT IV -- TRANSPORT LAYER

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

Transport Layer Overview

PROBLEMSAND EXERCISES

Lecture 5. Transport Layer. Transport Layer 1-1

CS457 Transport Protocols. CS 457 Fall 2014

Transport Protocols. Raj Jain. Washington University in St. Louis

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

The Transport Layer Multiplexing, Error Detection, & UDP

CSCD 330 Network Programming

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Reliable Transport I: Concepts and TCP Protocol

CS4700/CS5700 Fundamentals of Computer Networks

The Transport Layer Reliability

CSE 4213: Computer Networks II

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Transport Layer (TCP/UDP)

Reliable Transport II: TCP and Congestion Control

Computer Networks. Homework #4: No Grading

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

ECE 650 Systems Programming & Engineering. Spring 2018

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

Computer Communication Networks Midterm Review

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

CC451 Computer Networks

Transport services and protocols. Chapter 3 outline. Internet transport-layer protocols Chapter 3 outline. Multiplexing/demultiplexing

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Intro to LAN/WAN. Transport Layer

CS 4390 Computer Networks. Transport Services and Protocols

UDP, TCP, IP multicast

Chapter 3: Transport Layer

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

Different Layers Lecture 20

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

NWEN 243. Networked Applications. Layer 4 TCP and UDP

TDTS06: Computer Networks

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

ECE697AA Lecture 3. Today s lecture

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. ** Slides are attributed to J. F.

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

Transport Layer. Chapter 3: Transport Layer

Reliable Transport I: Concepts and TCP Protocol

CSCD 330 Network Programming

Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

Fall 2012: FCM 708 Bridge Foundation I

The Transport Layer: TCP & Reliable Data Transfer

Problem 7. Problem 8. Problem 9

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

c. If the sum contains a zero, the receiver knows there has been an error.

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

CSCD 330 Network Programming

EE 122: IP Forwarding and Transport Protocols

Lecture 3: The Transport Layer: UDP and TCP

TSIN02 - Internetworking

COSC4377. Useful Linux Tool: screen

Student ID: CS457: Computer Networking Date: 3/20/2007 Name:

Announcement. Homework 1 due last night, how is that? Will discuss some problems in the lecture next week

ECE 333: Introduction to Communication Networks Fall 2002

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

CSE 461 Module 10. Introduction to the Transport Layer

ECE 333: Introduction to Communication Networks Fall 2001

Transport protocols. Transport Layer 3-1

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Introduction to the Transport Layer

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

Reliable Transport II: TCP and Congestion Control

Operating Systems and Networks. Network Lecture 8: Transport Layer. Adrian Perrig Network Security Group ETH Zürich

Computer Networks and Data Systems

Operating Systems and Networks. Network Lecture 8: Transport Layer. Where we are in the Course. Recall. Transport Layer Services.

COMP/ELEC 429/556 Introduction to Computer Networks

Transport Layer TCP / UDP

ETSF10 Internet Protocols Transport Layer Protocols

CSCE 463/612 Networks and Distributed Processing Spring 2017

NET ID. CS519, Prelim (March 17, 2004) NAME: You have 50 minutes to complete the test. 1/17

Bandwidth Allocation & TCP

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Applied Networks & Security

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

CSC 401 Data and Computer Communications Networks

RSC Part III: Transport Layer 3. TCP

CSE 473 Introduction to Computer Networks. Midterm Exam Review

Different Layers Lecture 21

Transcription:

: Computer Networks Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

Recall our protocol layers...

... and our protocol graph

IP gets the packet to the host Really the interface Now how do we get the packet from the interface to the right process? Well, you ve kinda seen this already, but lets cover again

TCP and UDP ports The ports serve to demux the packet Get it from the interface to the right process UDP Header SRC port checksum DST port length DATA

TCP and UDP ports Some ports are well-known HTTP is by default TCP port 80 DNS is UDP or TCP port 53 Etc. Servers listen at these ports Other ports are dynamically assigned Clients usually dynamically assign ports

UDP/TCP application process selection Unicast application process is selected by the complete 5-tuple, consisting of: Source and Dest IP address Source and Dest port IP protocol Ex: an FTP server may have concurrent transfers to the same client. Only the source port will differ. Multicast application process is selected by a 3- tuple: Dest IP address and UDP port, and IP protocol Because it is multicast, UDP may select multiple processes

Typical server incoming connection processing Client Host Client Process1 SA=C, DA=S, P=TCP, SP=5000, DP=23 Server Host Listening Process TCP TCP

Typical server incoming connection processing Client Host Client Process1 TCP SA=C, DA=S, P=TCP, SP=5000, DP=23 TCP Server Host Listening Process fork Server Process1

Typical server incoming connection processing Client Host Client Process1 SA=C, DA=S, P=TCP, SP=5000, DP=23 Server Host Listening Process fork Client Process2 TCP SA=C, DA=S, P=TCP, SP=5001, DP=23 TCP Server Process1

Typical server incoming connection processing Client Host Client Process1 SA=C, DA=S, P=TCP, SP=5000, DP=23 Server Host Listening Process fork Client Process2 TCP SA=C, DA=S, P=TCP, SP=5001, DP=23 TCP Server Process1 Server Process1 fork

UDP and TCP service UDP is connectionless packet transport service Like IP, packets can be lost, mis-ordered, duplicated A receive() of X bytes corresponds to a previous send() of X bytes And a corresponding packet of X bytes (Ignoring packet loss or other errors like not providing enough receive buffer) If sending app sends, but receiving app doesn t receive, packet will be lost Even if no packets are lost in the network!

UDP packet loss

UDP and TCP service TCP is a reliable byte-stream transport service As long as the TCP connection is established, bytes arrive in the order they were sent But, a send() of X bytes doesn t imply a receive() of X bytes Sender can send 500 bytes, and receiver can read 1 byte 500 times (and it could have been transmitted as 2 250-byte packets) And vice versa TCP provides flow control

TCP flow control

Stop-and-wait Before looking at TCP in its full glory, lets look at simpler sequencing / flow control algorithms Stop-and-wait is about as simple as it can get Sender sends packet, waits for ack, sends another packet,... Receiver receives packet, acks it...

Stop-and-wait

Stop-and-wait Receiver only needs one packet s worth of receive buffer Only send ACK after received packet is processed Sender only needs one packet s worth of send buffer Save packet until get ACK, then save the next packet

Even stop-and-wait not quite this simple!

Stop-and-wait requires a 1-bit sequence number space

Problem with stop-and-wait Fine on a short-skinny pipe Low bandwidth, low distance Wasteful on a long-fat pipe High delay x bandwidth product 1.5 Mbps link, 45ms round-trip delay Approx. 8KB BW x delay Eight 1KB packets can be sent in one RTT, but stop-and-wait only sends one packet in one RTT

Sliding window Sender can send multiple bytes before getting an ACK for the first byte Number of bytes is the send window Sender must buffer these bytes in case it has to retransmit Receiver can buffer multiple bytes before delivering any to the application Number of bytes is the receive window Receiver must buffer these bytes in case application doesn t read them on time Or in case some bytes not received

Sliding window

Send and receive window sizes Send window should be big enough to fill the pipe Receive window can be smaller than send window As long as receiver can keep up with sender But packet loss can result in more retransmits than necessary No point in making receive window bigger than send window Unless congestion in network a concern

Sliding window examples

Sliding window examples Normal operation Receive app delays reading Packet lost Cumulative ACK NACK Selective ACK

Seq number space must be at least two times window size

Next lecture Next few lectures will be all about TCP