Application Level Protocols

Similar documents
Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model

13. Internet Applications 최양희서울대학교컴퓨터공학부

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

CCNA Exploration Network Fundamentals. Chapter 03 Application Functionality and Protocols

Computer Networks. Wenzhong Li. Nanjing University

Layered Model. DoD Model. ISO/OSI Model

Review of Previous Lecture

COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS. Web Access: HTTP Mehmet KORKMAZ

World-Wide Web Protocols CS 571 Fall Kenneth L. Calvert All rights reserved

HTTP Reading: Section and COS 461: Computer Networks Spring 2013

Web Technology. COMP476 Networked Computer Systems. Hypertext and Hypermedia. Document Representation. Client-Server Paradigm.

WWW: the http protocol

SCS3004 Networking Technologies Application Layer Protocols

Internet Architecture. Web Programming - 2 (Ref: Chapter 2) IP Software. IP Addressing. TCP/IP Basics. Client Server Basics. URL and MIME Types HTTP

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

Web, HTTP and Web Caching

Summary of Data Communications

Guide to TCP/IP, Third. Chapter 6: Basic TCP/IP Services

Applications & Application-Layer Protocols: The Web & HTTP

How the Internet Works

CHAPTER 22 DISTRIBUTED APPLICATIONS ANSWERS TO QUESTIONS ANSWERS TO PROBLEMS

Operating Systems. 16. Networking. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski

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

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

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

HyperText Transfer Protocol

Application Layer. Applications and application-layer protocols. Goals:

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

Different Layers Lecture 21

Chapter 2: Application Layer. Chapter 2 Application Layer. Some network apps. Application architectures. Chapter 2: Application layer

Lecture-4. TCP/IP-Overview:

Internet Applications. Dr Steve Gordon ICT, SIIT

Application Protocols and HTTP

06/02/ Local & Metropolitan Area Networks 0. INTRODUCTION. 1. History and Future of TCP/IP ACOE322

APPLICATION LAYER APPLICATION LAYER : DNS, HTTP, , SMTP, Telnet, FTP, Security-PGP-SSH.

WEB TECHNOLOGIES CHAPTER 1

COSC 2206 Internet Tools. The HTTP Protocol

M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN

2. Introduction to Internet Applications

TCP / IP. Isidro Martinez Director, Latin Amèrica

CCNA Exploration1 Chapter 3: Application Layer Functionality and Protocols

TCP /IP Fundamentals Mr. Cantu

The Application Layer: & SMTP

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Data Communication & Computer Networks MCQ S

CMSC 332 Computer Networking Web and FTP

CSC 4900 Computer Networks:

Chapter 10: Application Layer CCENT Routing and Switching Introduction to Networks v6.0

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

CMPE 151: Network Administration. Servers

Key Points for the Review

Application Layer Introduction; HTTP; FTP

Network Architecture Models

CS 43: Computer Networks. Layering & HTTP September 7, 2018

4. The transport layer

NT1210 Introduction to Networking. Unit 10

Application Layer: HTTP

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

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

2/13/2014. A protocol is an agreed-upon convention that defines how communication occurs between two (or more?) endpoints

Unit 28 Website Production ASSIGNMENT 1

Virtual Terminal Apps telnet/rlogin

PLEASE READ CAREFULLY BEFORE YOU START

Lecture Overview : Computer Networking. Applications and Application-Layer Protocols. Client-Server Paradigm

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

Motivation For Networking. Information access Interaction among cooperative application programs Resource sharing

Objective. Application Layer Functionality and Protocols. CCNA Exploration 4.0 Network Fundamentals Chapter 03. Universitas Dian Nuswantoro

3. WWW and HTTP. Fig.3.1 Architecture of WWW

Chapter 2 Application Layer

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

Computer Systems and Networks

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

01/17/08 TDC /17/08 TDC363-03

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

Electronic Mail Paradigm

The HTTP protocol. Fulvio Corno, Dario Bonino. 08/10/09 http 1

World Wide Web. Before WWW

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

PLEASE READ CAREFULLY BEFORE YOU START

Chapter 4. Internet Applications

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

Interconnecting Networks with TCP/IP

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

