CSCD 330 Network Programming

Similar documents
CSCD 330 Network Programming

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Transport Layer. Chapter 3: Transport Layer

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

CS 4390 Computer Networks. Transport Services and Protocols

CMSC 332 Computer Networks Transport Layer

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

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

CSC 401 Data and Computer Communications Networks

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

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

CSC 4900 Computer Networks: Transport Layer

Chapter III: Transport Layer

Chapter 3: Transport Layer Part A

Transport Layer Overview

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

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

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

COSC4377. Useful Linux Tool: screen

CS 3516: Computer Networks

Application. Transport. Network. Link. Physical

CC451 Computer Networks

Lecture 9: Transpor Layer Overview and UDP

CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER

Introduction to the Transport Layer

CMPE 80N: Introduction to Networking and the Internet

CSE 4213: Computer Networks II

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

Chapter 6 Transport Layer

Chapter 3 Transport Layer

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

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

OSI Transport Layer. objectives

Transport layer: Outline

TSIN02 - Internetworking

The Transmission Control Protocol (TCP)

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

Lecture 5. Transport Layer. Transport Layer 1-1

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

TSIN02 - Internetworking

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

NT1210 Introduction to Networking. Unit 10

Chapter 3 Transport Layer

TSIN02 - Internetworking

TSIN02 - Internetworking

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

Different Layers Lecture 20

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

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

Outline. Inter-Process Communication. IPC across machines: Problems. CSCI 4061 Introduction to Operating Systems

4.0.1 CHAPTER INTRODUCTION

TDTS06: Computer Networks

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

Internet and Intranet Protocols and Applications

Chapter 3: Transport Layer

Foundations of Telematics

TCP/IP THE TCP/IP ARCHITECTURE

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

CS 3516: Advanced Computer Networks

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

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

The Transport Layer Multiplexing, Error Detection, & UDP

ECE 333: Introduction to Communication Networks Fall 2002

a. the physical layer, b. and the data-link layer. a. three physical layers, b. three data-link layers, c. and only one network layer.

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

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

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer

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

Chapter 3 Transport Layer

Different Layers Lecture 21

ECE697AA Lecture 3. Today s lecture

ECE 333: Introduction to Communication Networks Fall 2001

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

CCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers

CS 3516: Advanced Computer Networks

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

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. Managing a HTTP request. transport session. Step 1 - opening transport

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

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

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

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

EE 122: IP Forwarding and Transport Protocols

OSI and TCP/IP Models

Configure Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) Service Settings on a Switch

CS 3516: Computer Networks

L6: OSI Reference Model

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

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

Transport Layer (TCP/UDP)

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

Lecture 4: The Transport Layer and UDP

Lecture 3: The Transport Layer: UDP and TCP

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

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

CS 3516: Advanced Computer Networks

Chapter 2 Network Models 2.1

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

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

Transcription:

CSCD 330 Network Programming Lecture 9 Transport Layer Winter 2019 Reading: Begin Chapter 3 Some Material in these slides from J.F Kurose and K.W. Ross All material copyright 1996-2007 1

Outline Overview of Transport Layer Multiplexing / Demultiplexing UDP Functions Reliable Transport State Diagram of Reliable Transport Building it from basics

Introduction to Transport Layers 1, 2 and 3 Physical, Data Link and Network Concerned with actual packaging, addressing, routing and delivery of data Physical layer handles bits Data link layer deals with local networks Network layer handles routing between networks Transport layer in contrast, does not concern itself with these nuts and bolts matters It relies on lower layers to handle process of moving data between devices

Transport Layer Purpose Transport Layer s Job Provides for communication between application processes on different computers Computers have many applications all trying to send and receive data Example: Web Browser open Bit Torrent downloading in the background and WoW gaming session open Transport layer enables these applications to send and receive data All applications must use same lower-layer protocol implementation

Transport Layer Purpose How Does it Do This? Transport layer protocol must keep track of data from each application, Combines this data into a single flow of data to send to lower layers Device receiving information must reverse these operations, splitting data and funneling it to appropriate recipient processes Transport layer provides connection services for protocols and applications that run at levels above it Categorized as either Connection-oriented services Connectionless services

Transport Layer

Introduction to Transport Layer Recall the simplified model we have of today's Internet Transport layer Network layer Transport layer Network layer We are here

Introduction to Transport Layer Apps What do we know about the Network Layer? Best effort service No guarantees No orderly delivery of segments Said to be Unreliable Service All hosts have at least one IP address Transport

Introduction to Transport Layer On top of Network Layer UDP and TCP two main protocols of transport layer Responsibility of this layer Minimum Extend delivery service between two hosts to Delivery service between two processes running on a source and destination host Error checking of packets

Transport Layer UDP Two flavors of Transport Protocols UDP simpler, faster and unreliable What does it do? Delivers packets Checks Errors That's all it does!

