Internet and Intranet Protocols and Applications

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

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

CSE 4213: Computer Networks II

CMPE 80N: Introduction to Networking and the Internet

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

Transport Layer. Chapter 3: Transport Layer

CS 4390 Computer Networks. Transport Services and Protocols

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

Different Layers Lecture 20

05 Transmission Control Protocol (TCP)

Chapter 3 Transport Layer

Chapter 3 Transport Layer

CNT 6885 Network Review on Transport Layer

Lecture 5. Transport Layer. Transport Layer 1-1

CSE 3214: Computer Network Protocols and Applications Transport Layer (Part 2) Chapter 3 outline. UDP checksum. Port numbers

Transport Layer: outline

Lecture 3: The Transport Layer: UDP and TCP

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

CSCI Topics: Internet Programming Fall 2008

The Transmission Control Protocol (TCP)

Chapter 6 Transport Layer

Different Layers Lecture 21

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

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

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

Chapter 3 Transport Layer

Chapter 3: Transport Layer

Application. Transport. Network. Link. Physical

COMP 431 Internet Services & Protocols. Transport Layer Protocols & Services Outline. The Transport Layer Reliable data delivery & flow control in TCP

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

Data Communications & Networks. Session 9 Main Theme Network Congestion Causes, Effects, Controls, and TCP Applications. Dr. Jean-Claude Franchitti

ECE 650 Systems Programming & Engineering. Spring 2018

OSI Transport Layer. objectives

Transport Layer: Outline

CSC 401 Data and Computer Communications Networks

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

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

Chapter 3 Transport Layer

Chapter 3: Transport Layer Part A

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

Transport Layer Protocols TCP

Computer Communication Networks Midterm Review

Chapter 3 Transport Layer

NWEN 243. Networked Applications. Transport layer and application layer

CMSC 332 Computer Networks Transport Layer

Applied Networks & Security

CSC 4900 Computer Networks: TCP

Computer Networking Introduction

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

TCP /IP Fundamentals Mr. Cantu

Chapter 3 Transport Layer

NWEN 243. Networked Applications. Layer 4 TCP and UDP

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

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

TSIN02 - Internetworking

Chapter III: Transport Layer

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

COSC4377. Useful Linux Tool: screen

NT1210 Introduction to Networking. Unit 10

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

The Transport Layer: TCP & Reliable Data Transfer

User Datagram Protocol

CSC 4900 Computer Networks: Transport Layer

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Lecture 9: Transpor Layer Overview and UDP

CSC358 Week 4. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

UNIT IV -- TRANSPORT LAYER

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 7

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E

EEC-682/782 Computer Networks I

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 9

10 minutes survey (anonymous)

Lecture 8. TCP/IP Transport Layer (2)

Introduction to TCP/IP networking

TDTS06: Computer Networks

The Transport Layer Multiplexing, Error Detection, & UDP

7. TCP 최양희서울대학교컴퓨터공학부

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Chapter III: Transport Layer

Chapter 24. Transport-Layer Protocols

CC451 Computer Networks

Transport Layer Overview

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

TSIN02 - Internetworking

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

Fall 2012: FCM 708 Bridge Foundation I

CSC 401 Data and Computer Communications Networks

UDP, TCP, IP multicast

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

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

Foundations of Telematics

Connection-oriented (virtual circuit) Reliable Transfer Buffered Transfer Unstructured Stream Full Duplex Point-to-point Connection End-to-end service

Distributed Systems. 5. Transport Protocols

Transcription:

Internet and Intranet Protocols and Applications Lecture 1b: The Transport Layer in the Internet January 17, 2006 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu 01/17/06 1

Internet Transport Protocols Two Transport Protocols Available Transmission Control Protocol (TCP) connection oriented most applications use TCP User Datagram Protocol (UDP) connectionless 01/17/06 2

Transport layer addressing Communications endpoint addressed by: IP address (32 bit) in IP Header Port number (16 bit) in TP Header 1 Transport protocol (TCP or UDP) in IP Header 1 TP => Transport Protocol (UDP or TCP) 01/17/06 3

Some standard services and port numbers PORT NUMBERS (last updated 2004-01-16) http://www.iana.org/assignments/port-numbers service tcp udp echo 7 7 daytime 13 13 netstat 15 ftp-data 20 ftp 21 telnet 23 smtp 25 time 37 37 domain 53 53 finger 79 http 80 pop-2 109 pop 110 sunrpc 111 111 uucp-path 117 nntp 119 talk 517 01/17/06 4

UDP: User Datagram Protocol [RFC 768] no frills, bare bones Internet transport protocol best effort service, UDP segments may be: lost delivered out of order to the application connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others Why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired 01/17/06 5