Chapter 2 Application Layer

PLEASE READ CAREFULLY BEFORE YOU START

Application Layer: OSI and TCP/IP Models

Need For Protocol Architecture

Need For Protocol Architecture

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

Network Services. Administrative Protocols & Services. Johann Oberleitner SS 2006

Hypertext Transport Protocol

Chapter 26 Remote Logging, Electronic Mail, and File Transfer 26.1

EEC-682/782 Computer Networks I

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

BLM6196 COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

Transcription:

Application Level Protocols

2 Application Level Protocols Applications handle different kinds of content e.g.. e-mail, web pages, voice Different types of content require different kinds of protocols Application level protocols Transfer the application s content (application specific behavior) Transfer information about the capabilities of the participants Use lower layer protocols to avoid doing unnecessary work OSI model s session, presentation and application layers are combined to one layer in the TCP/IP model

3 Network relations The network entities use different behavioral models on all protocol layers Client-Server Store and Forward Push Pull Poll Master-Slave Connections Connectionless communication

4 Client-Server communications model Examples: A WWW client connects to a WWW server and requests a document Xeyes program requests the X server for information about mouse cursor position Client is the active participant Sessions are initiated by the client Server is passive and waits for contact Client-server model is usually used to distribute data or CPU

5 Thin and Fat Clients These terms do not refer to the communications logic, but instead to the software architecture The client can be a simple user interface manager E.g. WWW-client The applications logic is in the server Or an application specific program capable of complex data processing operations The applications logic is mostly in the client and the server is usually mostly a database server The difference in communications is between I/O (display) information and between raw data The current trend is towards thin clients and servers that provide the application logic and data

6 Middleware Middleware is a term, which meaning depends on context In the client-server model middleware means usually software that implements the business logic Middleware is connected to the user s thin client at one end and to a database at the other end Typically different protocols are used E.g. HTTP for the client and SQL*Net for the database Middleware can also mean a layer between the actual application and the communications layer (TCP & IP) Provides e.g. AAA services, database access The interaction models between various parties are usually of client-server type The user initiates actions from the web client, which the middleware translates to database queries and data processing However actual business applications may break this pure model E.g. the server sends a notification to the client

7 Store and Forward A message is stored until it can be forwarded Example: SMTP e-mail server receives a message and stores it to disk, after the message is stored, server tries to contact next server and transmit the message forward to it An SMTP server acts both as a server and as a client An IP router stores an IP packet in its memory, until the next link is available for transmission Store and forward makes packet networks efficient and allow discarding the requirement for reserving bandwidth

8 Push Example: A news server contacts a second news server and asks if it has a certain article (identified by message-id). If not, it pushes the article to the second server A e-mail message is sent from one server to another using the SMTP protocol Push is used to update information at another server The pushing sender has responsibility of transmitting new information

9 Pull Examples: A news server contacts a second news server and asks what articles it has (identified by message-id). Then it retrieves those articles it does not already have An e-mail client program contacts a POP or IMAP server and asks for new e-mail for an user-id Pull is used to retrieve information when it suits the client The pulling client has responsibility of receiving the information it needs, this usually requires periodic checks

10 Poll Example: An SNMP network management station asks each router in a network for a count of transmitted packets at each interface The polling entity requests information, polled entities do not (usually) send anything by themselves Polled entities require minimal configuration, polling entity can decide when to poll (manage load) Often used in situations requiring hard real time to ensure that the controlling program has time to loop through all the code

11 Master-Slave Example: An Ethernet network is used for hard real time by having one station which initiates all communications, other stations are allowed only to reply Master dominates slaves completely

12 Connection Examples: An user connects to a Unix server from a PC using Telnet protocol A WWW client program connects to a WWW server using HTTP/1.1 protocol over a TCP protocol and stays connected until all the elements of a WWW page are received Two connections at different protocol levels, TCP and HTTP In a connection both ends share a state IP network is not aware of a connection A connection can be broken by network fault

