1
2: Applicat ion Layer 1
Chapt er 2: Applicat ion Layer
Chapt er goals:
❒ concept ual +
implement at ion aspect s
- f net work applicat ion
prot ocols
❍ client server
paradigm
❍ service models
❒ learn about prot ocols by
examining popular applicat ion-level prot ocols
More chapt er goals
❒ specif ic pr ot ocols:
❍ ht t p ❍ f t p ❍ smt p ❍ pop ❍ dns
❒ pr ogr amming net wor k
applicat ions
❍ socket programming 2: Applicat ion Layer 2
Applicat ions and applicat ion-layer prot ocols
Applicat ion: communicat ing, dist ribut ed processes
❍ running in net work host s in
“user space”
❍ exchange messages t o
implement app
❍ e.g., email, f ile t r ansf er,
t he Web Applicat ion-layer prot ocols
❍ one “piece” of an app ❍ def ine messages
exchanged by apps and act ions t aken
❍ user services provided by
lower layer prot ocols
applicat ion t r anspor t net work dat a link physical applicat ion t r anspor t net work dat a link physical applicat ion t r anspor t net work dat a link physical
2: Applicat ion Layer 3
Net work applicat ions: some j argon
❒ A process is a progr am
t hat is running wit hin a host .
❒ Wit hin t he same host , t wo
processes communicat e wit h int er process communicat ion def ined by t he OS.
❒ Processes running in
dif f erent host s communicat e wit h an applicat ion-layer prot ocol ❒ A user agent is an
int er f ace bet ween t he user and t he net wor k applicat ion.
❍ Web:browser ❍ E-mail: mail reader ❍ st reaming audio/ video:
media player
2: Applicat ion Layer 4
Client -server paradigm
Typical net work app has t wo pieces: client and ser ver
applicat ion t r anspor t net work dat a link physical applicat ion t r anspor t net work dat a link physical
Client :
❒ init iat es cont act wit h server
(“speaks f irst ”)
❒ t ypically request s service f rom
server,
❒ f or Web, client is implement ed
in browser ; f or e-mail, in mail reader Server:
❒ provides r equest ed service t o
client
❒ e.g., Web server sends
request ed Web page, mail server delivers e-mail request reply
2: Applicat ion Layer 5
Applicat ion-layer prot ocols (cont ).
API : applicat ion pr ogr amming int er f ace
❒ def ines int er f ace
bet ween applicat ion and t ranspor t layer
❒ socket : I nt ernet AP
I
❍ t wo processes
communicat e by sending dat a int o socket , reading dat a out of socket
Q: how does a pr ocess “ident if y” t he ot her pr ocess wit h which it want s t o communicat e?
❍ I P addr ess of host
running ot her process
❍ “port number” - allows
receiving host t o det ermine t o which local process t he message should be delivered
… lot s mor e on t his lat er .
2: Applicat ion Layer 6
What t ransport service does an app need?
Dat a loss
❒ some apps (e.g., audio) can
t oler at e some loss
❒ ot her apps (e.g., f ile
t ransf er, t elnet ) requir e 100% r eliable dat a t ransf er
Timing
❒ some apps (e.g., I nt ernet
t elephony, int eract ive games) require low delay t o be “ef f ect ive”
Bandwidt h
❒ some apps (e.g., mult imedia)
requir e minimum amount of bandwidt h t o be “ef f ect ive”
❒ ot her apps (“elast ic apps”)
make use of what ever bandwidt h t hey get