Transport Protocols. Raj Jain. Washington University in St. Louis

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

Lecture 3: The Transport Layer: UDP and TCP

TSIN02 - Internetworking

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

TSIN02 - Internetworking

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

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

TSIN02 - Internetworking

TSIN02 - Internetworking

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

Computer Networks. Wenzhong Li. Nanjing University

05 Transmission Control Protocol (TCP)

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

Networking Technologies and Applications

ECE4110 Internetwork Programming. Introduction and Overview

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

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

Transport Protocols and TCP

6. The Transport Layer and protocols

User Datagram Protocol

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

TCP = Transmission Control Protocol Connection-oriented protocol Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

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

Introduction to TCP/IP networking

Internet and Intranet Protocols and Applications

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

OSI Transport Layer. objectives

Transmission Control Protocol (TCP)

Network Technology 1 5th - Transport Protocol. Mario Lombardo -

User Datagram Protocol (UDP):

Information Network 1 TCP 1/2. Youki Kadobayashi NAIST

Congestion / Flow Control in TCP

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

Transport Protocols & TCP TCP

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

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Transport Layer Protocols. Internet Transport Layer. Agenda. TCP Fundamentals

TCP : Fundamentals of Computer Networks Bill Nace

TCP /IP Fundamentals Mr. Cantu

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

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

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

CSE 4213: Computer Networks II

Computer Communication Networks Midterm Review

I TCP 1/2. Internet TA: Connection-oriented (virtual circuit) Connectionless (datagram) (flow control) (congestion control) TCP Connection-oriented

Internet Transport Protocols UDP and TCP

CSCI-GA Operating Systems. Networking. Hubertus Franke

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Chapter 7. The Transport Layer

Computer Networks. Transmission Control Protocol. Jianping Pan Spring /3/17 CSC361 1

Information Network 1 TCP 1/2

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

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

ITS323: Introduction to Data Communications

TCP: Transmission Control Protocol UDP: User Datagram Protocol TCP - 1

Transport Layer Marcos Vieira

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

Unit 2.

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

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

Introduction to Networks and the Internet

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

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

CSCD 330 Network Programming

ECE 435 Network Engineering Lecture 15

Simulation of TCP Layer

ECE 650 Systems Programming & Engineering. Spring 2018

Chapter 24. Transport-Layer Protocols

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

Transport Layer: outline

Transport Protocols and TCP: Review

TCP/IP Protocol Suite 1

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

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

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

The Transport Layer: TCP & Reliable Data Transfer

EEC-682/782 Computer Networks I

UNIT IV -- TRANSPORT LAYER

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

Introduction to Network. Topics

CS457 Transport Protocols. CS 457 Fall 2014

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

QUIZ: Longest Matching Prefix

Sequence Number. Acknowledgment Number. Checksum. Urgent Pointer plus Sequence Number indicates end of some URGENT data in the packet

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

ICMP. Outline ICMP. ICMP oicmp is provided within IP which generates error. Internet Control Message Protocol. Ping Traceroute

9th Slide Set Computer Networks

ECE 435 Network Engineering Lecture 9

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

The Transmission Control Protocol (TCP)

Sequence Number. Acknowledgment Number. Data

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

CSC 401 Data and Computer Communications Networks

Transport Layer: Outline

NWEN 243. Networked Applications. Layer 4 TCP and UDP

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

Transcription:

Transport Protocols Raj Jain Washington University Saint Louis, MO 63131 Jain@cse.wustl.edu These slides are available on-line at: http://www.cse.wustl.edu/~jain/cse473-05/ 16-1

Overview q TCP q Key features q Header format q Mechanisms q Implementation choices q Slow start congestion avoidance q UDP 16-2

TCP q Transmission Control Protocol q Key Services: q Send: Please send when convenient q Data stream push: Please send it all now, if possible. q Urgent data signaling: Destination TCP! please give this urgent data to the user (Urgent data is delivered in sequence. Push at the source should be explicit if needed.) q Note: Push has no effect on delivery. Urgent requests quick delivery 16-3

TCP Header Format Source Dest Seq Ack Data Resvd Control Window Port Port No No Offset 16 16 32 32 4 6 6 16 Checksum Urgent Options Pad Data 16 16 x y Size in bits 16-4

TCP Header q Source Port (16 bits): Identifies source user process q Destination Port (16 bits) 20 = FTP, 23 = Telnet, 53 = DNS, 80 = HTTP,... q Sequence Number (32 bits): Sequence number of the first byte in the segment. If SYN is present, this is the initial sequence number (ISN) and the first data byte is ISN+1. q Ack number (32 bits): Next byte expected q Data offset (4 bits): Number of 32-bit words in the header q Reserved (6 bits) 16-5

TCP Header (Cont) q Control (6 bits): Urgent pointer field significant, Ack field significant, Push function, Reset the connection, Synchronize the sequence numbers, No more data from sender URG ACK PSH RST SYN FIN qwindow (16 bits): Will accept [Ack] to [Ack]+[window]-1 16-6

TCP Header (Cont) q Checksum (16 bits): covers the segment plus a pseudo header. Includes the following fields from IP header: source and dest adr, protocol, segment length. Protects from IP misdelivery. q Urgent pointer (16 bits): Points to the byte following urgent data. Lets receiver know how much data it should deliver right away. q Options (variable): Max segment size (does not include TCP header, default 536 bytes), Window scale factor, Selective Ack permitted, Timestamp, No-Op, End-of-options 16-7

