ITS323: Introduction to Data Communications

Similar documents
Transmission Control Protocol. ITS 413 Internet Technologies and Applications

User Datagram Protocol

Lecture 3: The Transport Layer: UDP and TCP

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

TSIN02 - Internetworking

TCP : Fundamentals of Computer Networks Bill Nace

User Datagram Protocol (UDP):

Networking Technologies and Applications

Chapter 5 End-to-End Protocols

TSIN02 - Internetworking

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

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

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

05 Transmission Control Protocol (TCP)

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

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

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

CS457 Transport Protocols. CS 457 Fall 2014

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

Transmission Control Protocol (TCP)

OSI Transport Layer. objectives

TSIN02 - Internetworking

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

TSIN02 - Internetworking

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

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

UNIT IV -- TRANSPORT LAYER

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

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

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

Two approaches to Flow Control. Cranking up to speed. Sliding windows in action

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

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

CSCD 330 Network Programming

Congestion / Flow Control in TCP

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer

TCP. 1 Administrivia. Tom Kelliher, CS 325. Apr. 2, Announcements. Assignment. Read From Last Time

Introduction to TCP/IP networking

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

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

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

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

TCP /IP Fundamentals Mr. Cantu

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 5 - Part 2

Sequence Number. Acknowledgment Number. Data

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Introduction to Networks and the Internet

Sirindhorn International Institute of Technology Thammasat University

The Transport Layer: TCP & Reliable Data Transfer

TCP = Transmission Control Protocol Connection-oriented protocol Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.

Unit 2.

Chapter 24. Transport-Layer Protocols

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

TCP/IP-2. Transmission control protocol:

The Transport Layer. Part 1

Transport Layer Protocols. Internet Transport Layer. Agenda. TCP Fundamentals

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Multiple unconnected networks

CSCI-GA Operating Systems. Networking. Hubertus Franke

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

ECE 650 Systems Programming & Engineering. Spring 2018

Transport Layer Marcos Vieira

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

EE 122: Transport Protocols. Kevin Lai October 16, 2002

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

EE 122: Transport Protocols: UDP and TCP

TCP/IP Protocol Suite 1

Transport Protocols & TCP TCP

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Chapter 7. The Transport Layer

Transport Layer: outline

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

CSCI-1680 Transport Layer I Rodrigo Fonseca

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

Stream Control Transmission Protocol

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

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

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

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

CSC 401 Data and Computer Communications Networks

Internet and Intranet Protocols and Applications

Simulation of TCP Layer

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

CSCE 463/612 Networks and Distributed Processing Spring 2017

CSE 4213: Computer Networks II

RSC Part III: Transport Layer 3. TCP

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

CS118 Discussion 1A, Week 4. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

10 minutes survey (anonymous)

Information Network 1 TCP 1/2

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

Applied Networks & Security

Transport Layer: Outline

Transport Protocols and TCP

CS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018

Network Technology 1 5th - Transport Protocol. Mario Lombardo -

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

Transcription:

ITS323: Introduction to Data Communications Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 23 May 2012 ITS323Y12S1L13, Steve/Courses/2012/s1/its323/lectures/transport.tex, r2334

Contents User Datagram Protocol Transmission Control Protocol

Send data between application processes on source and destination hosts End-to-end (or host-to-host) communications Internet transport protocols:,, SCTP, DCCP (and other legacy or domain-specific protocols) Transmission Control Protocol: connection-oriented, error control, flow control, congestion control User Datagram Protocol: unreliable connection-less delivery (same as IP) Addressing is common to all transport protocols (,, SCTP, DCCP) Port is abstract view of end-point for communications; actual end-point is process

Internet Applications Most Internet applications follow a client/server model of initiating communication: 1. Client initiates communication 2. Server waits for client to initiate communication 3. Once the communication is initiated, data can flow in both directions (client to server and server to client) For client to initiate communication to server, the client needs to know IP address of server, and: Protocol number: identifies transport protocol used by both hosts 8-bit number; e.g. 6 =, 17 = ; 1 = ICMP http://www.iana.org/assignments/protocol-numbers/ Port number: identifies application process on a host 16-bit number; 0 1023 well-known ports; 1024 49151 registered ports; 49152 dynamic/private ports http://www.iana.org/assignments/port-numbers/

Multiple Applications, Multiple

Contents User Datagram Protocol Transmission Control Protocol

User Datagram Protocol is a unreliable connection-less transport protocol Takes Data from the application layer, attaches a header, and delivers to IP provides checksum over the packet segments may be: lost, arrive out of order, duplicated, arrive in error (application that uses must deal with this) is simple (standard describes it in 4 pages) is used by applications which: Require simplicity, e.g. TFTP, network management in embedded devices Don t require reliability, e.g. voice and video applications, network management Require low overheads, e.g. voice and video applications (require low delay)

