CS 4390 Computer Networks. Transport Services and Protocols

Similar documents
Chapter 3 Transport Layer

Chapter 3 Transport Layer

Transport Layer. Chapter 3: Transport Layer

CSC 401 Data and Computer Communications Networks

CS 3516: Computer Networks

Chapter III: Transport Layer

CSC 4900 Computer Networks: Transport Layer

CMSC 332 Computer Networks Transport Layer

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. ** Slides are attributed to J. F.

Lecture 9: Transpor Layer Overview and UDP

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

CSC358 Week 4. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

COSC4377. Useful Linux Tool: screen

Input ports, switching fabric, output ports Switching via memory, bus, crossbar Queueing, head-of-line blocking

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Announcement. Homework 1 due last night, how is that? Will discuss some problems in the lecture next week

Chapter 3 Transport Layer

CSE 4213: Computer Networks II

Application. Transport. Network. Link. Physical

Introduction to the Transport Layer

CSCD 330 Network Programming

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay

Chapter 3: Transport Layer Part A

CMPE 80N: Introduction to Networking and the Internet

Chapter 3 Transport Layer

Transport layer. Our goals: Understand principles behind transport layer services: Learn about transport layer protocols in the Internet:

Transport layer: Outline

CC451 Computer Networks

Chapter 3: Transport Layer

Chapter 6 Transport Layer

Transport Layer Overview

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Internet and Intranet Protocols and Applications

CS 43: Computer Networks. 15: Transport Layer & UDP October 5, 2018

CSE 3214: Computer Network Protocols and Applications Transport Layer (Part 2) Chapter 3 outline. UDP checksum. Port numbers

CSCD 330 Network Programming

Lecture 5. Transport Layer. Transport Layer 1-1

TDTS06: Computer Networks

Lecture 2 Communication services The Trasport Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Different Layers Lecture 20

Lecture 07 The Transport Layer (TCP & UDP) Dr. Anis Koubaa

Transport services and protocols. Chapter 3 outline. Internet transport-layer protocols Chapter 3 outline. Multiplexing/demultiplexing

Computer Networking: A Top Down Approach

CSC 8560 Computer Networks: Transport Layer

Chapter 3 Transport Layer

The Transmission Control Protocol (TCP)

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

The Transport Layer Multiplexing, Error Detection, & UDP

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

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

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

LECTURE 3 - TRANSPORT LAYER

Different Layers Lecture 21

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

NT1210 Introduction to Networking. Unit 10

End-to-End Protocols: UDP and TCP. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

OSI Transport Layer. objectives

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

Foundations of Telematics

TSIN02 - Internetworking

TSIN02 - Internetworking

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

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

CS101 Lecture 6: Internetworking: Internet Protocol, IP Addresses, Routing, DNS. John Magee 8 July Some images courtesy Wikimedia Commons

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E

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

TSIN02 - Internetworking

Lecture 3: The Transport Layer: UDP and TCP

CS457 Transport Protocols. CS 457 Fall 2014

ECE697AA Lecture 3. Today s lecture

TCP/IP THE TCP/IP ARCHITECTURE

Computer Communication Networks Midterm Review

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

Chapter 7 Transport Layer. 7.0 Introduction 7.1 Transport Layer Protocols 7.2 TCP and UDP 7.3 Summary

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

TSIN02 - Internetworking

Computer Networks & Security 2016/2017

EE 122: IP Forwarding and Transport Protocols

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

Introduction to Protocols

CS 640: Introduction to Computer Networks. Today s Lecture. Page 1

CSE 461 Module 10. Introduction to the Transport Layer

Lecture 4: The Transport Layer and UDP

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

ECE 435 Network Engineering Lecture 15

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Protocoles et Interconnexions

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

By Ossi Mokryn, Based also on slides from: the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and Ross

UNIT 2 TRANSPORT LAYER

Distributed Systems. Networking Slides courtesy Kurose & Ross

Transport protocols. Transport Layer 3-1

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

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

ECE 650 Systems Programming & Engineering. Spring 2018

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Transcription:

CS 4390 Computer Networks UT D data Session 07 Transport Layer Overview and UDP Adapted from Computer Networking a Top-Down Approach 1996-2012 by J.F Kurose and K.W. Ross, All Rights Reserved Transport Services and Protocols provide logical communication between app processes running on different hosts Apps require different services protocols run in end systems send side: breaks app messages into segments, passes to layer receive side: reassembles segments into messages, passes to app layer more than one protocol available to apps Internet: TCP and UDP data data 2 1

Challenges for Transport Layer Develop algorithms and techniques for protocols that address requirements imposed by programs for Datagram service connection-less Byte stream service connection-oriented Take into account limitations of underlying layers ( and below) Network layer services and protocol limitations Underlying data transmission limitations, e.g. higher bit-error rate in wireless channels 3 Transport Service Requirements Supports multiple processes on a host Supports arbitrarily large messages Guarantees message delivery Guarantees no errors in delivered messages Delivers at most one copy of each message Delivers messages in the same order they were sent Ensures that messages not overwhelm the receiver Delivers messages with minimum delay 4 2