Transport Layer TCP TCP more complex, slower and reliable What does it do? Flow control Sequence numbers for packets 1,2,3,4,5,6,7... 10 Acknowledgments and timers Ensures data arrives in order and is correct Congestion control

Introduction Transport Layer Goals Understand principles behind transport layer services Multiplexing/demultiplexing Reliable data transfer vs Unreliable data transfer Flow control Congestion control 12

Transport services and protocols Provide Logical Communication between application processes running on different hosts Transport protocols run on end systems Sender side Breaks messages into segments, pass to network layer Receiver side Reassembles segments into messages, pass to application layer applicatio n transport network data link physical logical end-end transport applicatio n transport network data link physical 13

Transport vs. Network Layer Network layer Logical communication between hosts Transport layer Logical communication between processes Relies on and enhances, network layer services 14

Multiplexing and demultiplexing In General 15

Multiplexing and Demultiplexing Transport protocol does multiplexing and demultiplexing Sends and Delivers packets to correct application Say single host runs four network applications FTP Session, 2 SSH Sessions, HTTP Session TCP Layer must keep track of four applications and their separate streams of data

Multiplexing and Demultiplexing Transport protocol does multiplexing and demultiplexing Gathers data from different applications, Through sockets, Encapsulates each data chunk with headers and passes them to network layer -> Multiplexing Delivers data to receiving socket of application -> Demultiplexing

Multiplexing/demultiplexing Demultiplexing at rcv host: Delivering received segments to correct socket = socket = process Multiplexing at send host: Gathering data from multiple sockets, enveloping data with header (later used for demultiplexing) application P3 P1 application P2 P4 application transport transport transport network network network link link link physical physical host 1 host 2 FTP telnet physical host 3 18

19 How Demultiplexing Works Host Receives IP Datagrams Each Datagram has source IP Address, Destination IP Address Each Datagram carries 1 transport layer segment Each Segment has source/destination port number Host Uses IP Addresses and Port numbers ----> direct segments to appropriate socket 32 bits source port # dest port # other header fields application data (message) Generic TCP/UDP segment format

UDP Demultiplexing

Connectionless UDP Demultiplexing Sockets have port numbers DatagramSocket mysocket1 = new DatagramSocket(12534); DatagramSocket mysocket2 = new DatagramSocket(12535); Note: Above are examples of UDP Servers UDP Socket identified by two-tuple: (dest IP address, dest port number) When host receives UDP segment Checks destination port number within data Directs UDP segment to socket with that port number 21

Connectionless UDP Demultiplexing DatagramSocket serversocket = new DatagramSocket(6428); P2 DNS Reply P3 P1P1 DNS Request SP: 6428 DP: 9157 SP: 6428 DP: 5775 SP: 9157 SP: 5775 Client IP: A DP: 6428 DNS server IP: C DP: 6428 Client IP:B Dest Port (DP) provides send address Src Port (SP) provides return address 22

TCP Demultiplexing

Connection-oriented TCP Demultiplexing TCP socket identified by 4-tuple: Source IP address Source port number Dest IP address Dest port number Receive host uses all four values to direct segment to appropriate socket Server may support many simultaneous TCP sockets: Each socket identified by its own 4-tuple Web servers can have multiple different connections for each connecting client Why is that? Non-persistent HTTP will have different socket for each request!!! 24

Connection-oriented TCP Demultiplexing SP 9157 DP 80 SP 5775 SP 9157 P1 P4 P5 P6 P2 P1P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 client IP: A DP: 80 Src-IP: A Dest-IP:C Web server IP: C DP: 80 Src-IP: B Dest-IP:C Client IP:B Note: Two machines with same Source Port (SP) = 9157, Is that allowed? 25

Connection-oriented demumtiplexing Threaded Web Server SP 9157 DP 80 SP 5775 SP 9157 P1 P4 P2 P1P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 client IP: A DP: 80 Src-IP: A Dest-IP:C server IP: C DP: 80 Src-IP: B Dest-IP:C Client IP:B 26

UDP: More Often used for streaming multimedia applications Loss tolerant Faster Other UDP uses DNS SNMP Reliable transfer over UDP How would you do it? Add reliability at application layer Application-specific error recovery! Length, in bytes of UDP segment, including header 32 bits source port # dest port # length Application data (message) checksum UDP segment format 27

Summary Described what the transport layer does Introduced general concepts of a connection-oriented, transport protocol Making something reliable is not easy!! Complex, not easy to understand Moving on to examine TCP as an example of a reliable protocol 28

References RFC of TCP v4, 1981 http://www.ietf.org/rfc/rfc0793.txt Original Paper by Authors of TCP/IP Suite Vinton G. Cerf, Robert E. Kahn, A Protocol for Packet Network Intercommunication, IEEE Transactions on Communications, Vol. 22, No. 5, May 1974 pp. 637-648 http://penguin.ewu.edu/cscd330/cerf74-2.pdf

Transport Protocol Read: Keep reading Chapter 3 - Transport 30