CSCE 463/612 Networks and Distributed Processing Spring 2018

Similar documents
Transport Layer. Chapter 3: Transport Layer

Chapter 3 Transport Layer

CMSC 332 Computer Networks Transport Layer

CSC 401 Data and Computer Communications Networks

Chapter 3 Transport Layer

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

CS 4390 Computer Networks. Transport Services and Protocols

CSC 4900 Computer Networks: Transport Layer

CSCD 330 Network Programming

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

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

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

Transport Layer Overview

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

Lecture 9: Transpor Layer Overview and UDP

CS 3516: Computer Networks

Chapter III: Transport Layer

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

CMPE 80N: Introduction to Networking and the Internet

Chapter 3: Transport Layer Part A

Application. Transport. Network. Link. Physical

CSE 4213: Computer Networks II

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

Introduction to the Transport Layer

CC451 Computer Networks

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

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

CSCD 330 Network Programming

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

COSC4377. Useful Linux Tool: screen

Lecture 5. Transport Layer. Transport Layer 1-1

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

Chapter 6 Transport Layer

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

Transport layer: Outline

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

Chapter 3 Transport Layer

Chapter 3: Transport Layer

The Transmission Control Protocol (TCP)

Internet and Intranet Protocols and Applications

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

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

TDTS06: Computer Networks

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

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

Chapter 3 Transport Layer

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

Foundations of Telematics

Lecture 3: The Transport Layer: UDP and TCP

Different Layers Lecture 20

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Transport Layer (TCP/UDP)

Computer Networks & Security 2016/2017

The Transport Layer Multiplexing, Error Detection, & UDP

CSCE 463/612 Networks and Distributed Processing Spring 2018

NT1210 Introduction to Networking. Unit 10

Chapter 6. The Transport Layer. Transport Layer 3-1

CSCE 463/612 Networks and Distributed Processing Spring 2017

Chapter 3 Transport Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

Lecture 4: The Transport Layer and UDP

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

OSI Transport Layer. objectives

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

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

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

Chapter 11. User Datagram Protocol (UDP)

TSIN02 - Internetworking

Chapter 3: Transport Layer

TSIN02 - Internetworking

Computer Networking: A Top Down Approach

CSC 8560 Computer Networks: Transport Layer

TSIN02 - Internetworking

Different Layers Lecture 21

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

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

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

ECE697AA Lecture 3. Today s lecture

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

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

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

CSCI Topics: Internet Programming Fall 2008

ECE 435 Network Engineering Lecture 15

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

CS4700/CS5700 Fundamentals of Computer Networks

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

TSIN02 - Internetworking

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

CS457 Transport Protocols. CS 457 Fall 2014

Transport Layer Review

Latency and Loss Requirements! Receiver-side Buffering! Dealing with Loss! Loss Recovery!

EE 122: IP Forwarding and Transport Protocols

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

NWEN 243. Networked Applications. Layer 4 TCP and UDP

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

Distributed Systems. 5. Transport Protocols

Distributed Systems. 5. Transport Protocols. Werner Nutt

Transcription:

CSCE 463/612 Networks and Distributed Processing Spring 2018 Transport Layer Dmitri Loguinov Texas A&M University February 22, 2018 Original slides copyright 1996-2004 J.F Kurose and K.W. Ross 1

Chapter 3: Transport Layer Our goals: Understand principles behind transport layer services: Multiplexing/demultiplexing Reliable data transfer Flow control Congestion control Learn about transport layer protocols in the Internet: UDP: connectionless transport TCP: connection-oriented transport Application (5) Transport (4) Network (3) Data-link (2) Physical (1) 2

Chapter 3: Roadmap 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP Segment structure Reliable data transfer Flow control Connection management 3.6 Principles of congestion control 3.7 TCP congestion control 3

Transport Services and Protocols Transport layer: logical communication between processes on different hosts Relies on and enhances -layer services Network layer: logical communication between hosts application transport logical end-end transport application transport 4

Internet Transport-layer Protocols Reliable, in-order delivery: TCP Congestion control Flow control Connection setup Unreliable, unordered delivery: UDP No-frills extension of besteffort IP Services not available: Delay or loss guarantees Bandwidth guarantees application transport logical end-end transport application transport 5

Chapter 3: Roadmap 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP Segment structure Reliable data transfer Flow control Connection management 3.6 Principles of congestion control 3.7 TCP congestion control 6

Multiplexing/Demultiplexing Demultiplexing at receiver host: Delivering received segments to correct socket = socket = process Multiplexing at sender host: Gathering data from multiple sockets, enveloping data with header (later used for demultiplexing) application P3 P1 application P1 P2 P4 application transport transport transport link link link host 1 host 2 host 3 7

How Demultiplexing Works Host receives IP datagrams Each datagram has source IP address and destination IP address Each datagram carries one transport-layer header Each transport header starts with source and destination port numbers Kernel uses port numbers to direct packets to appropriate socket or reject the message Each port # is a 16-bit unsigned integer (1-65535) source IP IP header source port # dest port # application data (message) dest IP Transport header TCP/UDP segment format 8

