Chapter 5 TCP Control Flow

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

Transportation Layer (2). TCP full duplex data: – bi-directional data flow in same connection – MSS: maximum segment size connection-oriented: – handshaking.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transmission Control Protocol (TCP)
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
TCP/IP Protocol Suite 1 Chapter 13 Upon completion you will be able to: Stream Control Transmission Protocol Be able to name and understand the services.
Network Protocols Mark Stanovich Operating Systems COP 4610.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.
The Transport Layer Chapter 6. The Transport Service Services Provided to the Upper Layers Transport Service Primitives Berkeley Sockets An Example of.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Transport Layer Computer Networks. 2 Where are we?
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.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
Transportation Layer (1). Transportation Layer Very similar to the data link layer. – two hosts connected by a link or two hosts connected by a network.
Interfaces and Services Each layer provides a service to the layer above it. A service is a set of primitive operations. Under UNIX, primitives are implemented.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Connection Establishment and Termination. Tcpdump tcpdump is a common packet analyzer that runs under the command line. It allows the user to intercept.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
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.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Network Protocols Andy Wang Operating Systems COP 4610 / CGS 5765.
The Transport Layer Dr. ir. S.S. Msanjila RIS 251.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Advanced Computer Networks
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Ch23 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
Chapter 5 Transport Layer Introduction
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.
Unit-7 The Transport Layer.
5. End-to-end protocols (part 1)
Chapter 17 and 18: TCP is connection oriented
Process-to-Process Delivery, TCP and UDP protocols
TCP.
PART 5 Transport Layer Computer Networks.
Net 221D : Computer Networks Fundamentals
Chapter 6: Transport Layer (Part I)
CS 5565 Network Architecture and Protocols
TCP - Part I Karim El Defrawy
Transport Layer Unit 5.
Sarah Diesburg Operating Systems COP 4610
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
TCP Connection Establishment and Termination
Chapter 6 The Transport Layer The Transport Service & Elements of Transport Protocols.
CS 5565 Network Architecture and Protocols
CS4470 Computer Networking Protocols
TCP Details.
TCP Connection Establishment and Termination
Andy Wang Operating Systems COP 4610 / CGS 5765
PART V Transport Layer.
PART 5 Transport Layer.
Process-to-process delivery UDP TCP SCTP
Transportation Layer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Chapter 5 TCP Control Flow
Introduction to Computer Networks
Lecture 21 and 22 5/29/2019.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

Chapter 5 TCP Control Flow Networking CS 3470, Section 1

TCP Control Flow TCP connections include 3-way handshake to start connection Transfer of data with ACKs Connection tear-down SequenceNum field contains the sequence number for the first byte of data carried in segment

TCP Connection Establishment Both the client and server have to open a connection Server must start first to be able to accept incoming connections Performs a passive open Client can then connect to the server Performs an active open

TCP Connection Establishment Both parties (client and server) must agree on the starting sequence numbers Each side has its own set of sequence numbers that start at some random number Sequence numbers are exchanged during the TCP three-way handshake algorithm, which establishes a TCP connection between two hosts

TCP Three-Way Handshake Algorithm Acknowledgment field identifies the “next sequence number expected”, implicitly acknowledging all earlier sequence numbers

TCP State-Transition Diagram Some arcs are not shown Most of states that involve sending segments also schedule a timeout for the ACK response If ACK not received, retransmit If after several tries the ACK does not arrive, TCP gives up and returns to CLOSED state

TCP State-Transition Diagram When closing connection Connection in TIME_WAIT state cannot move to CLOSED until it has waited 120 seconds Prevents delayed FINs from accidentally tearing down new connections

Introduction to Project 4 Model TCP state-transition diagram in your own program Will help you make sense of network traffic for last project

Closing a Connection Reaching agreement: two approaches Abort: send close msg to peer, delete state info What if close() message lost? Graceful: send close msg, but before deleting state Wait for peer to acknowledge close() Problem solved? Can I decide to close, knowing that Other entity also agreed to close and knows that I will close Can two armies coordinate their attacks If communication is unreliable? For closing connection, we can just send a close message to the peer and delete the state on our side. But what if the close message is lost. The peer would not know the connection is closed. So a graceful way is to send a close message and wait for ack. The peer would send an ack and delete its state. On receiving ack, we can also delete the state. What if ack is lost? The peer would have deleted the state and we wouldn’t have. This problem is similar to the two-army problem discussed in textbook.

The Byzantine Generals’ Problem Two generals are on the tops of two mountain.

The Byzantine Generals’ Problem They communicate only through messengers (pigeon network?)…

The Byzantine Generals’ Problem They need to coordinate the attack…

The Byzantine Generals’ Problem If they attack at the same time, they win…

The Byzantine Generals’ Problem If they attack at different times, they will die

The Byzantine Generals’ Problem Question: can they guarantee a synchronized attack?

The Byzantine Generals’ Problem 11 am OK?

The Byzantine Generals’ Problem Sounds good.

The Byzantine Generals’ Problem I got your “Sounds good.”

The Byzantine Generals’ Problem What if the last message is lost? great!

The Byzantine Generals’ Problem What if the last message is lost? Does the other general know I got his “Sounds good” message? great!

The Byzantine Generals’ Problem Over an unreliable network, we cannot guarantee network synchronization Rats.

The Byzantine Generals’ Problem It can be proven that no protocol exists that works to solve this problem. Three-way handshake will not work, so does not four-way handshake. What do we do?

The Byzantine Generals’ Problem It can be proven that no protocol exists that works to solve this problem. Three-way handshake will not work, so does not four-way handshake. What do we do? Three- or four-way handshake is normally used to release connections Then give up

Connection Release 6-14, a, b DR: Disconnect request Four protocol scenarios for releasing a connection. (a) Normal case of a three-way handshake. (b) final ACK lost.

Connection Release 6-14, c,d (c) Response lost. (d) Response lost and subsequent DRs lost.