XCYANG Transport Protocols XCYANG 2002-8-10Department of Computer Science and Technology, Nanjing University 1 Data Communications and Networking Chapter.

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.
Chapter 06 Transport Protocols
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Under Reliable Network Service  Design Issues  Under Unreliable.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 6 Transport Layer.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Computer Networks with Internet Technology William Stallings
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
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 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
5/6/2015© 2010 Raymond P. Jefferis IIILect Transport Layer.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
Computer Networks with Internet Technology William Stallings
Semester Copyright USM EEE442 Computer Networks Transport Protocol En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK)
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 20 – Transport Protocols.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
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.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
1 Transport Layer Computer Networks. 2 Where are we?
William Stallings Data and Computer Communications Chapter 20 Transport Protocols.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
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.
University of the Western Cape Chapter 12: The Transport Layer.
Section 5: The Transport Layer. 5.2 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
1 15. Transport Protocols. Prof. Sang-Jo Yoo 2 Contents  Transport protocol  Transport Service  Protocol for reliable network service  Protocol for.
CSCI 465 D ata Communications and Networks Lecture 27 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networks with Internet Technology William Stallings Chapter 06 Transport Protocols 1.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 20 – Transport Protocols.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
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).
Ch 3. Transport Layer Myungchul Kim
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
William Stallings Data and Computer Communications Chapter 17 Transport Protocols.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
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.
William Stallings Data and Computer Communications
Chapter 6: Transport Layer (Part I)
TCP - Part I Karim El Defrawy
Transport Layer Unit 5.
TCP Connection Establishment and Termination
Process-to-Process Delivery:
TCP Connection Establishment and Termination
University of Houston Transport Protocols Datcom II Lecture 9
Chapter 17. Transport Protocols
Week 10 Transport Protocols
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
EEL 5718 Computer Communications
Presentation transcript:

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 1 Data Communications and Networking Chapter 17 Transport Protocols Textbook: William Stallings, Data and Computer Communications

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 2 Transport Protocol Sits above a network or internetwork, which provides network-related services Provides transport services (TS) to upper layer users such as FTP, SMTP, and TELNET Uses some lower layer services such as IP protocol to support communication between local and remote transport entities

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 3 An Internetwork LAN

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 4 Transport Layer Concept

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 5 Service Points OSI/RM: TSAP TCP/IP: Port TSAP - Transport Service Access Point

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 6 Transport Layer Compared with Data Link Layer LAN Point-to-Point ? End-to-End (host-to-host) Both node-to-node

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 7 Transport Layer Compared with Network or Internetwork Layer End-to-end Delivery –Network or internetwork layer Oversees end-to-end delivery of individual packets No see any relationship between packets Deliver packets to host –Transport layer Make sure entire message (not just a single packet) arrive intact Oversee end-to-end delivery of an entire massage Deliver messages to application processes in host

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 8 Transport Layer Duties

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 9 Addressing To ensure accurate delivery from service point to service point, another level of addressing will be needed in addition to those at data link and network levels –Data link level protocols need to know which two computers within a network are communicating –Network level protocols need to know which two computers within an internetwork are communicat- ing –Transport level protocol needs to know which upper layer protocols are communicating

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 10 Reliable Delivery

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 11 Transport and Data Link Error Control

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 12 Sequence Control

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 13 Loss Control

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 14 Duplication Control

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 15 Flow Control

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 16 Multiplexing

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 17 Connection Oriented Transport Protocol Mechanisms Logical connection –Establishment –Maintenance –Termination Reliable e.g. TCP

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 18 Reliable Sequencing Network Service Assume arbitrary length message Assume virtually 100% reliable delivery by network service Examples –reliable packet switched network using X.25 –frame relay using LAPF control protocol –IEEE using connection oriented LLC service Transport service is end to end protocol between two systems on same network

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 19 Issues in a Simple Transport Protocol Addressing Multiplexing Flow Control Connection establishment and termination

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 20 Addressing Target user specified by: –User identification Usually (host, port) –Called a socket in TCP Port represents a particular transport service (TS) user –Transport entity identification Generally only one per host If more than one, then usually one of each type –Specify transport protocol (TCP, UDP) –Host address An attached network device In an internet, a global internet address –Network number 48-bit socket = 32-bit IP address + 16-bit port number

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 21 Finding Addresses Four methods (2 static and 2 dynamic) –Know address ahead of time e.g. collection of network device statistics –Well known addresses e.g. Time sharing and word procssing –Name server –Sending process request to well known address

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 22 Multiplexing Multiple users employ same transport protocol User identified by port number or service access point (SAP) Upward and downward multiplexing May also multiplex with respect to network services used –e.g. multiplexing a single virtual X.25 circuit to a number of transport service user X.25 charges per virtual circuit connection time

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 23 Flow Control Longer transmission delay between transport entities compared with actual transmission time –Delay in communication of flow control info Variable transmission delay –Difficult to use timeouts Flow may be controlled because: –The receiving user can not keep up –The receiving transport entity can not keep up Results in buffer filling up

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 24 Coping with Flow Control Requirements (1) Do nothing –Segments that overflow are discarded –Sending transport entity will fail to get ACK and will retransmit Thus further adding to incoming data Refuse further segments –Backpressure –Clumsy –Multiplexed connections are controlled on aggregate flow

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 25 Coping with Flow Control Requirements (2) Use fixed sliding window protocol –See chapter 7 for operational details –Works well on reliable network Failure to receive ACK is taken as flow control indication –Does not work well on unreliable network Can not distinguish between lost segment and flow control Use credit scheme

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 26 Credit Scheme Greater control on reliable network More effective on unreliable network Decouples flow control from ACK –May ACK without granting credit and vice versa Each octet has sequence number Each transport segment has seq number, ack number and window size in header

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 27 Use of Header Fields When sending, seq number is that of first octet in segment ACK includes AN=i, W=j All octets through SN=i-1 acknowledged –Next expected octet is i Permission to send additional window of W=j octets –i.e. octets through i+j-1

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 28 Credit Allocation Compared with Fig 7.4

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 29 Sending and Receiving Perspectives Compared with Fig 7.3

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 30 Establishment and Termination Allow each end to know the other exists Negotiation of optional parameters Triggers allocation of transport entity resources By mutual agreement

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 31 Connection State Diagram

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 32 Connection Establishment

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 33 Not Listening Reject with RST (Reset) Queue request until matching open issued Signal TS user to notify of pending request –May replace passive open with accept

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 34 Termination Either or both sides By mutual agreement Abrupt termination Or graceful termination –Close wait state must accept incoming data until FIN received

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 35 Side Initiating Termination TS user Close request Transport entity sends FIN, requesting termination Connection placed in FIN WAIT state –Continue to accept data and deliver data to user –Not send any more data When FIN received, inform user and close connection

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 36 Side Not Initiating Termination FIN received Inform TS user Place connection in CLOSE WAIT state –Continue to accept data from TS user and transmit it TS user issues CLOSE primitive Transport entity sends FIN Connection closed All outstanding data is transmitted from both sides Both sides agree to terminate

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 37 Unreliable Network Service Examples –internet using IP –frame relay using LAPF –IEEE using unacknowledged connectionless LLC Segments may get lost Segments may arrive out of order

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 38 Problems Ordered Delivery Retransmission strategy Duplication detection Flow control Connection establishment Connection termination Crash recovery

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 39 Ordered Delivery Segments may arrive out of order Number segments sequentially TCP numbers each octet sequentially Segments are numbered by the first octet number in the segment

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 40 Retransmission Strategy Segment damaged in transit Segment fails to arrive Transmitter does not know of failure Receiver must acknowledge successful receipt Use cumulative acknowledgement Time out waiting for ACK triggers re-transmission

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 41 Timer Value Fixed timer –Based on understanding of network behavior –Can not adapt to changing network conditions –Too small leads to unnecessary re-transmissions –Too large and response to lost segments is slow –Should be a bit longer than round trip time Adaptive scheme –May not ACK immediately –Can not distinguish between ACK of original segment and re-transmitted segment –Conditions may change suddenly

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 42 Duplication Detection If ACK lost, segment is re-transmitted Receiver must recognize duplicates Duplicate received prior to closing connection –Receiver assumes ACK lost and ACKs duplicate –Sender must not get confused with multiple ACKs –Sequence number space large enough to not cycle within maximum life of segment Duplicate received after closing connection

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 43 Incorrect Duplicate Detection

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 44 Flow Control Credit allocation Problem if AN=i, W=0 closing window Send AN=i, W=j to reopen, but this is lost Sender thinks window is closed, receiver thinks it is open Use window timer If timer expires, send something –Could be re-transmission of previous segment

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 45 Connection Establishment Two way handshake –A send SYN, B replies with SYN –Lost SYN handled by re-transmission Can lead to duplicate SYNs –Ignore duplicate SYNs once connected Lost or delayed data segments can cause connection problems –Segment from old connections –Start segment numbers fare removed from previous connection Use SYN i Need ACK to include i Three Way Handshake

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 46 Two Way Handshake: Obsolete Data Segment

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 47 Two Way Handshake: Obsolete SYN Segment

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 48 Connection Establishment

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 49 Three Way Handshake: State Diagram

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 50 Three Way Handshake: Examples

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 51 Connection Termination Entity in CLOSE WAIT state sends last data segment, followed by FIN FIN arrives before last data segment Receiver accepts FIN –Closes connection –Loses last data segment Associate sequence number with FIN Receiver waits for all segments before FIN sequence number Loss of segments and obsolete segments –Must explicitly ACK FIN

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 52 Connection Termination

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 53 Graceful Close Send FIN i and receive AN i Receive FIN j and send AN j Wait twice maximum expected segment lifetime

XCYANG Transport Protocols XCYANG Department of Computer Science and Technology, Nanjing University 54 Crash Recovery After restart all state info is lost Connection is half open –Side that did not crash still thinks it is connected Close connection using persistence timer –Wait for ACK for (time out) * (number of retries) –When expired, close connection and inform user Send RST i in response to any i segment arriving User must decide whether to reconnect –Problems with lost or duplicate data “ 坚持 ” 而非 “ 放弃 ”