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

Similar documents
TSIN02 - Internetworking

TSIN02 - Internetworking

TSIN02 - Internetworking

TSIN02 - Internetworking

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

User Datagram Protocol

User Datagram Protocol (UDP):

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

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

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

Lecture 3: The Transport Layer: UDP and TCP

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

6. The Transport Layer and protocols

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

Information Network 1 TCP 1/2

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

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

ECE 650 Systems Programming & Engineering. Spring 2018

Your Name: Your student ID number:

05 Transmission Control Protocol (TCP)

Just enough TCP/IP. Protocol Overview. Connection Types in TCP/IP. Control Mechanisms. Borrowed from my ITS475/575 class the ITL

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

ECE4110 Internetwork Programming. Introduction and Overview

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

8. TCP Congestion Control

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

Networking Technologies and Applications

Intro to LAN/WAN. Transport Layer

Information Network 1 TCP 1/2. Youki Kadobayashi NAIST

The Transmission Control Protocol (TCP)

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

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

CSCI-GA Operating Systems. Networking. Hubertus Franke

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

Internet Transport Layer

Transport Layer Protocols. Internet Transport Layer. Agenda

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

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

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

ECE697AA Lecture 3. Today s lecture

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

QUIZ: Longest Matching Prefix

Transport Protocols and TCP

Transmission Control Protocol. ITS 413 Internet Technologies 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

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

Multiple unconnected networks

Introduction to TCP/IP networking

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM SOLUTION

TCP : Fundamentals of Computer Networks Bill Nace

9th Slide Set Computer Networks

COMP/ELEC 429/556 Introduction to Computer Networks

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

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

Simulation of TCP Layer

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

Computer Networks. Wenzhong Li. Nanjing University

The aim of this unit is to review the main concepts related to TCP and UDP transport protocols, as well as application protocols. These concepts are

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

EEC-682/782 Computer Networks I

Lecture 4: Congestion Control

xkcd.com End To End Protocols End to End Protocols This section is about Process to Process communications.

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

CS4700/CS5700 Fundamentals of Computer Networks

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Computer Networks and Data Systems

Process-to-Process Delivery:

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

OSI Transport Layer. objectives

Introduction to Networks and the Internet

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

UNIT IV -- TRANSPORT LAYER

TCP/IP Performance ITL

Fall 2012: FCM 708 Bridge Foundation I

CSC 634: Networks Programming

Computer Communication Networks Midterm Review

TCP/IP Protocol Suite 1

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

Congestion / Flow Control in TCP

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

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

Paper solution Subject: Computer Networks (TE Computer pattern) Marks : 30 Date: 5/2/2015

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

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

ITS323: Introduction to Data Communications

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

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

App. App. Master Informatique 1 st year 1 st term. ARes/ComNet Applications (7 points) Anonymous ID: stick number HERE

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

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

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Internet Transport Protocols UDP and TCP

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Unix Network Programming

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

ECE 435 Network Engineering Lecture 15

Transcription:

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

Transport Over IP What is a transport protocol? Choosing to use a transport protocol Ports and Addresses Datagrams UDP

What is a Transport Protocol? Provides common services between applications and network layer Rules for exchanging control messages and data End-to-End Different levels of services, TCP vs. UDP TCP, UDP, SCTP

Choosing to Use a Transport Protocol Network may provide little or no error detection Network may not retransmit data even if errors are detected Network may not provide end-to-end connectivity Network may not provide flow control

Ports and Addresses IP Address identifies end point IP Address alone cannot discern between multiple applications using the network services Port is a16 bit number 65535 ports available for every IP Address Socket => {source ip address, source port} Socket pair identifies a unique connection between two end points

Ports and Addresses IANA defines port ranges http://www.iana.org/assignments/port-numbers well-known ports: 0-1023 registered ports: 1024-49151 dynamic (ephemeral) ports 49152-65535 Root or superuser privileges are required for ports below 1024.

Datagrams Connectionless delivery no connection setup required Not reliable no indication that data was not received Up to the application to deal with retransmission and re-sequencing of data

User Datagram Protocol (UDP) Minimum protocol overhead Connectionless datagram service Destination port identifies application Reassembles fragmented data for application

UDP Message Format 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ Source Destination Port Port +--------+--------+--------+--------+ Length Checksum +--------+--------+--------+--------+ data octets... +----------------...

UDP Checksum 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 UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets. Same as IP header checksum