TCP Options Kind Length Meaning 0 1 End of Valid options in header 1 1 No-op 2 4 Maximum Segment Size 3 3 Window Scale Factor 8 10 Timestamp q End of Options: Stop looking for further option q No-op: Ignore this byte. Used to align the next option on a 4- byte word boundary q Max Segment Size (MSS): Does not include TCP header 16-8

TCP Checksum q Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the TCP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets. q Checksum field is filled with zeros initially q TCP length (in octet) is not transmitted but used in calculations. q Efficient implementation in RFC1071. Source Adr Dest. Adr Zeros Protocol TCP Length 32 32 8 8 16 TCP Header TCP data 16-9

1 s s Complement 2 s Complement: -ve of a number is 1+complement q 1 = 0001-1 = 1111 q 2 = 0010-2 = 1110 q 3 = 0011-3 = 1101 1 s complement: -ve of a number is it s complement q 1 = 0001-1 = 1110 q 2 = 0010-2 = 1101 q 3 = 0011-3 = 1100 2 s Complement sum: Add with carry 1 s complement sum: Add. Add the carry back to the sum q 8+9 = 1000 + 1001 = 1 0001 => 0001 + 1 = 0010 Complement of 1 s complement sum: 1101 Why: 1 s complement sum is independent of the Endian-ness of the machines. Little Endian = LSB is the left most bit. Big Endian = MSB is the left most bit 16-10

TCP Service Requests q Unspecified passive open: Listen for connection requests from any user (port) q Full passive open: Listen for connection requests from specified port q Active open: Request connection q Active open with data: Request connection and transmit data q Send: Send data q Allocate: Issue incremental allocation for receive data q Close: Close the connection gracefully q Abort: Close the connection abruptly q Status: Report connection status 16-11

TCP Service Responses q Open ID: Informs the name assigned to the pending request q Open Failure: Your open request failed q Open Success: Your open request succeeded q Deliver: Reports arrival of data q Closing: Remote TCP has issued a close request q Terminate: Connection has been terminated q Status Response: Here is the connection status q Error: Reports service request or internal error 16-12

TCP Mechanisms q Connection Establishment q Three way handshake q SYN flag set Request for connection SYN, ISN = 100 SYN, ISN = 350, Ack 101 q Connection Termination q Close with FIN flag set q Abort Ack 351 16-13

Data Transfer q Stream: Every byte is numbered modulo 2 32. q Header contains the sequence number of the first byte q Flow control: Credit = number of bytes q Data transmitted at intervals determined by TCP Push Send now q Urgent: Send this data in ordinary data stream with urgent pointer q If TPDU not intended for this connection is received, the reset flag is set in the outgoing segment 16-14

Implementation Policies (Choices) q Send Policy: Too little More overhead. Too large Delay Push Send now, if possible. q Delivery Policy: May store or deliver each in-order segment. Urgent Deliver now, if possible. q Accept Policy: May or May not discard out-of-order segments 16-15

Implementation Policies (Cont) q Retransmit Policy: First only Retransmit all Retransmit individual (maintain separate timer for each segment) q Ack Policy: Immediate (no piggybacking) Cumulative (wait for outgoing data or timeout) 16-16

Slow Start Flow Control q Window = Flow Control Avoids receiver overrun q Need congestion control to avoid network overrun q The sender maintains two windows: Credits from the receiver Congestion window from the network Congestion window is always less than the receiver window q Starts with a congestion window (CWND) of 1 segment (one max segment size) Do not disturb existing connections too much. q Increase CWND by 1 every time an ack is received 16-17

Slow Start (Cont) q If segments lost, remember slow start threshold (SSThresh) to CWND/2 Set CWND to 1 Increment by 1 per ack until SSthresh Increment by 1/CWND per ack afterwards Congestion Window CWND 1 Timeout SSThresh 16-18 Time Receiver Window Idle Interval

Slow Start (Cont) q At the beginning, SSThresh = Receiver window q After a long idle period (exceeding one round-trip time), reset the congestion window to one. q Exponential growth phase is also known as Slow start phase q The linear growth phase is known as congestion avoidance phase 16-19

User Datagram Protocol (UDP) q Connectionless end-to-end service q No flow control. No error recovery (no acks) q Provides port addressing q Error detection (Checksum) optional. Applies to pseudo-header (same as TCP) and UDP segment. If not used, it is set to zero. q Used by network management Source Dest Checksum Length Port Port 16 16 16 16 Size in bits 16-20

Summary q TCP provides reliable full-duplex connections. q TCP Streams, credit flow control q Slow-start q UDP is connectionless and simple. No flow/error control. Has error detection. 16-21

Reading Assignment q Read Chapter 20 of Stallings 7th edition 16-22

Homework q Submit answer to Exercise 20.20 This homework is worth 30 points. q Exercise 20.20: A TCP entity opens a connection and uses slow start. Approximately how many round-trip times are required before TCP can send N segments. q Hint: Write down what the CWND and total segments will be after 1 round trips, 2 round trips, 3 round trips, 16-23