13 Connectionless data transfer Examples: A DNS resolver sends a DNS server an UDP packet, containing a DNS query A network management station queries routers using SNMP packets in UDP packets, if no reply is received after retries, an alarm is generated In connectionless data transfer the entities transferring information are responsible of knowing the status of communication A DNS server does not care The DNS resolver must retry if the query or reply are lost (UDP is defined as unreliable) or if server is down Avoids the setup cost of a connection

14 What Protocols Do? Protocols are the language different network entities use to talk to each other Windows Netscape can send e-mail to a Sendmail program running on Unix operating system, because they talk same language Internet protocols provide layers of abstraction and rely on other protocols to operate together

15 Internet Protocol Model SNMP, NFS, NTP... DNS FTP, HTTP, SMTP, SSH... Ping UDP TCP ICMP Internet Protocol (IP) Data Link protocols (Ethernet, PPP, ATM, Frame Relay...) Physical media (twisted pair, glass fiber)

16 SMTP mail transfer Simple Mail Transfer Protocol SMTP e-mail server receives a message and stores it to disk After the message is stored, server tries to contact next server and transmit the message forward to it An SMTP server acts both as a server and as a client

17 POP and IMAP mail read Post Office Protocol Internet Message Access Protocol An e-mail client program contacts a POP or IMAP server and asks for new e-mail for an user-id

18 How the mail travels Host sends e-mail using SMTP Server forwards mail using SMTP Client retrieves mail using POP or IMAP Sender Sender's local server Receiver's local server Receiver

19 Telnet Network Terminal Protocol Remote login over the network to a host of any operating system Usually multi-user operating system, like Unix or VMS Offered by TCP/IP protocol suite Application layer protocol, at the top of TCP/IP protocol architecture A very common service Typically Telnet client is included with the operating system (Windows, Unix) The server is also included in most multiuser operating systems (Unix) Client always initiates the connection Server waits for connections from the client

20 Network Virtual Terminal Defines the way how data and commands are sent across the network Client software translates keystrokes and command sequences from the user s terminal into NVT format Server software translates incoming data and commands from NVT format into the format remote system requires At startup 7-bit US ASCII representation 95 printable characters 33 control codes

21 Network Virtual Terminal In addition NVT defines control characters for example ENTER/RETURN -> mapped into CR-LF transmission Control functions are encoded using escape sequences Reserved octet IAC (Interpret as command)

22 Telnet commands Command IAC DON T DO WON T WILL IP BRK NOP... Decimal encoding 255 254 253 252 251 244 243 241... Meaning Interpret next octet as command Denial of request to perform specified option Approval to allow specified option Refusal to perform specified option Agreement to perform specified option Interrupt Process (terminate running program) Break (break key or attention signal) No operation...

23 Telnet commands Request for server interrupt: IAC IP = 255 244 IAC as data: IAC IAC = 255 255 Forcing the server to read control function Needed when buffers are filled or Remote process is in endless loop Telnet uses an out of band signal TCP URGENT DATA bit is set Urgent data bypasses flow control and reaches the server immediately

24 Option negotiation Request WILL X Will you let me use option X? Response DO X or DON T X I agree to let you use option X I don t agree to let you use option X Request DO X Use option X Response WILL X or WON T X I will start using option X I won t start using option X

25 Option negotiation Request WON T X or DON T X I want to disable option X I want you to disable option X Response DON T X or WON T X Options that are not understood are simply declined Options are not part of the Telnet standard, but defined independently Plenty of options available: echo, 8-bit transmission, status, terminal type, window size, terminal speed, X- display location... Leaving the options open for future additions enables the protocol to be adapted to future requirements

26 Telnet connections A connection is made from one server to another Client Client connects to a server Server Another server Client has two simultaneous connections Another client

27 HTTP Overview Application-level protocol for distributed, collaborative, hypermedia information systems. Used by Web browsers to communicate with WWW servers. Generic, stateless, object-oriented Since 1990 HTTP/1.0 (later version 1.1) Based on a request/response paradigm. On HTTP/1.0 connection is closed after each request/response change while on HTTP/1.1 connection may be used for more than one request/response change. HTTP/1.0 specified in RFC 1945 HTTP/1.1 in RFC 2068