Connectionless Demultiplexing Create a SOCK_DGRAM socket Bind the socket Server: specify a well-known port (e.g., 53 for DNS) Client: bind to port 0 (OS assigns next available #) Use sendto(), recvfrom() Target UDP socket is identified by a 2-tuple: (dest IP address, dest port number) When host receives UDP segment: OS checks destination port/ip in segment Directs segment to the socket with a matching combination if socket is open; rejects otherwise IP datagrams with different source IP addresses and/or source port numbers may be directed to the same socket! 9

Connectionless Demultiplexing (Cont) SP = source port, DP = destination port P1 9157 P3 6428 5775 P1 P2 client IP: A SP: 9157 DP: 6428 A C SP: 6428 DP: 9157 C A server IP: C SP: 6428 DP: 5775 C B SP: 5775 DP: 6428 B C client IP: B SP provides return address 10

Connection-Oriented Demultiplexing TCP socket identified by a 4-tuple: Source IP address Source port number Destination IP address Destination port number Receiver host uses all four values to direct segment to appropriate socket Server host may support many simultaneous TCP sockets on same port: Each socket identified by its own 4-tuple Web servers have different sockets for each connecting client All are on port 80 Non-persistent HTTP may have different socket for each request 11

Connection-Oriented Demultiplexing (Cont) Web server spawns a new process per connection port 80 5775 9153 P1 5775 P4 P5 P6 P2 P1P3 SP: 5775 DP: 80 S-IP:B D-IP:C SP: 5775 SP: 9153 client IP: A DP: 80 S-IP: A D-IP:C server IP: C DP: 80 S-IP: B D-IP:C client IP: B SP = source port, DP = destination port; S-IP = source IP, D-IP = destination IP 12

Connection-Oriented Demultiplexing (Cont) Web server spawns a new thread per connection port 80 5775 9153 P1 P4 P2 P1P3 5775 SP: 5775 DP: 80 S-IP: B D-IP:C client IP: A SP: 5775 DP: 80 S-IP: A D-IP:C server IP: C SP: 9153 DP: 80 S-IP: B D-IP:C Client IP:B SP = source port, DP = destination port; S-IP = source IP, D-IP = destination IP 13

Chapter 3: Roadmap 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP Segment structure Reliable data transfer Flow control Connection management 3.6 Principles of congestion control 3.7 TCP congestion control 14

UDP: User Datagram Protocol [RFC 768] Standardized in 1980 Hasn t changed much Best-effort service UDP segments may be: Lost or corrupted Delivered out of order to the application Connectionless: No handshaking between UDP sender and receiver Each UDP segment handled independently of others Why is there a UDP? Overhead: no connection establishment or retransmission Simplicity: no connection state at sender/receiver Small segment header No congestion control For short transfers, this is completely unnecessary In other cases, desirable to control rate directly from application 15

UDP: More Often used for streaming multimedia apps Loss tolerant Rate sensitive Other UDP uses DNS SNMP NFSv2 (1989) Reliable transfer over UDP: add reliability at application layer Application-specific error recovery Length (in bytes) of UDP segment, including header source port # length 32 bits Application data (message) dest port # checksum UDP segment format 16

UDP Checksum Goal: detect errors (e.g., flipped bits) in transmitted segment (packet) Sender (simplified): Receiver: Set checksum = 0 in hdr Treat packet contents as a sequence of 16-bit integers (padded with 0s to 2-byte boundary) Checksum: add all integers, then XOR with 0xffff Sender puts checksum value into UDP checksum field Sum all 16-bit words in entire received segment with the checksum field in it Check if result = 0xffff NO - error detected YES - no error detected Idea: (x XOR 0xffff) + x = 0xffff Are undetected errors possible nonetheless? 17

UDP Checksum Example Note on 1 s complement addition: When adding numbers, a carryout from the most significant bit needs to be added to the result Example: add two 16-bit integers 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 sum checksum 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 18

UDP Checksum (Cont) How many corrupted bits does UDP detect? Example of undetected single-bit corruption? Not possible Example of undetected 2-bit corruption? Two words (0, 5) result in checksum 5 XOR 0xffff Suppose 0 is corrupted to become 1 and 5 is corrupted to become 4, then the checksum is the same Example of undetected 3-bit corruption? Two words (1, 1) (0, 2) What if the transmitted words are 0 and 12? Can two-bit corruption produce the same checksum? If yes, how many ways can (0,12) be affected by 2-bit corruption so as to avoid detection? 19

Wrap-up Is there a pair of integers (x,y) that allow the UDP checksum to detect any 2-bit corruption? Data-link and layers are often assumed to have their own checksums and error correction Why is transport-level checksum important then? Reasons: 1) Lower layers do not always implement error checking Even then, implementation bugs may affect the result 2) Corruption may occur in router RAM or faulty hardware, outside the control of data-link protocols 20