UDP Port Management Source (client) Obtains a free port number Specifies port of destination (server) Destination Receives datagram Sends datagram to destination IP:port Can send replies to source IP:port 01/17/06 6

UDP: more often used for streaming multimedia apps loss tolerant rate sensitive other UDP uses (why?): DNS SNMP reliable transfer over UDP: add reliability at application layer application-specific error recover! Length, in bytes of UDP segment, including header 32 bits source port # dest port # length Application data (message) checksum UDP segment format 01/17/06 7

UDP checksum Goal: detect errors (e.g., flipped bits) in transmitted segment Sender: treat segment contents as sequence of 16-bit integers checksum: addition (1 s complement sum) of segment contents sender puts checksum value into UDP checksum field Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But may be errors nonetheless? More later. 01/17/06 8

Transmission Control Protocol (TCP) Connection-oriented service Point-to-point Full-duplex communication Stream interface (no message boundary!) Stream divided into segments for transmission Each segment encapsulated in IP datagram Uses protocol ports to identify applications 01/17/06 9

TCP Port Management When a connection is established Source (client) Obtains a free port number Specifies IP:port of destination (server) Destination Receives connection request Sends data to destination IP:port The 4-tuple (source IP:port, destination IP:port) identifies where data goes 01/17/06 10

TCP Segment Sequence number specifies where in stream data belongs Few segments contain options TF 6-24 01/17/06 11

TCP Segment Format Segment divided into two parts Header Payload area (zero or more bytes of data) Header contains Protocol port numbers to identify Sending application Receiving application Bits to specify items such as SYN FIN ACK Fields for window advertisement, acknowledgment, etc. 01/17/06 12

Reliability in an Unreliable World IP offers best-effort (unreliable) delivery TCP uses IP TCP provides completely reliable transfer How is this possible? How can TCP realize: Reliable connection startup? Reliable data transmission? Graceful connection shutdown? 01/17/06 13

Reliable Data Transmission Positive acknowledgment Receiver returns short message when data arrives Called acknowledgment Retransmission Sender starts timer whenever message is transmitted If timer expires before acknowledgment arrives, sender retransmits message 01/17/06 14

TCP seq. # s and ACKs Seq. # s: byte stream number of first byte in segment s data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles outof-order segments A: TCP spec doesn t say, - up to implementer User types C host ACKs receipt of echoed C Host A Host B Seq=42, ACK=79, data = C Seq=79, ACK=43, data = C Seq=43, ACK=80 simple telnet scenario host ACKs receipt of C, echoes back C time 01/17/06 15

Timing Problem! The delay required for data to reach a destination and an acknowledgment to return depends on traffic in the internet as well as the distance to the destination. Because it allows multiple application programs to communicate with multiple destinations concurrently, TCP must handle a variety of delays that can change rapidly. How does TCP handle this... 01/17/06 16

Solving Timing Problem Keep estimate of round trip time on each connection Use current estimate to set retransmission timer Known as adaptive retransmission Key to TCP s success 01/17/06 17

TCP Flow Control Receiver Advertises available buffer space Called window Sender Can send up to entire window before ACK arrives Each acknowledgment carries new window information Called window advertisement Can be zero (called closed window) Interpretation: I have received up through X, and can take Y more octets 01/17/06 18

TCP Flow Control flow control sender won t overrun receiver s buffers by transmitting too much, too fast RcvBuffer = size or TCP Receive Buffer RcvWindow = amount of spare room in Buffer receiver: explicitly informs sender of (dynamically changing) amount of free buffer space RcvWindow field in TCP segment sender: keeps the amount of transmitted, unacked data less than most recently received RcvWindow receiver buffering 01/17/06 19

Why Startup/ Shutdown Difficult? Segments can be Lost Duplicated Delayed Delivered out of order Either side can crash Either side can reboot Need to avoid duplicate shutdown message from affecting later connection 01/17/06 20

TCP s Startup/ Shutdown Solution Uses three-message exchange known as 3- way handshake Necessary and sufficient for Unambiguous, reliable startup Unambiguous, graceful shutdown SYN used for startup, FIN used for shutdown 01/17/06 21

TCP Connection Management (OPEN) client server opening SYN SYNACK opening ACK established closed 01/17/06 22

TCP Connection Management (CLOSE) client server closing FIN ACK FIN closing timed wait ACK closed closed 01/17/06 23

TCP Connection Management (cont) TCP server lifecycle TCP client lifecycle 01/17/06 24

Transport Protocol Summary Transport protocols fit between applications and Internet Protocol Two transport protocols in TCP/IP suite User Datagram Protocol (UDP) Transmission Control Protocol (TCP) UDP Unreliable Message-oriented interface TCP Major transport protocol used in Internet Complete reliability Stream-oriented interface Uses adaptive retransmission 01/17/06 25