Kent State University

Similar documents
05 Transmission Control Protocol (TCP)

User Datagram Protocol

Lecture 3: The Transport Layer: UDP and TCP

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

Intro to LAN/WAN. Transport Layer

Sequence Number. Acknowledgment Number. Data

Transport Layer Protocols TCP

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

Transport Layer: Outline

TCP Overview. Connection-oriented Byte-stream

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Transport Layer: outline

Transport Layer Marcos Vieira

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

User Datagram Protocol (UDP):

TCP : Fundamentals of Computer Networks Bill Nace

Simulation of TCP 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

QUIZ: Longest Matching Prefix

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

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

CS4700/CS5700 Fundamentals of Computer Networks

Transmission Control Protocol (TCP)

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

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

Networking Technologies and Applications

CSC 634: Networks Programming

Introduction to Networks and the Internet

ECE697AA Lecture 3. Today s lecture

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

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

Chapter 24. Transport-Layer Protocols

Internet and Intranet Protocols and Applications

ECE 650 Systems Programming & Engineering. Spring 2018

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

Applied Networks & Security

TSIN02 - Internetworking

End-to-End Protocols. End-to-End Protocols

CS457 Transport Protocols. CS 457 Fall 2014

TSIN02 - Internetworking

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

Functionality Split Computer Networking. Transport Protocols. Overview. Multiplexing & Demultiplexing

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

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

TSIN02 - Internetworking

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

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

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

8. TCP Congestion Control

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

Internet transport protocols

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

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

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

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

TSIN02 - Internetworking

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

Fall 2012: FCM 708 Bridge Foundation I

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

EE 122: Transport Protocols: UDP and TCP

UNIT IV -- TRANSPORT LAYER

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

Transport Protocols & TCP TCP

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

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

Reliable Transport I: Concepts and TCP Protocol

Introduc)on to Computer Networks

Multiple unconnected networks

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

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

CSCI-1680 Transport Layer I Rodrigo Fonseca

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

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

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

CSCI-1680 Transport Layer I Rodrigo Fonseca

OSI Transport Layer. objectives

The Transport Layer: TCP & Reliable Data Transfer

CS321: Computer Networks Error and Flow Control in TCP

ITS323: Introduction to Data Communications

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

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

CSC 4900 Computer Networks: TCP

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

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

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

CSC 401 Data and Computer Communications Networks

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

The Transport Layer. Part 1

The Transport Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

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

The Transmission Control Protocol (TCP)

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

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

NWEN 243. Networked Applications. Layer 4 TCP and UDP

Chapter 3 Transport Layer

CSCD 330 Network Programming

Transcription:

CS 4/54201 Computer Communication Network Kent State University Dept. of Computer Science www.mcs.kent.edu/~javed/class-net06f/ 1 A Course on Networking and Computer Communication LECT-10, S-2

IP- Internet Protocol Addressing Scheme Address Resolution Datagram Forwarding Encapsulation, Fragmentation & Reassembly TCP- Transmission Control Protocol Connection startup & shutdown Reliability: ordering, missing data handling Flow control LECT-10, S-3 TCP 4

Why TCP? Packet service provided by IP is unreliable. IP takes no responsibility if packets are lost, if there are duplicate packets, if a part of the router fails. But, an application program wants to assume that when a byte is send it will be delivered correctly at the other end. TCP layer of TCP/IP protocol suits bridges this gap. LECT-10, S-5 TCP Services Connection Orientation application sets up virtual connections. Point-to-point Communication each connection has exactly two endpoints. Complete Reliability TCP guarantees all bytes will be delivered. Full Duplex Communication Data can flow in both direction over connections. Stream Interface Byte order is maintained but no records. Reliable Connection Startup No interference from earlier connections. Graceful Connection Shutdown All sent data will be delivered before shutdown. TCP provides a completely reliable (no data duplication or loss), connection oriented, full duplex stream transport to applications. LECT-10, S-6

Virtual Connection TCP provides a feeling to the applications that a completely reliable connection exists between two applications. TCP use IP to carry packets. However, the IP or underlying hardware do not know about the connection. segment segment segment segment LECT-10, S-7 TCP Segment Format FIN=1 is used for closing a connection. SYN=1, is used to request a connection URG=1 if urgent point is in use Urgent pointer is used to request prompt delivery of data at the receiving end, even if out of sequence. ACK=1 if ack field is valid PSH=1 to indicate immediate send. LECT-10, S-8

Connection Management 9 Connection Open: Three Way Handshake TCP uses a three way acknowledgement scheme for making sure that connection can be created and gracefully terminated even when there is computer reboots. LECT-10, S-10

Data Transfer Once connection is OPEN, it sets up a bidirectional connection and data can be sent both ways. LECT-10, S-11 Connection Termination: Three way Handshake Both FIN segment and replied FIN+ACK segment consumes one sequence number each if there is no data to send. Quiz: What if one side has data to send and other side wants to close? LECT-10, S-12

