Part 2 application Layer Our goals: More chapter goals r conceptual, r specific protocols: Implementation mhttp aspects of network m ftp application protocols m smtp m client-server m po paradigm dns m service models r programming network r learn about protocols applications y examining popular m socket API application-level protocols 2: Application Layer 1
2: Application Layer 1 Part 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m client-server paradigm m service models r learn about protocols by examining popular application-level protocols More chapter goals r specific protocols: m http m ftp m smtp m pop m dns r programming network applications m socket API
Applications and application-layer protocols Application: communicating, plication distributed processes m running in network hosts in physical user space exchange messages to implement application ●●● m e.g., email, ftp, Web Application-layer protocols 受 one piece" of an app m define messages exchanged by apps and transport actions taken hysical m use communication services provided by lower layer protocols(TCP, UDP 2: Application Layer 2
2: Application Layer 2 Applications and application-layer protocols Application: communicating, distributed processes m running in network hosts in “user space” m exchange messages to implement application m e.g., email, ftp, Web Application-layer protocols m one “piece” of an app m define messages exchanged by apps and actions taken m use communication services provided by lower layer protocols (TCP, UDP) application transport network data link physical application transport network data link physical application transport network data link physical
Network applications: some jargon Process: program running r user agent: software within a host process, Interfacing r within same host two with user above"and processes communicate network " below using interprocess m implements communication(defined application-level by Os) rotocol r processes running m Web: browser different hosts E-mail: mail reader communicate with an application-layer m streaming rotoco audio/video: media player 2: Application Layer 3
2: Application Layer 3 Network applications: some jargon Process: program running within a host. r within same host, two processes communicate using interprocess communication (defined by OS). r processes running in different hosts communicate with an application-layer protocol r user agent: software process, interfacing with user “above” and network “below”. m implements application-level protocol m Web: browser m E-mail: mail reader m streaming audio/video: media player
Client-server paradigm Typical network app has two oplication pieces: client and server pny Client: reque initiates contact with server Speaks first ■●● r typically requests service from server re r Web: client implemented in browser' e-mail: in mail reader plication Server hysical r provides requested service to client r e.g., Web server sends requested Web page, mail server delivers e-mail 2: Application Layer 4
2: Application Layer 4 Client-server paradigm Typical network app has two pieces: client and server application transport network data link physical application transport network data link physical Client: r initiates contact with server (“speaks first”) r typically requests service from server, r Web: client implemented in browser; e-mail: in mail reader request reply Server: r provides requested service to client r e.g., Web server sends requested Web page, mail server delivers e-mail
Application-layer protocols(cont API: application Q: how does a process programming interface "identify"the other rdefⅰ nes interface process with which it between application and wants to communicate? transport layers IP address of host r socket: Internet api running oTher process m "port number" -allows m two processes receiving host to communicate by sending determine to which loca data into socket, reading lata out of socket process the message should be delivered lots more on this later 2: Application Layer
2: Application Layer 5 Application-layer protocols (cont). API: application programming interface r defines interface between application and transport layers r socket: Internet API m two processes communicate by sending data into socket, reading data out of socket Q: how does a process “identify” the other process with which it wants to communicate? m IP address of host running other process m “port number” - allows receiving host to determine to which local process the message should be delivered … lots more on this later
What transport service does an app need? Data loss Bandwidth some apps(e.g, audio)can tolerate some loss r some apps (e.g multimedia require r other apps(e.g. file minimum amount of transfer, telnet require 100%reliable data bandwidth to be transfer effective Timing r other apps elastic apps )make use of some apps(e.g whatever bandwidth Internet telephony interactive games) they get require low delay to be effective" 2: Application Layer 6
2: Application Layer 6 What transport service does an app need? Data loss r some apps (e.g., audio) can tolerate some loss r other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing r some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Bandwidth r some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” r other apps (“elastic apps”) make use of whatever bandwidth they get
Transport service requirements of common apps Application Data loss Bandwidth Time Sensitive file transfer no loss elastic no e-mail no loss elastic no Web documents loss-tolerant elastic no real-time audio/video loss-tolerant audio 5Kb-1Mb yes, 100s msec video 10Kb-5Mb stored audio/video loss-tolerant same as above yes, few secs interactive games loss-tolerant few Kbps up yes, 100s msec financial apps no loss elastic yes and no 2: Application Layer 7
2: Application Layer 7 Transport service requirements of common apps Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games financial apps Data loss no loss no loss loss-tolerant loss-tolerant loss-tolerant loss-tolerant no loss Bandwidth elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up elastic Time Sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no
Internet transport protocols services TCP service: UDP service: connection-oriented: setu r unreliable data transfer required between client between sending and server receiving process r reliable transport between does not provide sending and receiving process connection setup, r flow control: sender won't reliability, f low control overwhelm receiver congestion control, timing r congestion control: throttle or bandwidth quarantee sender when network overloaded Q: why bother? Why is minimum bandwidth9, loes not providing: ti there a UDP? guarantees 2: Application Layer 8
2: Application Layer 8 Internet transport protocols services TCP service: r connection-oriented: setup required between client, server r reliable transport between sending and receiving process r flow control: sender won’t overwhelm receiver r congestion control: throttle sender when network overloaded r does not providing: timing, minimum bandwidth guarantees UDP service: r unreliable data transfer between sending and receiving process r does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee Q: why bother? Why is there a UDP?
Internet apps: application, transport protocols Application Underlying Application layer protocol transport protocol e-mail smtp [RFc 821 TCP remote terminal access telnet [rFc 854 TCP Webhttp[rfc2068] TCP file transfer ftp [RFc 959 TCP streaming multimedia proprietary tCP or UDP (e.g. RealNetworks) remote file server NSF TCP or UDP Internet telephony proprietary typically UDP (e. g, Vocaltec) 2: Application Layer 9
2: Application Layer 9 Internet apps: application, transport protocols Application e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony Application layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NSF proprietary (e.g., Vocaltec) Underlying transport protocol TCP TCP TCP TCP TCP or UDP TCP or UDP typically UDP
TheWebthehttpprotocol httphypertexttransfer protocol r Web's application layer PC running est protocol Exple r client/server model client: browser that requests, receives Server displays"Web objects running m server: Web server NCSA Web server sends ob jects in response fo requests rhttp1.0:Rfc1945 Mac running Navigator rhttp1.1:Rfc2068 2: Application Layer 10
2: Application Layer 10 The Web: the http protocol http: hypertext transfer protocol r Web’s application layer protocol r client/server model m client: browser that requests, receives, “displays” Web objects m server: Web server sends objects in response to requests r http1.0: RFC 1945 r http1.1: RFC 2068 PC running Explorer Server running NCSA Web server Mac running Navigator