CSCI-1680 Transport Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.

Slides:



Advertisements
Similar presentations
TCP/IP Christopher Zacky. lolwut Decimal Numbers.
Advertisements

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.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
TCP 與 UDP 協定分析 第 22 組 b 陳贊羽 b 馬家驤 b 林怡賢 b 王奕棠.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
TCP & UDP - Protocol Details Yen-Cheng Chen
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 5 End-to-End Protocols Copyright © 2010, Elsevier Inc. All rights.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Networks I Transmission Control Protocol Instituto Tecnológico y de Estudios Superiores de Monterrey Campus Estado de México Prof. MSc. Ivan A. Escobar.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
Transmission Control Protocol (TCP) Basics
10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
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 – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
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.
CSCI-1680 Transport Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
CSCI-1680 Transport Layer I Based partly on lecture notes by Rodrigro Foncesa, David Mazières, Phil Levis, John Jannotti Theophilus Benson.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
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 TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
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 Chapter 1 OSI Architecture The OSI 7-layer Model OSI – Open Systems Interconnection.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
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.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
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.
Transmission Control Protocol
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
1 Introduction to Computer Networks University of ilam Dr. Mozafar Bag-Mohammadi Transport Layer.
81 Sidevõrgud IRT 0020 loeng okt Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Hour 6 The Transport Layer 1. What You'll Learn in This Hour Connections oriented and connectionless protocols Ports and sockets TCP UDP 2.
Transport Protocols.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
5. End-to-end protocols (part 1)
Transport Layer.
Process-to-Process Delivery
TCP.
TCP - Part I Karim El Defrawy
CSCI-1680 Transport Layer I
CSCI-1680 Transport Layer I
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Chapter 5 Transport Layer Introduction
CSCI-1680 Transport Layer I
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Chapter 5 Transport Layer Introduction
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
Presentation transcript:

CSCI-1680 Transport Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca

Administrivia Homework 2 out since Sunday –Due Friday (hours flexible): you get graded before midterm –No late days until Monday at 4pm (free extension) –No grade after that! (We release the solutions before the midterm) Studying for the midterm –Similar questions to homeworks, end-of-chapter problems in the book

Today IPv6 (see slides from previous class) Transport Layer –UDP –TCP Intro

Transport Layer Transport protocols sit on top of network layer Problem solved: communication among processes –Application-level multiplexing (“ports”) –Error detection, reliability, etc.

UDP – User Datagram Protocol Unreliable, unordered datagram service Adds multiplexing, checksum End points identified by ports –Scope is an IP address (interface) Checksum aids in error detection

UDP Header

UDP Checksum Uses the same algorithm as the IP checksum –Set Checksum field to 0 –Sum all 16-bit words, adding any carry bits to the LSB –Flip bits to get checksum (except 0xffff->0xffff) –To check: sum whole packet, including sum, should get 0xffff How many errors? –Catches any 1-bit error –Not all 2-bit errors Optional in IPv4: not checked if value is 0

Pseudo Header UDP Checksum is computer over pseudo-header prepended to the UDP header –For IPv4: IP Source, IP Dest, Protocol (=17), plus UDP length What does this give us? What is a problem with this? –Is UDP a layer on top of IP? | source address | | destination address | | zero |protocol| UDP length |

Next Problem: Reliability Review: reliability on the link layer ProblemMechanism Acknowledgments + TimeoutDropped Packets Duplicate PacketsSequence Numbers Packets out of orderReceiver Window Keeping the pipe fullSliding Window (Pipelining) Single link: things were easy…

Transport Layer Reliability Extra difficulties –Multiple hosts –Multiple hops –Multiple potential paths Need for connection establishment, tear down –Analogy: dialing a number versus a direct line Varying RTTs –Both across connections and during a connection –Why do they vary? What do they influence?

Extra Difficulties (cont.) Out of order packets –Not only because of drops/retransmissions –Can get very old packets (up to 120s), must not get confused Unknown resources at other end –Must be able to discover receiver buffer: flow control Unknown resources in the network –Should not overload the network –But should use as much as safely possible –Congestion Control (next class)

TCP – Transmission Control Protocol Service model: “reliable, connection oriented, full duplex byte stream” –Endpoints: Flow control –If one end stops reading, writes at other eventually stop/fail Congestion control –Keeps sender from overloading the network (next lecture)

TCP Specification –RFC 793 (1981), RFC 1222 (1989, some corrections), RFC 5681 (2009, congestion control), … Was born coupled with IP, later factored out –We talked about this, don’t always need everything! End-to-end protocol –Minimal assumptions on the network –All mechanisms run on the end points Alternative idea: –Provide reliability, flow control, etc, link-by-link –Does it work?

TCP Header | Source Port | Destination Port | | Sequence Number | | Acknowledgment Number | | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | | Checksum | Urgent Pointer | | Options | Padding | | data |

Header Fields Ports: multiplexing Sequence number –Correspond to bytes, not packets! Acknowledgment Number –Next expected sequence number Window: willing to receive –Lets receiver limit SWS (even to 0) for flow control Data Offset: # of 4 byte header + option bytes Flags, Checksum, Urgent Pointer

Header Flags URG: whether there is urgent data ACK: ack no. valid (all but first segment) PSH: push data to the application immediately RST: reset connection SYN: synchronize, establishes connection FIN: close connection

Establishing a Connection Three-way handshake –Two sides agree on respective initial sequence nums If no one is listening on port: server sends RST If server is overloaded: ignore SYN If no SYN-ACK: retry, timeout Listen, Accept… Accept returns Connect

Connection Termination FIN bit says no more data to send –Caused by close or shutdown –Both sides must send FIN to close a connection Typical close FIN ACK FIN ACK Close FIN_WAIT_1 CLOSE_WAIT FIN_WAIT_2 LAST_ACK TIME_WAIT CLOSED … 2MSL

Summary of TCP States Passive close: Can still send! Active close: Can still receive Connection Establishment Unsynchronized Synchronized

TIME_WAIT Why do you have to wait for 2MSL in TIME_WAIT? –What if last ack is severely delayed, AND –Same port pair is immediately reused for a new connection? Solution: active closer goes into TIME_WAIT –Waits for 2MSL (Maximum Segment Lifetime) Can be problematic for active servers –OS has too many sockets in TIME_WAIT, can accept less connections Hack: send RST and delete socket, SO_LINGER = 0 –OS won’t let you re-start server because port in use SO_REUSEADDR lets you rebind

How about some data? Next Class: sliding window revisited –Used for reliability and in-order delivery (acks, timeouts, sequence numbers, buffers) –New: flow control, by means of receiver Window size –New: congestion control, sender intelligently sets SWS

Coming Up IP handins: please pay attention to the issues we discussed today, good luck! Next week: Transport Layer