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

Similar documents
Transport Layer. Chapter 3: Transport Layer

CS 4390 Computer Networks. Transport Services and Protocols

Chapter 3 Transport Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 3 Transport Layer

CSC 4900 Computer Networks: Transport Layer

CSC 401 Data and Computer Communications Networks

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

CMSC 332 Computer Networks Transport Layer

Application. Transport. Network. Link. Physical

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

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

Internet and Intranet Protocols and Applications

CMPE 80N: Introduction to Networking and the Internet

Lecture 9: Transpor Layer Overview and UDP

Chapter III: Transport Layer

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

CS 3516: Computer Networks

The Transmission Control Protocol (TCP)

CSE 4213: Computer Networks II

ECE 650 Systems Programming & Engineering. Spring 2018

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

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

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

Lecture 5. Transport Layer. Transport Layer 1-1

ECE 435 Network Engineering Lecture 15

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

Lecture 3: The Transport Layer: UDP and TCP

NT1210 Introduction to Networking. Unit 10

Introduction to the Transport Layer

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

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

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

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

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

Transport Layer Overview

Chapter 3 Transport Layer

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

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

Lecture 4: The Transport Layer and UDP

Transport Layer TCP & UDP Week 7. Module : Computer Networks Lecturers : Lucy White Office : 324

Chapter 3: Transport Layer Part A

TSIN02 - Internetworking

Computer Communication Networks Midterm Review

OSI Transport Layer. objectives

ECE697AA Lecture 3. Today s lecture

TDTS06: Computer Networks

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

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

Chapter 3: Transport Layer

TSIN02 - Internetworking

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

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

TSIN02 - Internetworking

4.0.1 CHAPTER INTRODUCTION

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

Advanced Computer Networking. CYBR 230 Jeff Shafer University of the Pacific QUIC

ECE4110 Internetwork Programming. Introduction and Overview

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

Lecture 2: Links and Signaling

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

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

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

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Chapter 6 Transport Layer

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

CS457 Transport Protocols. CS 457 Fall 2014

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

Lecture (11) OSI layer 4 protocols TCP/UDP protocols

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

Internet II. CS10 : Beauty and Joy of Computing. cs10.berkeley.edu. !!Senior Lecturer SOE Dan Garcia!!! Garcia UCB!

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

ET4254 Communications and Networking 1

Different Layers Lecture 20

TSIN02 - Internetworking

CSCD 330 Network Programming

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

UDP: Datagram Transport Service

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

Page 1. Goals for Today" Discussion" Example: Reliable File Transfer" CS162 Operating Systems and Systems Programming Lecture 11

Last Time. Internet in a Day Day 2 of 1. Today: TCP and Apps

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

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

CS4700/CS5700 Fundamentals of Computer Networks

QUIZ: Longest Matching Prefix

Transport layer: Outline

Connectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)

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

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

TCP /IP Fundamentals Mr. Cantu

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

User Datagram Protocol (UDP):

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

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

UDP, TCP, IP multicast

Chapter 11. User Datagram Protocol (UDP)

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

Transcription:

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

Reading Quiz Lecture 15 - Slide 2

Layer Moving down a layer. Current perspective: lication is the boss Usually executing within the OS kernel. The network layer is ours to command! Lecture 15 - Slide 3

Network Layer (Context) What it does: finds paths through network Routing from one end host to another What it doesn t: Reliable transfer: best effort delivery Guarantee paths Arbitrate transfer rates For now, think of the network layer as giving us an API with one function: sendtohost(data, host). Promise: the data will go there. Usually. Lecture 15 - Slide 4

Layer Services & Protocols Provides logical communication between processes. Runs in end systems. Sender: breaks application messages into segments, passes to network layer Receiver: reassembles segments into messages, passes to app layer Exports services to application that network layer does not provide application transport network data link physical application transport network data link physical Lecture 15 - Slide 5

How many of these services might we provide at the transport layer? Which? Reliable transfers Error detection Error correction Bandwidth guarantees Latency guarantees Encryption Message ordering Link sharing fairness A. 4 or fewer B. 5 C. 6 D. 7 E. All 8 Lecture 15 - Slide 6

How many of these services might we provide at the transport layer? Which? Reliable transfers (T) Error detection (U, T) Error correction (T) Bandwidth guarantees Latency guarantees Encryption Message ordering (T) Link sharing fairness (T) Critical question: Can it be done at the end host? A. 4 or fewer B. 5 C. 6 D. 7 E. All 8 Lecture 15 - Slide 7

TCP sounds great! UDP meh. Why do we need it? A. It has good performance characteristics. B. Sometimes all we need is error detection. C. We still need to distinguish between sockets. D. It basically just fills a gap in our layering model. Lecture 15 - Slide 8

