Intro to LAN/WAN. Transport Layer

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

05 Transmission Control Protocol (TCP)

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

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

User Datagram Protocol

CMPE 150 Winter 2009

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Computer Networks and Data Systems

Kent State University

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

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

User Datagram Protocol (UDP):

ECE 650 Systems Programming & Engineering. Spring 2018

Transport Layer TCP / UDP

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

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

Chapter 24. Transport-Layer Protocols

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

CS4700/CS5700 Fundamentals of Computer Networks

QUIZ: Longest Matching Prefix

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

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

UDP, TCP, IP multicast

CSC 4900 Computer Networks: TCP

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

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

CSCE 463/612 Networks and Distributed Processing Spring 2017

Chapter 6. (Week 12) The Transport Layer (CONTINUATION) ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP

CS457 Transport Protocols. CS 457 Fall 2014

CSCD 330 Network Programming

TSIN02 - Internetworking

TCP/IP-2. Transmission control protocol:

Introduction to Networks and the Internet

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

Fall 2012: FCM 708 Bridge Foundation I

Outline. CS5984 Mobile Computing

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

TSIN02 - Internetworking

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

Transport Layer Protocols TCP

Transport Layer: Outline

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

TSIN02 - Internetworking

Lecture 3: The Transport Layer: UDP and TCP

Transport Protocols and TCP

8. TCP Congestion Control

Transport Protocols & TCP TCP

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

Transport Protocols and TCP: Review

UNIT IV -- TRANSPORT LAYER

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

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

Transmission Control Protocol (TCP)

Reliable Transport I: Concepts and TCP Protocol

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

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

Networking Technologies and Applications

TSIN02 - Internetworking

TCP/IP Protocol Suite 1

Chapter 3- parte B outline

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Transport Layer: outline

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

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

Transport Layer Marcos Vieira

Congestion Avoidance and Control. Rohan Tabish and Zane Ma

The Transmission Control Protocol (TCP)

Lecture 4: Congestion Control

TCP Congestion Control

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson

CS321: Computer Networks Error and Flow Control in TCP

Chapter 3 Transport Layer

ETSF10 Internet Protocols Transport Layer Protocols

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

COMP/ELEC 429/556 Introduction to Computer Networks

Outline. Connecting to the access network: DHCP and mobile IP, LTE. Transport layer: UDP and TCP

10 minutes survey (anonymous)

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

Problem 7. Problem 8. Problem 9

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

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

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

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

TCP Overview. Connection-oriented Byte-stream

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

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

CSCI Topics: Internet Programming Fall 2008

TCP over wireless links

II. Principles of Computer Communications Network and Transport Layer

TCP : Fundamentals of Computer Networks Bill Nace

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

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

Applied Networks & Security

TCP: Flow and Error Control

Mobile Transport Layer Lesson 02 TCP Data Stream and Data Delivery

L12: end to end layer

Chapter III: Transport Layer

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

NWEN 243. Networked Applications. Layer 4 TCP and UDP

Programming Assignment 3: Transmission Control Protocol

Transcription:

Intro to LAN/WAN Transport Layer

Transport Layer Topics Introduction (6.1) Elements of Transport Protocols (6.2) Internet Transport Protocols: TDP (6.5) Internet Transport Protocols: UDP (6.4)

socket interface Application 1 Application 2 socket interface user kernel user kernel Socket Socket Underlying communication Protocols TCP/UDP IP Ethernet TCP/UDP IP Ethernet Underlying communication Protocols Physical Layer Physical Layer Communications network Copyright 2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 2.16

TCP Connection-oriented Reliable, end-to-end byte-stream message boundaries not preserved Adapt to a variety of underlying networks Robust in the face of failures (IP: no guarantees) Break data into segments Sliding window

TCP Service Model Sender and receiver create end points (sockets) One socket may be used for multiple connections Well-known services at well known port numbers FTP (port 21) telnet (port 23), etc Inetd deamon (UNIX) listens for all connects (FTP, telnet, etc) Forks off new process to handle new connections (at designated ports) Other daemons (FTP, telnet, etc) only active when work to do Inetd learns about what ports to use from config. file

TCP Service Model All TCP connections are full-duplex (can send both ways) Point-to-point: each connection has two end points Does not support multicast or broadcast (need either different protocol or improvement) Multicast (not TCP) protocols used for multicast

TCP Segment Header

TCP Protocol TCP entitites (sender, receiver) exchange segments TCP segment: 20-byte header (plus optional part) Followed by zero or more data bytes TCP software decides size of segments (fragmentation) Segments can be split up or aggregated must fit into 65,515-byte IP payload Also networks have Maximum Transfer Unit (MTU), such as 1500-byte limit on Ethernet

TCP Protocol Basic protocol uses sliding window Sender starts timer when it sends data Receiver can either piggyback ACK or alone Sender resends if its timer goes off Subtle issues TCP must deal with: Segments can be delayed or arrive out of order (different routes?) In fact, retransmissions may be different byte range from original

TCP Connection Establishment Uses three-way handshake (similar to that previously discussed)

TCP Connection Release Although connections are full-duplex, think simplex for connection release Either end (sender, receiver) can send segment with FIN bit set FIN acknowledged, that direction is done!! Data may continue to flow in other direction Process repeated in other direction to close Connection closes when both ends close Usually two FIN-ACK pairs (4 pkts) to close May piggyback to reduce packets sent Two-army problem: if no ACK within set time, close!!

TCP Transmission Policy TCP receiver advertises its window size (remaining buffer space) Window management in TCP.

TCP Transmission Policy Do not have to send immediately avoid many small packets Some TCP implementations delay pkts, ACKs for 500 msec to see if it can get more stuff to send Nagle s Algorithm only 1 outstanding byte at a time fill up, then send time delay, then send bad for some apps (X - with mouse movements)

Silly Window Syndrome Sender sends in large chunks Application reads 1 byte at a time Fix: receiver only advertises send window when 1/2 full

TCP Congestion Control Even if sender and receiver agree, still problems

TCP Congestion Control Sender tracks two windows Receiver buffer via receiver s window (via advertisements) Network buffer via congestion window Effective buffer is minimum of receiver and network Ex: Receiver says 8k, Network says 4k then 4k Receiver says 8k, Network says 32k then 8k

Network buffer Avoiding Congestion starts at 1 segment increases exponentially (doubles) until timeout or receiver s window reached or threshold (initially 64K), then increases linearly slow start (required by TCP, Jacobson 1988) Internet congestion includes threshold linear past threshold (called congestion avoidance) when timeout, reduce threshold to half of current window and restart slow start can go up

TCP Congestion Control An example of the Internet congestion algorithm.

TCP Congestion Control Summary When below threshold, grow exponentially slow start When above threshold, grow linearly congestion avoidance When timeout, set threshold to 1/2 current window and set window to 1 How do you select timer values? Important, since timeouts restrict throughput Timer management

Timer Management Retransmission timer: most important in TCP Optimal timer setting? Too short, too many retransmissions, packets clog up network Too long, performance suffers Need dynamic algorithm since conditions can change Want to set timeout to minimal value where segment is known to be lost (quickly resend) Generally set timer as a function of Roundtrip (RTT) So, need estimate of round-trip time (RTT) how to get it? Why can t you just measure RTT once and fix timeout timer?

Timer Management Difficult when much variance RTT = αrtt + (1-α)M (α = 7/8, M ack time) α is smoothing function determining contribution of old RTT + add variance, don t update on retransmits