Limitations of Underlying Layers Bit-errors in messages Vary depending on channels, can be high in wireless Messages are lost e.g. discarded by routers due to buffer overflow Messages are delivered out-of-order Packet switching: packets may traverse different paths from sender to receiver Duplicated messages Duplicated copies of the same messages may be received (due to retransmission) Limited message size Ethernet frames: 1.5 KB, IP: 64 KB Delayed delivery due to congestion... 5 Transport Layer Topics our goals: understand principles behind layer services: multiplexing, demultiplexing reliable data transfer flow control congestion control learn about Internet layer protocols: User Datagram Protocol (UDP): connectionless Transmission Control Protocol (TCP): connectionoriented reliable TCP congestion control 6 3

Transport vs. Network Layer layer: logical communication between hosts layer: logical communication between processes relies on, enhances, layer services household analogy: 12 kids in Ann s house sending letters to 12 kids in Bill s house: hosts = houses processes = kids app messages = letters in envelopes protocol = Ann and Bill who demux to inhouse siblings -layer protocol = postal service 7 Internet Transport-layer Protocols reliable, in-order delivery: TCP congestion control flow control connection setup unreliable, unordered delivery: UDP no-frills extension of best-effort IP services not available: data data data data data data data data data delay guarantees bandwidth guarantees 8 4

Multiplexing & Demultiplexing multiplexing at sender: handle data from multiple sockets, add header (later used for demultiplexing) demultiplexing at receiver: use header info to deliver received segments to correct socket P3 P1 P2 P4 socket process 9 How Demultiplexing Works? host receives IP datagrams each datagram has source IP address, destination IP address each datagram carries one -layer segment each segment has source, destination port number host uses IP addresses & port numbers to direct segment to appropriate socket 32 bits source port # dest port # other header fields data (payload) TCP/UDP segment format 10 5

Connectionless Demultiplexing (UDP) recall: created socket has host-local port #: mysocket1 = new (12534); recall: when creating datagram to send into UDP socket, must specify destination IP address destination port # when host receives UDP segment: checks destination port # in segment directs UDP segment to socket with that port # IP datagrams with same dest. port #, but different source IP addresses and/or source port numbers will be directed to same socket at dest 11 Connectionless Demux Example mysocket2 = new (9157); P3 serversocket = new (6428); P1 mysocket1 = new (5775); P4 source port: 6428 dest port: 9157 source port:? dest port:? source port: 9157 dest port: 6428 source port:? dest port:? 12 6

Connection-oriented Demux (TCP) TCP socket identified by a 4-tuple: source IP address source port number dest IP address dest port number demux: receiver uses all four values to direct segment to appropriate socket server host may support many simultaneous TCP sockets: each socket identified by its own 4-tuple web servers have different sockets for each connecting client non-persistent HTTP will have different socket for each request 13 Connection-oriented Demux Example P3 P4 P5 P6 server: IP address B P2 P3 host: IP address A source IP,port: B,80 dest IP,port: A,9157 source IP,port: A,9157 dest IP, port: B,80 three segments, all destined to IP address: B, dest port: 80 are demultiplexed to different sockets source IP,port: C,5775 dest IP,port: B,80 source IP,port: C,9157 dest IP,port: B,80 host: IP address C 14 7

Connection-oriented Demux Example threaded server P3 P4 server: IP address B P2 P3 host: IP address A source IP,port: B,80 dest IP,port: A,9157 source IP,port: C,5775 dest IP,port: B,80 host: IP address C source IP,port: A,9157 dest IP, port: B,80 source IP,port: C,9157 dest IP,port: B,80 15 UDP: User Datagram Protocol [RFC 768] no frills, bare bones Internet protocol best effort service, UDP segments may be: lost delivered out-of-order to app connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others UDP use: streaming multimedia apps (loss tolerant, rate sensitive) DNS SNMP reliable transfer over UDP: add reliability at layer -specific error recovery! What are two main functions does UDP add to IP? 13 8

UDP: Segment Header source port # dest port # length 32 bits data (payload) checksum UDP segment format length, in bytes of UDP segment, including header why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small header size no congestion control: UDP can blast away as fast as desired 17 UDP Checksum Goal: detect errors (e.g., flipped bits) in transmitted segment sender: treat segment contents, including header fields, as sequence of 16-bit integers checksum: addition (1- complement sum) of segment contents sender puts checksum value into UDP checksum field All 0s means no checksum receiver: (If the received checksum is not all 0s) compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. (But maybe errors nonetheless? More later). What if the sender wants to add checksum and the calculated checksum is all 0s? 18 9

Internet Checksum Algorithm 1. Break the data (e.g. the UDP message, including header) as a series of 16-bit integers 2. Add them together using 1-complement arithmetic The negative number of an integer N is obtained by reverting all bits of N For example, N = 7, binary: 0111 -> -N = -7, binary: 1000 If there is a carry-over, add 1 to the result 3. Take 1-complement of the result (i.e. reverting all bits) to get the checksum for the data 19 Internet Checksum Example Message is two 16-bit integers 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Carry-over 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1-complement sum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 20 10

Pointers to Corresponding Sections of Textbook 6 th edition Chapter 3, up to and including 3.3 7 th edition Chapter 3, up to and including 3.3 21 11