1 application layer. 2 writing networked applications tcp udp ip ll pl tcp udp ip ll pl tcp udp ip...

6
1 Application Layer

Post on 20-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client

1

Application Layer

Page 2: 1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client

2

Writing Networked Applications

TCP UDPIPLLPL

TCP UDPIPLLPL

TCP UDPIPLLPL

Web Browser

Web Server

FtpServer

FtpClient

RTSPServer

RealPlayer

Socket Layer

Socket Layer

Socket Layer

• Socket Layer: – Programmer’s API to the IP

Protocol stack

Page 3: 1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client

3

Issues• What Transport Layer Protocol to use?

– TCP? UDP? SCTP?

• How to program? What’s the programmer’s API to the protocol stack?– The socket layer

• What is the syntax and semantics of the messages exchanged between a client and a server?– Application layer protocols: FTP, HTTP,

DNS, SMTP, RTSP, …

Page 4: 1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client

4

What transport service does an app need?

Data loss• some apps (e.g., audio)

can tolerate some loss• other apps (e.g., file

transfer, telnet) require 100% reliable data transfer

Timing• some apps (e.g.,

Internet telephony, interactive games) require low delay to be “effective”

Bandwidth• some apps (e.g.,

multimedia) require minimum amount of bandwidth to be “effective”

• other apps (“elastic apps”) make use of whatever bandwidth they get

Page 5: 1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client

5

Internet apps: application, transport protocols

Application

e-mailremote terminal access

Web file transfer

streaming multimedia

Internet telephony

Applicationlayer protocol

SMTP [RFC 2821]Telnet [RFC 854]HTTP [RFC 2616]FTP [RFC 959]proprietary(e.g. RealNetworks)proprietary(e.g., Dialpad)

Underlyingtransport protocol

TCPTCPTCPTCPTCP or UDP

typically UDP

Page 6: 1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client

6

App-layer protocol defines• Types of messages

exchanged, e.g., request & response messages

• Syntax of message types: what fields in messages & how fields are delineated

• Semantics of the fields, i.e., meaning of information in fields

• Rules for when and how processes send & respond to messages

Public-domain protocols:• defined in RFCs• allows for interoperability• e.g., FTP, HTTP, SMTPProprietary protocols:• e.g., Yahoo Instant

Messaging Protocol, KaZaA (P2P media distribution protocol)