Adding Features Nothing comes for free Payload Data Data given by application ly header Keeps transport state Attached by sender Decoded by receiver TCP/ UDP Payload Data Lecture 15 - Slide 9

TCP Overhead Establishing state (making a connection) Recall HTTP 1.0 vs. HTTP 1.1 Extra communication round trip Delays due to loss / reordering. Playing fair might cost you! Lecture 15 - Slide 10

Recall: Addressing Sockets host IP address identifies device interface host TCP Need another identifier: port 16-bit, unsigned integer value Differentiates sockets TCP router router IP IP IP IP Ethernet interface Ethernet interface SONET interface SONET interface Ethernet interface Ethernet interface Lecture 15 - Slide 11

Multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.) Network Layer Lecture 15 - Slide 12

Multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.) Network Layer The network is a shared resource. It does NOT care about your applications, sockets, etc. Senders mark segments, in header, with identifier (port) Lecture 15 - Slide 13

Multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.) Network Layer The network is a shared resource. It does NOT care about your applications, sockets, etc. Senders mark segments, in header, with identifier (port) Lecture 15 - Slide 14

De-multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.) Network Layer The network is a shared resource. It does NOT care about your applications, sockets, etc. Receivers check header, deliver data to correct socket. Lecture 15 - Slide 15

De-multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.) Network Layer The network is a shared resource. It does NOT care about your applications, sockets, etc. Receivers check header, deliver data to correct socket. Lecture 15 - Slide 16

De-multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.)? Network Layer The network is a shared resource. It does NOT care about your applications, sockets, etc. Receivers check header, deliver data to correct socket. Lecture 15 - Slide 17

De-multiplexing (Simultaneous transmission of two or more signals/messages over a single channel.)? Network Layer The network is a shared resource. It does NOT care about your applications, sockets, etc. Receivers check header, deliver data to correct socket. Lecture 15 - Slide 18

UDP: User Datagram Protocol [RFC 768] No frills, Bare bones Internet transport protocol RFC 768 (1980) Length of the document? Best effort service, UDP segments may be: Lost Delivered out of order (Same as underlying network layer) Connectionless: No initial state transferred between parties (no handshake) Each UDP segment is handled independently Lecture 15 - Slide 19

UDP Segment 32 bits Source Port Dest Port Length Checksum lication Data (Payload) Lecture 15 - Slide 20

TCP Segment! source port # dest port # sequence number head len not used U A P R S F checksum 32 bits acknowledgement number receive window Urg data pointer options (variable length) application data (variable length) Lecture 15 - Slide 21

UDP Segment 32 bits Source Port Dest Port Length (incl header) Checksum lication Data (Payload) Lecture 15 - Slide 22

UDP Checksum Goal: Detect transmission errors (e.g. flipped bits) Router memory errors Driver bugs Electromagnetic interference RFC: 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. Lecture 15 - Slide 23

UDP Checksum Goal: Detect transmission errors (e.g. flipped bits) Router memory errors Driver bugs Electromagnetic interference At the sender: Treat the entire segment as 16-bit integer values Add them all together (sum) Put the 1 s complement in the checksum header field Lecture 15 - Slide 24

Recall CS31 In bitwise compliment, all of the bits in a binary number are flipped. So 1111000011110000 -> 0000111100001111 Lecture 15 - Slide 25

Checksum example example: add 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 wraparound sum checksum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 Note: when adding numbers, a carryout from the most significant bit needs to be added to the result Lecture 15 - Slide 26

Receiver Add all the received data together as 16-bit integers Add that to the checksum If result is not 1111 1111 1111 1111, there are errors! Lecture 15 - Slide 27

If our checksum addition yields all ones, are we guaranteed to be error-free? A. Yes B. No Lecture 15 - Slide 28

UDP lications Latency sensitive Quick request/response (DNS) Network management (SNMP, TFTP) Voice/video chat Error correction unnecessary (periodic msgs) Communicating with lots of others Lecture 15 - Slide 29

What if you want something more reliable than UDP, but faster/not as full featured as TCP? A. Sorry, you re out of luck. B. Write your own transport protocol. C. Add in the features you want at the application layer. Lecture 15 - Slide 30

TCP send() blocking Recall: With TCP, send() blocks if buffer full. Lecture 15 - Slide 31

UDP sendto() blocking Recall: With TCP, send() blocks if buffer full. Does UDP need to block? Should it? A. Yes, if buffers are full, it should. B. It doesn t need to, but it might be useful. C. No, it does not need to and shouldn t do so. Lecture 15 - Slide 32

Summary UDP: No frills transport protocol. Simple, 8-byte header with ports, len, cksum Checksum protects against most bit flips Lecture 15 - Slide 33