Connection Termination: Half-Close Each side can decide to close the connection separately. In this case the server side wants to send more data. So it only sends ACK, and a sequence number y-1. Thus would not sent data in this segment. So the client side will keep the receiver open. LECT-10, S-13 TCP States CLOSED LISTEN SYN-SENT SYN-RCVD ESTABLISHED FIN-WAIT-1 FIN-WAIT-2 CLOSE-WAIT TIME-WAIT LAST-ACK CLOSING There is no connection Passive open received; waiting for SYN SYN sent; waiting for ACK SYN+ACK sent, waiting for ACK Connection established, data transfer in progress First FIN sent; waiting for ACK ACK to first FIN received; waiting for second FIN First FIN received, ACK sent; waiting for application to close Second FIN received, ACK sent, waiting for 2MSL time-out Second FIN sent, waiting for ACK Both sides have decided to close simulteneously. LECT-10, S-14

TCP State Diagram LECT-10, S-15 Recent Advances in Networked & Applications Workshop Series: Today at 3:30-5:00 pm 1. November 30, 2005: Advanced Internet Systems: Internet Caching & Content Distribution Networking 2. December 07, 2005: Internet Traffic Management: Inter Domain Routing with Autonomous Systems using BGP. 3. December 14, 2005: The Emerging Era-of cooperative Computing: Recent Advances in Peer-to- Peer, Grid and Community Computing. LECT-10, S-16

Client States Client requests Active Open for a connection and moves through SYN-SENT to ESTABLISHED state. When done, it issues a Active Close and moves to FIN-WAIT-1 state. If server is not done with data transfer, it moves to FIN-WAIT-2. When receives FIN from server it sends ACK but does not close the connection immediately. It starts a timer 2MSL. Why? In case ACK is lost, the server have to keep connection open for ever. To avoid that if server does not see this last ACK it resends FIN. Upon receiving this retransmitted FIN the client must resend the ACK. Client must wait till server s retransmitted FIN can arrive. Segments from one socket must not reincarnate in the second socket with same id. Thus, the first socket must wait in zombie state (2MSL) time before it can be reused. LECT-10, S-17 Server States Server issues a passive open command and moves into LISTEN state. Once it receives SYN from client it moves to SYN- RCVD and then than to ESTABLISHED states. If it receives a FIN request from client, but it has data to send, it moves to CLOSE-WAIT state and the sends its remaining data. The it sends its FIN request to the other side and starts a regular times and moves to LAST-ACK state. It retransmits the FIN if there is a time out until it receives the last ACK. LECT-10, S-18

Quiz Quiz 601: What may cause Silly Window Syndrome? Quiz 602: Why TCP sending end waits some extra time to tear down the socket even after sending the very last FIN+ACK? Quiz 603: Jacobson added a new consideration to get a more effective estimation of TCP timeout. What is that? Quiz 604: What ambiguity Kern removed? LECT-10, S-19 Reliability 20

Reliability Problems Packet can be lost Packet can be duplicated Packets can get reordered. Computers can reboot A packets from earlier connection can disrupt current connection. LECT-10, S-21 Packet loss and Retransmission TCP uses retransmission assisted by a timer. When a packet is send a timer is started. Each packet must be acknowledged by the receiver. If acknowledgement does not arrive within the specified time, retransmission occurs. LECT-10, S-22

What if the difference of TCP flow control from the End-to-end flow control we have studied earlier? LECT-10, S-23 Heterogeneous Environment What should be a good time out time? Local computers can respond within ms. A satellite connected computer needs about.25min. Use long delay for satellite connections and short for local connections? What if the time over the same connection varies? LECT-10, S-24

Adaptive Retransmission Unlike the Data-Link Layer TC protocols: TCP uses an adaptive scheme. TCP monitors the round-trip-time for each communication. Measures average delay and variance. Sets the times as a weighted sum of average and variance. LECT-10, S-25 Original Algorithm Measure Sample RTT M for each segment/ack pair Compute smooth average of RTT RTT = α. RTT+(1- α). M α between 0.8 and 0.9 Set timeout based on RTT Time Out = 2 x RTT LECT-10, S-26

Jacobson Algorithm (Jacobson 1988) Keep Track of the Variance also Current Variance = RTT - M Keep a smooth estimate of D = α D + (1- α) RTT-M Timeout= RTT + 4*D If there is a retransmission, and one ACK comes back which RTT should be used? LECT-10, S-27 Karn/Partridge Algorithm If there is a retransmission which RTT are we measuring? KP Solution: Do not sample RTT when retransmitting Double timeout after each retransmission (exponential back-off) Notes algorithm only as good as granularity of clock (500ms on Unix) accurate timeout mechanism important to congestion control (later) LECT-10, S-28

Flow Control 29