Segment 8 Bytes 0 16 31 Source Port Total Length Data Destination Port Checksum 8 Byte header plus data Length is count of bytes in header and data Checksum calculated over header, data, some parts of IP header (e.g. addresses, protocol)

Contents User Datagram Protocol Transmission Control Protocol

Transmission Control Protocol Most commonly used transport protocol today Web browsing, email, file sharing, instant messaging, file transfer, database access, proprietary business applications, some multimedia applications (at least for control purposes),... Services provided by : Stream-oriented: treats data from application as continuous stream of bytes Connection-oriented data transfer Buffered transfer Full duplex connection Reliabilty (error control) Flow control Congestion control

Segment 20 Bytes 0 4 8 16 31 Source Port Destination Port Sequence Number Acknowledgement Number HLength Reserved Flags Advertised Window Checksum Urgent Pointer Options + Padding (optional) Data Header contains 20 bytes, plus optional fields Optional fields must be padded out to multiple of 4 bytes

Segment Fields Source/Destination port Sequence number of the first data byte in this segment (or ISN) Acknowledgement number: sequence number of the next data byte expects to receive Header Length: Size of header (measured in 4 bytes) Window: number of bytes the receiver is willing to accept (for flow control) Checksum: error detection on segment Urgent pointer points to the sequence number of the last byte of urgent data in the segment Options: such as maximum segment size, window scaling, selective acknowledgement,...

Segment Flags Flags (1 bit each, if 1 the flag is true or on): CWR: Congestion Window Reduced ECE: Explicit Congestion Notification Echo URG: segment carries urgent data, use the urgent pointer field; receiver should notify application program of urgent data as soon as possible ACK: segment carries ACK, use the ACK field PSH: push function RST: reset the connection SYN: synchronise the sequence numbers FIN: no more data from sender

Sequence Numbers uses 32-bit sequence numbers to keep track of data sent and receiver (error control, flow control, congestion control) Upon connection establishment, Initial Sequence Numbers are chosen by each side ISN does not have to be 0; usually larger than last sequence number used in previous connection Sequence numbers used in each direction are independent Each Byte of data has a sequence number relative to the ISN

Connection Establishment What is the purpose of connection establishment? Allows each end to assure that the other exists Allows exchange or negotiation of optional parameters, specifically syncronise initial sequence numbers Triggers the allocation of resources for the connection (e.g. allocate buffer space in memory) uses a three-way handshake: SYN-SYN/ACK-ACK (A two-way handshake: duplicate segments from old connections may cause errors)

Three-Way Handshake A Flags=SYN SN=ISNA B Flags=SYN,ACK SN=ISNB AN=ISNA+1 Flags=ACK AN=ISNB+1 Initiator A selects an Initial Sequence Number, ISNA B acknowledges ISNA and also chooses its own ISNAB Data transfer can start after ISNB is ACKed Optionally, 3rd segment can contain data

Connection Close App closes connection A Flags=FIN SN=x Flags=ACK AN=x+1 B Inform app Flags=FIN SN=y App closes connection Inform app Flags=ACK AN=y+1 Both sides should independently close the connection E.g. A closes connection, B can still send data to A Other approaches are possible, e.g. abort using RST flag

Data Transfer uses sliding window mechanism for efficient data transfer specifies algorithms for error, flow and congestion control Some details are implementation dependent E.g. when to send data? when to send an ACK? when is data delivered to application? offers stream-oriented data transfer service Application delivers multiple messages to during connection treats all messages as continuous stream of bytes implementation chooses when to send the bytes in a segment

Segment Example

Segment Example (continued)

Data Transfer Example

Error Control uses selective-retransmission style ARQ ACK numbers indicate next in-order sequence number expected Receiver buffers out-of-order data received If data segment sent is not implicitly ACKed within timeout, retransmit segment Cumulative ACKs can be used; ACK number implicitly acknowledges multiple received segments Optimization of normal retransmission: Fast Retransmit Timeouts generally have to be long to handle varying round trip times (RTTs) Waiting for a timeout may lead to poor efficiency If 3 duplicate ACKs are received, retransmit segment

Basic Retransmit Example

Fast Retransmit Example

Flow Control Aim: prevent sender from overflowing buffers of receiver Must consider variable end-to-end round trip times (RTT) Uses sliding-window flow control Receiver notifies sender amount of buffer space available in Advertised Window field Sender cannot send more than advertised window of bytes

Congestion Control Aim: prevent sender from overflowing the routers Assume segment loss is indicator of congestion Decrease sending rate if segment loss detected Increase sending rate if ACK received Various algorithms/options for how to decrease/increase sending rate