Application layer

27
APPLICATION LAYER & PROTOCOLS SERVICES 1 Presented By : K.Dharshana R.Dhivya M.Sneha M.Divya Bharathi K.S. Lavanya

description

Computer Networks - Application Layer and Protocols Services

Transcript of Application layer

Page 1: Application layer

APPLICATION LAYER &

PROTOCOLS SERVICES

1

Presented By : K.Dharshana R.Dhivya M.Sneha M.Divya Bharathi K.S. Lavanya

Page 2: Application layer

OUTLINE Application Layer

There is a need for support protocols, to allow the applications to function

Some network applications DNS: handles naming within the Internet POP – IMAP – SMTP: handle electronic mail FTP: File Transfer over the Internet WWW – HTTP: Web world Multimedia

2

Page 3: Application layer

Conceptual, implementation aspects of network application protocolsTransport-layer

service modelsClient-server

paradigmPeer-to-peer paradigm

Learn about protocols by examining popular application-level protocolsHTTPFTPSMTP / POP3 / IMAPDNS

Programming network applicationsSocket API

OUR GOALS

3

Page 4: Application layer

4

CREATING A NETWORK APPWrite programs that

Run on (different) end systemsCommunicate over networkE.G., Web server software

communicates with browser software

No need to write software for network-core devicesNetwork-core devices do not run

user applications Applications on end systems

allows for rapid app development, propagation

ApplicationTransportNetworkData linkPhysical

ApplicationTransportNetworkData linkPhysical

ApplicationTransportNetworkData linkPhysical

Page 5: Application layer

5

ADDRESSING PROCESSES

To receive messages, process must have identifier

Host device has unique 32-bit IP address

Question: Does IP address of host suffice for identifying the process ?

Page 6: Application layer

6

Answer: No, many processes can be running on same host

Identifier includes both IP address and port numbers associated with process on host.

Example port numbers: HTTP server: 80 Mail server: 25

To send HTTP message to gaia.Cs.Umass.Edu web server: IP address: 128.119.245.12 Port number: 80

ADDRESSING PROCESSES

Page 7: Application layer

7

APP-LAYER PROTOCOL DEFINESTypes of messages

exchanged

Message syntax

Message semantics

Rules for when and how processes send & respond to messages

Page 8: Application layer

Public-domain protocols:defined in RFCsallows for interoperabilitye.g., HTTP, SMTP

Proprietary protocols:e.g., Skype

APP-LAYER PROTOCOL DEFINES

8

Page 9: Application layer

TRANSPORT SERVICEData loss Audio (some apps)

File transfer & Telnet (other apps)

Timing Internet telephony & Interactive games

Throughput Multimedia (some apps)

Any Throughput (elastic or other apps)

Security Encryption & Data integrity

9

Page 10: Application layer

10

TRANSPORT SERVICE REQUIREMENTS OF COMMON APPS

Application

File transferE-mail

Web documentsReal-time audio/video

Stored audio/videoInteractive gamesInstant messaging

Data loss

No lossNo lossNo lossLoss-tolerant

Loss-tolerantLoss-tolerantNo loss

Throughput

ElasticElasticElasticAudio: 5kbps-1mbpsVideo:10kbps-5mbpsSame as above Few kbps upElastic

Time sensitive

NoNoNoYes, 100’s msec

Yes, few secsYes, 100’s msecYes and no

Page 11: Application layer

11

INTERNET TRANSPORT PROTOCOLS SERVICES

TCP service:

connection-oriented: setup required between client and server processes

reliable transport between sending and receiving process

flow control: sender won’t overwhelm receiver

congestion control: throttle sender when network overloaded

does not provide: timing, minimum throughput guarantees, security

Page 12: Application layer

UDP service:

Unreliable data transfer between sending and receiving process

Does not provide: connection setup, reliability, flow control, congestion control, timing, throughput guarantee, or security

Question: Why bother? Why is there a UDP?

INTERNET TRANSPORT PROTOCOLS SERVICES

12

Page 13: Application layer

13

WEB & HTTPFirst some jargonWeb page consists of objectsObject can be HTML file, JPEG image, java applet, audio

file,…Web page consists of base html-file which includes several

referenced objectsEach object is addressable by a URLExample URL:

www.someschool.edu/someDept/pic.gif

host name path name

Page 14: Application layer

14

HTTP OVERVIEWHypertext Transfer Protocol

Web’s application layer protocol

Client/server modelClient: Browser that requests,

