Lecture 2-bis. 2. Internet Transport Protocols

Similar documents
Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

Distributed Systems. 2. Application Layer

Network Applications

Transport Layer Protocols

Computer Networks. Examples of network applica3ons. Applica3on Layer

Principles of Network Applications. Dr. Philip Cannata

Objectives of Lecture. Network Architecture. Protocols. Contents

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Network Programming TDC 561

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Computer Networks - Xarxes de Computadors

The Transport Layer. Antonio Carzaniga. October 24, Faculty of Informatics University of Lugano Antonio Carzaniga

Protocols and Architecture. Protocol Architecture.

Limi Kalita / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (3), 2014, Socket Programming

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

How To Design A Layered Network In A Computer Network

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

Chapter 11. User Datagram Protocol (UDP)

Protocols. Packets. What's in an IP packet

Computer Networks. Chapter 5 Transport Protocols

Ethernet. Ethernet. Network Devices

Computer Networks & Security 2014/2015

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

CPS221 Lecture: Layered Network Architecture

Chapter 5. Transport layer protocols

Introduction to TCP/IP

TCP/IP Programming. Joel Snyder, Opus1 Geoff Bryant, Process Software

Today s Lecture : Introduction to Telecommunication Networks Lectures 2: Protocol Stack. Applications and Application Protocols

Lecture 8. IP Fundamentals

First Midterm for ECE374 03/09/12 Solution!!

Architecture and Performance of the Internet

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

EXPLORER. TFT Filter CONFIGURATION

[Prof. Rupesh G Vaishnav] Page 1

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

How do I get to

Transport Layer Services Mul9plexing/Demul9plexing. Transport Layer Services

Unix System Administration

Chapter 3. Internet Applications and Network Programming

Computer Networks UDP and TCP

Transport Layer. Chapter 3.4. Think about

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Network Programming with Sockets. Process Management in UNIX

Internet Concepts. What is a Network?

Virtual Server and DDNS. Virtual Server and DDNS. For BIPAC 741/743GE

Digital Audio and Video Data

Introdução aos Sistemas Distribuídos

A Transport Protocol for Multimedia Wireless Sensor Networks

Access Control: Firewalls (1)

Multimedia Communications Voice over IP

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Question: 3 When using Application Intelligence, Server Time may be defined as.

LESSON Networking Fundamentals. Understand TCP/IP

Overview of TCP/IP. TCP/IP and Internet

1 Introduction: Network Applications

Network Models and Protocols

Introduction to Socket Programming Part I : TCP Clients, Servers; Host information

Final for ECE374 05/06/13 Solution!!

Fundamentals of Symbian OS. Sockets. Copyright Symbian Software Ltd.

PART OF THE PICTURE: The TCP/IP Communications Architecture

ICS 153 Introduction to Computer Networks. Inst: Chris Davison

Introduction to Computer Networks