28 HTTP Communication (client) Client (browser) opens a TCP connection to an HTTP server (e.g. Apache) by default to port 80. Client decodes the URL: http://www.nixu.fi:8080/ "http": use HTTP protocol "//": absolute URL "www.nixu.fi": WWW server ":8080": use port 8080 Client sends a request line, some optional request headers and a blank line to server.

29 HTTP Communication (server) Server sends a response line, some response headers, a blank line and a document and closes the connection (on HTTP/1.1 connection is not closed) Every object on a page is requested separately. HTML page with 3 pictures: with HTTP/1.0 four separate requests and connections. Server response may be HTML, graphics, audio, VRML or Java...

30 HTTP Client request HTTP/1.0 supports 3 commands: GET, HEAD and POST Format of a simple request is following: Request-Method Document-Address HTTP/Version (e.g. "GET /index.html HTTP/1.0") After request line there can be zero to n request headers which consists of Request-Header:Value pairs. Request is ended by a blank line. (In POST command additional data can be sent after blank line.)

31 HTTP Server Response Format of response line is following: HTTP/Version Status-Code Message (e.g. HTTP/1.1 200 OK) Unspecified amount of response headers might follow (header:value pairs). At least Content-Type header should be send (identifies the type of data that follows). Blank line after final response header. Response Document (or nothing when HEAD command is used).

32 Example 1 bash-2.03$ telnet www.nixu.fi 80 2 Trying... 3 Connected to jalopeno.nixu.fi. 4 Escape character is ^]. 5 HEAD / HTTP/1.0 6 7 HTTP/1.1 200 OK 8 Date: Mon, 12 Apr 1999 10:26:06 GMT 9 Server: Apache/1.2.6 10 Last-Modified: Fri, 26 Feb 1999 15:28:20 GMT 11 Connection: close 12 Content-Type: text/html 13 14 Connection closed. 15 bash-2.03$

33 HTTP Methods Command GET HEAD POST PUT DELETE OPTIONS TRACE Explanation Normal method to request documents Method to request document headers Method to send data to server Method to send a document to server and request server to store it at specified URI Client requests server to remove a specified URI Method to query available options for server in general or for specified URI Requests the server to return the attached document unchanged. Used for debugging

34 HTTP Request Headers Header Accept Connection Content-Length Cookie From Host Explanation Usually username:password encoded in base64 If Keep-Alive used connection is not closed after each request on HTTP/1.0 (default behavior for HTTP/1.1) On POST method length of data area Returns information supplied via a Set- Cookie header (in previous connection) E-mail address of person responsible for the request. Used mostly by Web indexing programs (robots) Host and port as listed in the original URL

35...HTTP Request Headers Header If-Modified-Since Pragma Cache-Control Referer User-Agent Explanation Conditional GET No-cache server should send a fresh copy of document (not cached) No-cache Identical to Pragma except used on HTTP/1.1 Specifies URL of the page that contained the cross-reference Specifies type of browser

36 HTTP Response Status Line HTTP/Version Status-Code Reason-Phrase Status-Code categories 1xx: Informational - Not used, reserved for future use 2xx: Success - Action was successfully received, understood, and accepted. 3xx: Redirection - Further action must be taken in order to complete the request 4xx: Client Error - Request contains bad syntax or cannot be fulfilled 5xx: Server Error - Server failed to fulfill an apparently valid request

37 Predefined status codes (HTTP/1.1) "200" ; OK "201" ; Created "202" ; Accepted "203" ; Non-Authoritative Information "301" ; Moved Permanently "400" ; Bad Request "404" ; Not Found "500" ; Internal Server Error "505" ; HTTP Version not supported

38 HTTP Response Headers Most of the headers are optional but Content-Type header should be included in all responses. Allow Content- Encoding Content-Length Content-Type Expires Last-Modified Location Server Set-Cookie WWW- Authenticate Lists the set of request methods permitted for the specified resource Describes the decoding mechanism that must be used to obtain the MIME media type specified in the Content-Type header Number of bytes in the file MIME type and subtype Time and date when document expires Time and date when document was changed last time New location of the requested document Information about the HTTP server name/value pair to be stored by browser. This pair will be transmitted in the Cookie header in future requests to the same URL Gives authorization type and realm that the client has to supply in an Authorization header