receives, “displays” web objects

Server: web server sends objects in response to requests

PC runningExplorer

Server Running

Apache webServer

Mac runningNavigator

HTTP request

HTTP request

HTTP response

HTTP response

Page 15: Application layer

15

Uses TCP:Client initiates TCP connection

(creates socket) to server, port 80Server accepts TCP connection

from clientHTTP messages (application-

layer protocol messages) exchanged between browser (HTTP client) and web server (HTTP server)

TCP connection closed

HTTP is “stateless”Server maintains no

information about past client requests

HTTP OVERVIEW (Continued)

Page 16: Application layer

16

HTTP REQUEST MESSAGETwo types of HTTP messages: Request & ResponseHTTP request message:

ASCII (Human-readable Format)

Request Line(GET, POST,

HEAD commands)

Header Lines

Carriage return, Line feed

Indicates end Of message

GET /somedir/page.html HTTP/1.1Host: www.someschool.edu User-agent: Mozilla/4.0Connection: close Accept-language:fr

(extra carriage return, line feed)

Page 17: Application layer

17

HTTP/1.1 200 OK Connection closeDate: Thu, 06 Aug 1998 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data ...

Status line(Protocol

Status codeStatus phrase)

Header Lines

Data, e.G., RequestedHTML file

HTTP RESPONSE MESSAGE

Page 18: Application layer

18

FTP - FILE TRANSFER PROTOCOL

Transfer file to/from remote hostClient/server model

Client: side that initiates transfer (either to/from remote)Server: remote host

FTP: RFC 959FTP server: port 21

File transfer FTPServer

FTPUser

Interface

FTPClient

Local fileSystem

Remote fileSystem

User At host

Page 19: Application layer

19

FTPclient

FTPserver

TCP control connectionport 21

TCP data connectionport 20

Server opens another TCP data connection to transfer another file.

Control connection: “out of band”

FTP server maintains “State”: current directory, earlier authentication

FTP - FILE TRANSFER PROTOCOL

Page 20: Application layer

20

FTP - COMMANDS & RESPONSES

Sample commands:Sent as ASCII text over control

channelUSER usernamePASS password

LIST return list of file in current directory

RETR filename retrieves file

STOR filename stores file onto remote host

Sample return codes status code and phrase (as in

HTTP)331 Username OK, password

required125 data connection already

open; transfer starting425 Can’t open data

connection452 Error writing file

Page 21: Application layer

21

SMTP - ELECTRONIC MAIL

Three major components: User Agents Mail Servers Simple Mail Transfer Protocol

user mailbox

outgoing message queue

mailserver

useragent

useragent

useragent

mailserver

useragent

useragent

mailserver

useragent

SMTP

SMTP

SMTPMail Servers MailboxMessageSMTP Protocol between mail

servers to send email messagesClientServer

Page 22: Application layer

22

Electronic Mail: SMTP [RFC 2821]

Uses TCP to reliably transfer email message from client to server, port 25

Direct transfer: sending server to receiving serverThree phases of transfer

Handshaking (greeting)Transfer of messagesClosure

Command/response interactionCommands: ASCII textResponse: status code and phrase

Messages must be in 7-bit ASCII

Page 23: Application layer

23

SCENARIO1) Compose message

2) Send message to mail server., message placed in message queue

3) Client side of SMTP opens TCP connection

4) SMTP client sends message over the TCP connection

5) Mail server places the message in receiver’s mailbox

6) User invokes user agent to read message

useragent

mailserver

mailserver user

agent

1

2 3 4 56

Page 24: Application layer

24

MAIL ACCESS PROTOCOLS

SMTP: Delivery/storage to receiver’s serverMail Access Protocol: Retrieval from server

POP: Post Office Protocol IMAP: Internet Mail Access Protocol

more features (more complex) manipulation of stored messages on server

HTTP: Gmail, Hotmail, Yahoo! Mail, etc.

useragent

sender’s mail server

useragent

SMTP accessprotocol

receiver’s mail server

SMTP

Page 25: Application layer

25

SUMMARY

Application architectures

Client-server

P2P

Hybrid

Application service requirements:

Reliability, bandwidth, delay

Internet transport service model

Connection-oriented, reliable:

TCP

Unreliable, Datagrams: UDP

Specific protocols:

HTTP

FTP

SMTP, POP, IMAP

Page 26: Application layer

THANK YOU !

26

Page 27: Application layer

27

ANY QUERIES ?