This sequence diagram was generated with EventStudio System Designer (

User Datagram Protocol - Wikipedia, the free encyclopedia

The OSI and TCP/IP Models. Lesson 2

Computer Networks and the Internet

presentation DAD Distributed Applications Development Cristian Toma

Data Communication & Networks G

How To Understand The Layered Architecture Of A Network

technology standards and protocol for ip telephony solutions

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

What is CSG150 about? Fundamentals of Computer Networking. Course Outline. Lecture 1 Outline. Guevara Noubir noubir@ccs.neu.

Module 2 Overview of Computer Networks

IP - The Internet Protocol

Lecture 28: Internet Protocols

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

The TCP/IP Reference Model

Transport and Network Layer

NAT & IP Masquerade. Internet NETWORK ADDRESS TRANSLATION INTRODUCTION. NAT & IP Masquerade Page 1 of 5. Internal PC

Network Simulation Traffic, Paths and Impairment

Solution of Exercise Sheet 5

An Introduction to VoIP Protocols

OS/390 Firewall Technology Overview

Topics. Computer Networks. Let s Get Started! Computer Networks: Our Definition. How are Networks Used by Computers? Computer Network Components

Advanced Higher Computing. Computer Networks. Homework Sheets

Protocol Specification & Design. The Internet and its Protocols. Course Outline (trivia) Introduction to the Subject Teaching Methods

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Lecture 33. Streaming Media. Streaming Media. Real-Time. Streaming Stored Multimedia. Streaming Stored Multimedia

Overview of Computer Networks

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Single Pass Load Balancing with Session Persistence in IPv6 Network. C. J. (Charlie) Liu Network Operations Charter Communications

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Lecture 2: Protocols and Layering. CSE 123: Computer Networks Stefan Savage

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Transcription:

Lecture 2-bis. 2 Internet Transport Protocols As seen by the application developer point of view

The primary (in principle unique) role of Internet transport protocols Extend IP's delivery service (between two end systems) to a deliver service between two APPLICATION PROCESSES running on the end systems MAPPING to OSI language: Port number = TSAP (Transport Service Access Point) IP address = NSAP (Network Service Access Point) Transport layer httpd My app 25 80 3211... Port Internet layer 131.175.15.1 IP address

Transport Layer Protocols Entire network seen as a pipe Internet...

The Internet level view Information units travelling in the network: IP packets Header IP src & dest IP addr IP Data Header transport src & dest ports Transport data App prot header Data

Where are port numbers? App prot header Data Transport Header TCP or UDP Port src Port dest Transport data IP Header Ipaddr src Ipaddr dest prtc IP Data

Transport Control Protocol (TCP) connection oriented TCP connections reliable transfer service. TCP functions application addressing (ports) error recovery (acks and retransmission) reordering (sequence numbers) Appl. TCP IP flow control congestion control IP Appl. TCP IP IP IP

Services Provided by TCP Connection-oriented service: preliminary handshaking procedure creates a full duplex TCP connection Reliable transport service: communicating processes can rely on TCP to deliver all the messages sent without error and in the proper order. TCP does not provide: a minimum transmission rate guaranteed (sending rate is regulated by TCP congestion control) any sort of delay guarantees (the World Wide Wait )

User Datagram Protocol (UDP) Connectionless UDP packets offers unreliable transfer service (send and pray). UDP functions application addressing (ports) error checking proc UDP IP IP proc UDP IP IP IP

Services Provided by UDP connectionless (no handshaking) arbitrary sending rate service» no congestion control mechanism present UDP minimalist lightweight service model does not provide: any guarantee of reception, any guarantee of order any guarantee on delay

UDP TCP Connectionless UDP packets unreliable transfer service send and pray UDP functions application addressing (ports) error checking connection oriented TCP connections reliable transfer service all bytes sent are recv TCP functions application addressing (ports) error recovery (acks and retransmission) reordering (sequence numbers) flow control congestion control

Service Requirements Application Data Loss Bandwidth Time sensitive? file transfer no loss elastic no electronic mail no loss elastic no Web documents no loss elastic no real-time audio/video losstolerant audio: few Kbps to 1Mbps video: 10's Kbps to 5 Mbps yes: 100's of msec stored audio/video losstolerant same as interactive audio/video yes: few seconds interactive games losstolerant few Kbps to 10's Kbps yes: 100's msecs financial applications no loss elastic yes and no

Common Applications and related transport Application Application-layer protocol Underlying Transport Protocol electronic mail SMTP (RFC 821) TCP remote terminal access Telnet (RTC 854) TCP Web HTTP (RFC 2068) TCP file transfer FTP (RFC 959) TCP remote file server streaming multimedia Internet telephony NFS Proprietary (e.g., Real Networks) proprietary (e.g. Vocaltec) UDP or TCP UDP or TCP typically UDP

A closer look at applications: Client HTTP Application Process (Browser) Socket TCP software The Socket Interface (HTTP example) HTTP request HTTP response TRANSPORT PROTOCOL (for HTTP: TCP) Server HTTP Application Process (HTTP Daemon) Socket TCP software INTERNET

Sockets in Unix OSs Just file descriptors (everything is a file in Unix!) stream sockets using TCP datagram sockets using UDP Common I/O file functions: read(), write() More powerful I/O functions: send(), receive() Other specific function: socket(), bind(), connect(), listen(), accept()

The application developer view the only mean for apps to send/receive messages is through sockets doors that hide transportation infrastructure to processes Very limited control on transport protocol (buffer sizing, variables) Application Process SW (a normal software program!) Send receive Socket: door to transport SW

Why it is trivial (!) to write networking apps? INTERNET Application software duties: open socket (e.g. C, C++, JAVA function call, OS call, external library primitive) Injects message in its own socket being confident message is received on the other side TCP software: in charge of managing segments! reliable message transport when TCP used Segmentation performed by TCP transmitter Receive buffer necessary to ensure proper packet s order & reassembly

An open question Socket: OS interface between the application and the transport level Ports: numbers in the transport header to identify the specific application Which is the relation? We focus on the server

A first hypothesis one-to-one mapping socket port #

Trivial refinement The socket is on a specific host, i.e. port# has a local meaning socket (IP address,port #)

How to reach server socket: pair of IP Address and Port Number Mail srv Socket Web srv Socket Proprietary app Socket Incoming request Transport layer Internet layer 25 80 3211... Port number: univocally specifies SW process within the node 131.175.15.1 IP address (univocally specifies node) (IP,port): a unique identification of an application layer service to which requests need to be sent The first contact needs well known port #

Demultiplexing at receiver (1) app app app Transport SW IP SW IP packet http header http payload Information entering app Software (managed by app Developer) Port # Transport data Transport SW: checks segment; Sends to application sw based on Port number Application demux IP addr IP Data IP SW: checks IP packet; Sends to transport sw Transport demux

Demultiplexing at receiver (2) app app app UDP SW TCP SW IP SW IP packet http header http payload Information entering app Software (managed by app Developer) Port # Transport data Transport SW: checks segment; Sends to application sw based on Port number Application demux IP addr IP Data IP SW: checks IP packet; Sends to transport sw selects whether UDP or TCP Transport demux

Does IP software know about transport protocol? App prot header Data Transport Header TCP or UDP Port src Port dest Transport data IP Header Ipaddr src Ipaddr dest prtc IP Data YES

Remarks When opening socket, needs to specify which transport to use! UDP port numbers are independent from TCP ones! This means that TCP looks at TCP ports, while UDP looks at UDP ones Normally (for pure convenience) port number = same meaning for TCP and UDP if a well known service is offered by both TCP and UDP, the port number is the same if a well known (low port number) service is offered for one protocol only, the corresponding port for the other protocol is generally unused BUT possibly the same port number has different meaning for TCP and UDP. Details in RFC1700 or http://www.iana.org/assignments/port-numbers

Consequence If two applications employ different protocols, they can employ the same port # Mapping refinement socket (protocol,ip addr., port #) Is it enough? Not always

(TCP) Connections identified by sockets at its ends CLIENT WEB SERVER IP: 151.100.37.9 IP: 131.175.21.1 Socket Socket

Managing multiple connections CLIENT A IP: 151.100.37.9 CLIENT B Socket IP: 193.47.31.18 A socket for each connection is needed, because each connection has its own status It is not true for UDP (connectionless) WEB SERVER IP: 131.175.21.1 Socket A Socket B Socket

Managing multiple connections CLIENT A IP: 151.100.37.9 Port: 3124 CLIENT B IP: 193.47.31.18 If each port identifies a socket... How can a new client know the listen port? Are the port numbers enough? WEB SERVER IP: 131.175.21.1 Port: 80 Port: 81 Port: 12134

Managing multiple connections CLIENT A IP: 151.100.37.9 Connections can be distinguished by client and server IP addresses and ports Port: 3124 CLIENT B IP: 193.47.31.18 Connection A [<151.100.37.9,3124>,<131.175.21.1,80>] IP: 131.175.21.1 Port: 80 SERVER Port: 12134 Connection B [<193.47.37.9,12134>,<131.175.21.1,80>]

Managing multiple connections CLIENT 1 IP: 151.100.37.9 Two sockets for the same server port! Port: 3124 Socket CLIENT 2 IP: 193.47.31.18 Connection A [<151.100.37.9,3124>,<131.175.21.1,80>] IP: 131.175.21.1 Socket A Port: 80 Socket B SERVER Port: 12134 Socket Connection B [<193.47.37.9,12134>,<131.175.21.1,80>]

Demultiplexing at receiver (3) app app app UDP SW TCP SW IP SW IP packet http header http payload Information entering app Software (managed by app Developer) Also information about the IP addresses is needed at the transport level IP addr Port # Transport data IP Data Transport SW: checks segment; Sends to application sw based on IP addresses and Port numbers Application demux IP SW: checks IP packet; Sends to transport sw selects whether UDP or TCP Transport demux

Conclusions A socket always identifies unique protocol and port socket (protocol,ip addr, port #) It can identify also address and port of the remote application socket (prot, src IP addr, src port, dest IP addr, dest port)

Conclusions Protocol and port can identify a unique socket socket (protocol,ip addr, port #) listen ports/sockets but in general more information is required (prot., src IP addr, src port, socket dest IP addr, dest port) connection ports/sockets

How to reach client socket another pair of IP Address and Port Number The server needs to know: The host to which send a response src IP address The application software process at client side capable of correctly interpret the response src port # Generally client DOES NOT use a well known port # It is not needed (the client starts talking) OS just assigns one available (Ephemeral ports) Typical question: WHY every PC needs an IP address? More complex issue: HOW your home PC gets an IP address?

Port numbers 16 bit address (0-65535) well known port numbers for common servers FTP 20, TELNET 23, SMTP 25, HTTP 80, POP3 110, (full list: http://www.iana.org/assignments/port-numbers) number assignment 0-1023 (system) well known ports: service contact ports assigned by IANA, on most systems they can only be used by system (or root) processes or by programs executed by privileged users. 1024-49151 (user) registered ports: service contact ports listed by IANA, on most systems they can be used by ordinary user processes or programs executed by ordinary users. 49152-65535 dynamic/private ports.

Last remark about terminology Sometimes socket is considered synonym of the quintet: (prot., src IP addr, src port, dest IP addr, dest port) Ipaddr src Ipaddr dest prtc Port src Port dest Data