UDP Checksum The pseudo header conceptually prefixed to the UDP header contains the source address, the destination address, the protocol, and the UDP length. This information gives protection against misrouted datagrams. This checksum procedure is the same as is used in TCP. 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ source address +--------+--------+--------+--------+ destination address +--------+--------+--------+--------+ zero protocol UDP length +--------+--------+--------+--------+

Raw IP vs UDP Raw IP uses next protocol field to identify app 1 ICMP 2 IGMP 4 IP 6 TCP 17 UDP 89 OSPFIGP Next protocol field is only 8 bits http://www.iana.org/assignments/protocol-numbers/ TFTP/BOOTP use UDP datagram services available from TCP/IP stack

Transmission Control Protocol (TCP) Connection-oriented protocol Capabilities are negotiated, e.g., MSS Reliable transport protocol Connections are closed when no longer needed Control and data info can be mixed in the same message Uses IP protocol identifier: 6

TCP Header TCP Header Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Connection Establishment Server must be listening issues a Listen request via the Sockets API Client initiates connection by sending a tcp packet with the SYN flag set Local port selected from ephemeral port range this range is usually OS dependent Server replies with SYN and ACK flags set Client replies with ACK flag set and connection is now open

TCP 3-Way Handshake

tcpdump of 3-Way Handshake 14:19:36.446464 arp who-has 192.168.1.1 tell 192.168.1.7 14:19:36.446826 arp reply 192.168.1.1 is-at 0:0:88:5:e:1 14:19:36.447423 192.168.1.7.1328 > 192.168.1.1.www: S 1620878225:1620878225(0) win 16384 <mss 1460,nop,nop,sackOK> (DF) (ttl 128, id 29498) 14:19:36.448085 192.168.1.1.www > 192.168.1.7.1328: S 595341843:595341843(0) ack 1620878226 win 16060 <mss 1460,nop,nop,sackOK> (DF) (ttl 64, id 6 3234) 14:19:36.448696 192.168.1.7.1328 > 192.168.1.1.www:. ack 1 win 17520 (DF) (ttl 128, id 29500)

Data Transfer TCP segment size (MSS) is determined by the MTU of the local link 1460 for ethernet TCP reassembles fragments and reorders segments before passing the data to the application

Acknowledgements and Flow Control TCP uses cumulative ACKs and specifies the next sequence number expected ACK can be sent alone or as a piggy-backed acknowledgement Window size tells sender how much data the receiver can currently accept Window size of zero means stop sending

TCP Close

TCP Delayed Acknowledgments TCP will try to piggyback ACKs with data ACKs may not be sent immediately The delay for TCP must be less than 500 ms

Nagle Algorithm RFC 896 Some apps generate data 1 byte at a time (telnet, rlogin) 41 byte packets are generated to send 1 byte If there is unacknowledged data - do not send small segments until outstanding data has been acknowledged When to disable Nagle X Window Systems - mouse movements Otherwise we may encounter up to a 500ms delay

Sliding Windows

Slow Start Proposed by Van Jacobson Used for congestion control Packets sent depending on the rate at which ACKs are received Uses a congestion window: cwnd cwnd is initialized to 1 byte Each time an ACK is received cwnd increases by one segment Sender transmits min(cwnd,advertised win) cwnd - congestion control imposed by sender advertised win - congestion control imposed by receiver

Bandwidth Delay Product capacity (bits) = bandwidth (bits/s) x round-trip time (sec) RTT across the US ~ 50 ms T1 link: 1.544 Mbps capacity = 1.544 Mbps * 50 ms = 9650 Bytes Minimum window size necessary to fully utilize the link capacity T3 link: 45 Mbps - capacity = 281250 bytes window-size is only 16 bits!

Window Scale Factor Window size = 2^F, where F max = 14 Option negotiated during connection establishment only appears with syn Extends window-size to ~ 1GB

Congestion Avoidance Packet loss indicated by timeout receipt of duplicate ACKs Implemented along with slow start cwnd: congestion window ssthresh: slow start threshold

Congestion Avoidance When congestion occurs timeout reception of duplicate ACKs 1/2 the current window size is saved in ssthresh if it was a timeout, cwnd is set to 1 (slow start) if cwnd <= ssthresh: slow start, otherwise congestion avoidance

Congestion Avoidance

Real-Time Transport Protocol (RTP) Runs on top of UDP Supports multicast transmission Used for real-time applications: voice video Timestamp field allows applications to deal with jitter jitter - variation in delay

RTP Control Protocol (RTCP) Provides feedback via multicast concerning the quality of the transmission Allows the source to reduce the transmission rate if necessary to improve QoS