CS332, Ch. 26: TCP Victor Norman Calvin College 1.

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

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 5 Transport Layer TCP/IP Protocols.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
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.
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.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Ch 23 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
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?
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
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.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
University of the Western Cape Chapter 12: The Transport Layer.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Transport Layer: UDP, TCP
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 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
ECE 4110 – Internetwork Programming
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
Cisco I Introduction to Networks Semester 1 Chapter 7 JEOPADY.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
Ch. 25, 26 UDP, TCP CS332, Spring 2016 Victor Norman, Professor Extraordinaire.
Ch 3. Transport Layer Myungchul Kim
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
Ch 3. Transport Layer Myungchul Kim
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Victor Norman IS333 Spring 2016
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.
Introduction to Networks
Process-to-Process Delivery, TCP and UDP protocols
TCP.
PART 5 Transport Layer Computer Networks.
Magda El Zarki Professor, ICS UC, Irvine
Introduction of Transport Protocols
TCP - Part I Karim El Defrawy
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

CS332, Ch. 26: TCP Victor Norman Calvin College 1

What are the important characteristics of TCP? Connection-oriented Point-to-point Full duplex Reliable Uses ports to identify applications using TCP. 2

What does TCP assume it gets from the layer below? Connection-less Point-to-point Simplex Unreliable delivery 3

What does connection-oriented mean? End points must communicate first and set up the virtual connection. No data is sent until that’s finished. End points must gracefully tear down the connection. 4

What does a Virtual Connection mean? The endpoints set up and maintain all the state of the “connection” – the middle devices (routers, NATs, etc.) know nothing about it. As opposed to a circuit through a network in which all devices must participate. 5

What does point-to-point mean? One application talks to one application – one port to one port 6

What does full duplex mean? Both applications on the endpoints can transmit at the same time. 7

What does reliable delivery mean? Gets the data there – quickly – correctly (without errors) – in order – completely 8

What kinds of problems does TCP have to be able to handle? Very unreliable delivery from IP. – Duplicate packets. – Packets out of order. – Errors in packets. Differing speeds of end points. End point reboot. Delay from when network changes radically. 9

How does TCP handle all this? Unreliable delivery from IP?: – checksum the data (eliminate bad data) – keep track of which bytes have been sent and which have been received, and resend missing bytes – “acknowledgement and retransmission” 10

How does TCP handle all this? (part 2) Different speeds of end points?: – (Two problems: how much data an end point can handle at once, and how long it takes to handle it.) – End points constantly communicate how much more data they can still handle at that time (called “window advertisement”). – This is “flow control”. 11

How does TCP handle all this? (part 3) End point reboot? (Or application on an endpoint restarts.) – Every connection is given a unique identifier and packets with that id are only accepted. 12

How does TCP handle all this? (part 4) Delay from network changes radically: consider this: – end points want to get data through as fast as possible (in general). – Usually end points want data to flow consistently, not bursty. – When network “goes down” for a bit, the more data that is “in transit”, the more has to be retransmitted. – This problem is very complex. Called “congestion control”. 13

Collapsing ACKs Q: Couldn’t TCP be more efficient by sending one ack after receiving multiple packets? A: Yes, but how long does the end point wait before deciding to ACK what it has and not wait for any more? And, the longer it waits the lower the bandwidth utilization of the network… 14

How unreliable is UDP? Q: TCP is reliable, but in comparison how much of a problem is the unreliability of UDP? A: Hard to say… Anecdotally, a student a few years ago implemented a protocol in UDP and could not get it to work fast enough because he had to write so much logic into the protocol to make it pseudo-reliable. He kept losing packets when sending them over a long-haul… 15

Idle Connections? Q: What about idle connections? Are no packets sent? If the connection goes idle does it get shut down? A: If there is no data to send, the connection stays alive but no packets are sent. You can turn on TCP keep-alives via a socket API. This causes the client to periodically send an empty data packet that is ACKed. It is useful just for checking if the peer is still up and running. 16

Packets/Segments/Windows Q: What happens if a single packet in a window gets lost? Do we have to transmit the whole window that packet was in, or just the packet? A: A window is a just a number of bytes the receiver is able/prepared to receive. It is not a number of packets/segments. If some # of bytes (sent in a segment) is lost, the sender will retransmit. 17

Congestion Collapse Q: What is congestion collapse? A: Congestion collapse is when congestion happens in a bottleneck in the network (usually a router), and the router discards packets. When the endpoints detect it, they retransmit, which only makes more traffic at the bottleneck, which causes more dropped packets and more retransmits. … 18

Flow control vs. Congestion Control Flow control via a sliding window allows multiple packets (“segments”) to be sent before any ACK is received. This increases bandwidth utilization (i.e., “speed”). Congestion control reduces the amount of traffic being sent to avoid congestion collapse. Both are done by manipulating the window size on a TCP connection. 19

Congestion Detection Congestion is detected by… – increased round-trip time (data  ack). – timeouts. The reaction is to reduce the window size and increase the per-packet timeout value. 20

Host Settings Q: Is there something that hosts implementing TCP could do to minimize congestion and avoid having TCP control it or is it better to have TCP adjust window sizes and handle it that way? A: You can reduce congestion and increase the number of clients that can connect, and improve security by having a server advertise a very small window size when a connection is established. 21

SYN and FIN Q: How are SYN and FIN exactly sent and how do they look like? More specifically, how will the TCP header differ for a SYN and FIN from for example a regular packet being sent? Is that determined in the options field of the TCP header? A: A TCP header has flag fields, including SYN, ACK, and FIN flags. 22

Piggybacking Note that when data is flowing both directions, and packet containing TCP data in one direction can also carry the ACK for data flowing in the opposite direction. A SYNACK packet (in the 3-way handshake) is similar – it ACKs the first SYN packet and indicates a SYN in the opposite direction. The response is to send an ACK packet (which I think could carry data). 23

Lost teardown ACK Q: What would happen if the final ACK of a connection closing 3-way handshake is lost? A: The connection would remain in “half-closed” state, I think. Similar to SYN flood DDoS attack, where a bad guy floods a server with SYN packets, but never ACKs them. The server allocates resources (socket port) on SYN, and holds them for a while if not ACKed. The connections are in “Half-opened” state. 24