SlideShare a Scribd company logo
1 of 44
Application Layer 2-1
Chapter 2: outline
2.1 principles of
network
applications
2.2 Web and HTTP
2.3 FTP
2.4 electronic mail
ī‚§ SMTP, POP3,
IMAP
2.5 DNS
2.6 P2P applications
2.7 socket
programming with
UDP and TCP
Application Layer 2-2
Chapter 2: application layer
our goals:
īļ conceptual,
implementation
aspects of network
application protocols
ī‚§ transport-layer
service models
ī‚§ client-server
paradigm
ī‚§ peer-to-peer
paradigm
īļ learn about protocols
by examining popular
application-level
protocols
ī‚§ HTTP
ī‚§ FTP
ī‚§ SMTP / POP3 / IMAP
ī‚§ DNS
īļ creating network
applications
ī‚§ socket API
Application Layer 2-3
Some network apps
īļ e-mail
īļ web
īļ text messaging
īļ remote login
īļ P2P file sharing
īļ multi-user network
games
īļ streaming stored video
(YouTube, Hulu, Netflix)
īļ voice over IP (e.g.,
Skype)
īļ real-time video
conferencing
īļ social networking
īļ search
īļ â€Ļ
īļ â€Ļ
Application Layer 2-4
Creating a network app
write programs that:
īļ run on (different) end
systems
īļ communicate over network
īļ e.g., web server software
communicates with
browser software
no need to write software for
network-core devices
īļ network-core devices do
not run user applications
īļ applications on end
systems allows for rapid
app development,
propagation
application
transport
network
data link
physical
application
transport
network
data link
physical
application
transport
network
data link
physical
Application Layer 2-5
Application architectures
possible structure of applications:
īļ client-server
īļ peer-to-peer (P2P)
Application Layer 2-6
Client-server architecture
server:
īļ always-on host
īļ permanent IP address
īļ data centers for scaling
clients:
īļ communicate with server
īļ may be intermittently
connected
īļ may have dynamic IP
addresses
īļ do not communicate
directly with each other
client/server
Application Layer 2-7
P2P architecture
īļ no always-on server
īļ arbitrary end systems
directly communicate
īļ peers request service
from other peers, provide
service in return to other
peers
ī‚§ self scalability – new
peers bring new
service capacity, as
well as new service
demands
īļ peers are intermittently
connected and change IP
addresses
ī‚§ complex management
peer-peer
Application Layer 2-8
Processes communicating
process: program
running within a host
īļ within same host, two
processes communicate
using inter-process
communication (defined
by OS)
īļ processes in different
hosts communicate by
exchanging messages
client process: process
that initiates
communication
server process: process
that waits to be
contacted
īļ aside: applications with
P2P architectures have
client processes & server
processes
clients, servers
Application Layer 2-9
Sockets
īļ process sends/receives messages to/from its socket
īļ socket analogous to door
ī‚§ sending process shoves message out door
ī‚§ sending process relies on transport infrastructure on
other side of door to deliver message to socket at
receiving process
Internet
controlled
by OS
controlled by
app developer
transport
application
physical
link
network
process
transport
application
physical
link
network
process
socket
Application Layer 2-10
Addressing processes
īļ to receive messages,
process must have
identifier
īļ host device has unique
32-bit IP address
īļ Q: does IP address of
host on which process
runs suffice for identifying
the process?
īļ 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
īļ more shortlyâ€Ļ
ī‚§ A: no, many
processes can be
running on same host
Application Layer 2-11
What transport service does an app
need?
data integrity
īļ some apps (e.g., file
transfer, web transactions)
require 100% reliable data
transfer
īļ other apps (e.g., audio) can
tolerate some loss
timing
īļ some apps (e.g.,
Internet telephony,
interactive games)
require low delay to be
“effective”
throughput
īļ some apps (e.g.,
multimedia) require
minimum amount of
throughput to be
“effective”
īļ other apps (“elastic
apps”) make use of
whatever throughput
they get
security
īļ encryption, data integrity,
â€Ļ
Application Layer 2-12
Transport service requirements: common
apps
application
file transfer
e-mail
Web documents
real-time audio/video
stored audio/video
interactive games
text messaging
data loss
no loss
no loss
no loss
loss-tolerant
loss-tolerant
loss-tolerant
no loss
throughput
elastic
elastic
elastic
audio: 5kbps-1Mbps
video:10kbps-5Mbps
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
Application Layer 2-13
Internet transport protocols services
TCP service:
īļ 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
guarantee, security
īļ connection-oriented:
setup required between
client and server
processes
UDP service:
īļ unreliable data transfer
between sending and
receiving process
īļ does not provide:
reliability, flow control,
congestion control,
timing, throughput
guarantee, security,
orconnection setup,
Q: why bother? Why is
there a UDP?
Application Layer 2-14
Internet apps: application, transport protocols
application
e-mail
remote terminal access
Web
file transfer
streaming multimedia
Internet telephony
application
layer protocol
SMTP [RFC 2821]
Telnet [RFC 854]
HTTP [RFC 2616]
FTP [RFC 959]
HTTP (e.g., YouTube),
RTP [RFC 1889]
SIP, RTP, proprietary
(e.g., Skype)
underlying
transport protocol
TCP
TCP
TCP
TCP
TCP or UDP
TCP or UDP
Securing TCP
TCP & UDP
īļ no encryption
īļ cleartext passwds
sent into socket
traverse Internet in
cleartext
SSL
īļ provides encrypted
TCP connection
īļ data integrity
īļ end-point
authentication
SSL is at app layer
īļ Apps use SSL
libraries, which “talk”
to TCP
SSL socket API
īļ cleartext passwds
sent into socket
traverse Internet
encrypted
īļ See Chapter 7
Application Layer 2-15
Application Layer 2-16
Chapter 2: outline
2.1 principles of
network
applications
ī‚§ app architectures
ī‚§ app requirements
2.2 Web and HTTP
2.3 FTP
2.4 electronic mail
ī‚§ SMTP, POP3,
IMAP
2.5 DNS
2.6 P2P applications
2.7 socket
programming with
UDP and TCP
Application Layer 2-17
Web and HTTP
First, a reviewâ€Ļ
īļ web page consists of objects
īļ object can be HTML file, JPEG image, Java
applet, audio file,â€Ļ
īļ web page consists of base HTML-file which
includes several referenced objects
īļ each object is addressable by a URL, e.g.,
www.someschool.edu/someDept/pic.gif
host name path name
Application Layer 2-18
HTTP overview
HTTP: hypertext
transfer protocol
īļ Web’s application layer
protocol
īļ client/server model
ī‚§ client: browser that
requests, receives,
(using HTTP
protocol) and
“displays” Web
objects
ī‚§ server: Web server
sends (using HTTP
protocol) objects in
response to requests
PC running
Firefox browser
server
running
Apache Web
server
iphone running
Safari browser
Application Layer 2-19
HTTP overview (continued)
uses TCP:
īļ client initiates TCP
connection (creates
socket) to server, port
80
īļ server accepts TCP
connection from client
īļ HTTP 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
protocols that maintain
“state” are complex!
īļ past history (state) must be
maintained
īļ if server/client crashes, their
views of “state” may be
inconsistent, must be
reconciled
aside
Application Layer 2-20
HTTP connections
non-persistent HTTP
īļ at most one object
sent over TCP
connection
ī‚§ connection then
closed
īļ downloading
multiple objects
required multiple
connections
persistent HTTP
īļ multiple objects can
be sent over single
TCP connection
between client,
server
Application Layer 2-21
Non-persistent HTTP
suppose user enters URL:
1a. HTTP client initiates TCP
connection to HTTP server
(process) at
www.someSchool.edu on port
80
2. HTTP client sends HTTP
request message (containing
URL) into TCP connection
socket. Message indicates
that client wants object
someDepartment/home.inde
x
1b. HTTP server at host
www.someSchool.edu
waiting for TCP connection
at port 80. “accepts”
connection, notifying client
3. HTTP server receives
request message, forms
response message
containing requested object,
and sends message into its
sockettime
(contains text,
references to 10
jpeg images)
www.someSchool.edu/someDepartment/home.index
Application Layer 2-22
Non-persistent HTTP (cont.)
5. HTTP client receives response
message containing html file,
displays html. Parsing html file,
finds 10 referenced jpeg
objects
6. Steps 1-5 repeated for each
of 10 jpeg objects
4. HTTP server closes TCP
connection.
time
Application Layer 2-23
Non-persistent HTTP: response time
RTT (definition): time for a
small packet to travel from
client to server and back
HTTP response time:
īļ one RTT to initiate TCP
connection
īļ one RTT for HTTP
request and first few bytes
of HTTP response to
return
īļ file transmission time
īļ non-persistent HTTP
response time =
2RTT+ file
transmission time
time to
transmit
file
initiate TCP
connection
RTT
request
file
RTT
file
received
time time
Application Layer 2-24
Persistent HTTP
non-persistent HTTP
issues:
īļ requires 2 RTTs per
object
īļ OS overhead for each
TCP connection
īļ browsers often open
parallel TCP connections
to fetch referenced
objects
persistent HTTP:
īļ server leaves
connection open after
sending response
īļ subsequent HTTP
messages between
same client/server sent
over open connection
īļ client sends requests as
soon as it encounters a
referenced object
īļ as little as one RTT for
all the referenced
objects
īļ With persistent connections, the server leaves the TCP connection open
after
īļ sending a response. Subsequent requests and responses between the
same client and
īļ server can be sent over the same connection. In particular, an entire Web
page (in
īļ the example above, the base HTML file and the 10 images) can be sent
over a single
īļ persistent TCP connection. Moreover, multiple Web pages residing on the
same
īļ server can be sent from the server to the same client over a single
persistent TCP
īļ connection. These requests for objects can be made back-to-back, without
waiting
īļ for replies to pending requests (pipelining). Typically, the HTTP server
closes a connection
īļ when it isn’t used for a certain time (a configurable timeout interval). When
īļ the server receives the back-to-back requests, it sends the objects back-to-
back. The
īļ default mode of HTTP uses persistent connections with pipelining.
Application Layer 2-25
Application Layer 2-26
User-server state: cookies
many Web sites use
cookies
four components:
1) cookie header line of
HTTP response
message
2) cookie header line in
next HTTP request
message
3) cookie file kept on
user’s host,
managed by user’s
browser
4) back-end database
example:
īļ Susan always access
Internet from PC
īļ visits specific e-
commerce site for first
time
īļ when initial HTTP
requests arrives at site,
site creates:
ī‚§ unique ID
ī‚§ entry in backend
database for ID
Application Layer 2-27
Cookies: keeping “state” (cont.)
client server
usual http response msg
usual http response msg
cookie file
one week later:
usual http request msg
cookie: 1678 cookie-
specific
action
access
ebay 8734
usual http request msg Amazon server
creates ID
1678 for user create
entry
usual http response
set-cookie: 1678ebay 8734
amazon 1678
usual http request msg
cookie: 1678 cookie-
specific
action
access
ebay 8734
amazon 1678
backend
database
Application Layer 2-28
Cookies (continued)
what cookies can be
used for:
īļ authorization
īļ shopping carts
īļ recommendations
īļ user session state (Web
e-mail)
cookies and privacy:
īļ cookies permit sites to
learn a lot about you
īļ you may supply name
and e-mail to sites
aside
how to keep “state”:
īļ protocol endpoints: maintain state at
sender/receiver over multiple
transactions
īļ cookies: http messages carry state
Application Layer 2-29
Web caches (proxy server)
īļ user sets browser: Web
accesses via cache
īļ browser sends all
HTTP requests to
cache
ī‚§ object in cache:
cache returns object
ī‚§ else cache requests
object from origin
server, then returns
object to client
goal: satisfy client request without involving origin
server
client
proxy
server
client origin
server
origin
server
Application Layer 2-30
More about Web caching
īļ cache acts as both
client and server
ī‚§ server for original
requesting client
ī‚§ client to origin server
īļ typically cache is
installed by ISP
(university,
company, residential
ISP)
why Web caching?
īļ reduce response time
for client request
īļ reduce traffic on an
institution’s access
link
īļ Internet dense with
caches: enables
“poor” content
providers to effectively
deliver content (so too
does P2P file sharing)
Application Layer 2-31
Caching example:
origin
servers
public
Internet
institutional
network
1 Gbps LAN
1.54 Mbps
access link
assumptions:
īļ avg object size: 100K bits
īļ avg request rate from browsers to
origin servers:15/sec
īļ avg data rate to browsers: 1.50
Mbps
īļ RTT from institutional router to
any origin server: 2 sec
īļ access link rate: 1.54 Mbps
consequences:
īļ LAN utilization: 15%
īļ access link utilization = 99%
īļ total delay = Internet delay +
access delay + LAN delay
= 2 sec + minutes + usecs
problem!
Application Layer 2-32
assumptions:
īļ avg object size: 100K bits
īļ avg request rate from browsers to
origin servers:15/sec
īļ avg data rate to browsers: 1.50
Mbps
īļ RTT from institutional router to
any origin server: 2 sec
īļ access link rate: 1.54 Mbps
consequences:
īļ LAN utilization: 15%
īļ access link utilization = 99%
īļ total delay = Internet delay + access
delay + LAN delay
= 2 sec + minutes + usecs
Caching example: fatter access
link
origin
servers
1.54 Mbps
access link
154
Mbps
154 Mbps
msecs
Cost: increased access link speed (not cheap!)
9.9%
public
Internet
institutional
network
1 Gbps LAN
institutional
network
1 Gbps LAN
Application Layer 2-33
Caching example: install local
cache
origin
servers
1.54 Mbps
access link
local web
cache
assumptions:
īļ avg object size: 100K bits
īļ avg request rate from browsers to
origin servers:15/sec
īļ avg data rate to browsers: 1.50
Mbps
īļ RTT from institutional router to
any origin server: 2 sec
īļ access link rate: 1.54 Mbps
consequences:
īļ LAN utilization: 15%
īļ access link utilization = 100%
īļ total delay = Internet delay + access
delay + LAN delay
= 2 sec + minutes + usecs
?
?
How to compute link
utilization, delay?
Cost: web cache (cheap!)
public
Internet
Application Layer 2-34
Caching example: install local
cache
Calculating access link
utilization, delay with
cache:
īļ suppose cache hit rate is 0.4
ī‚§ 40% requests satisfied at cache,
60% requests satisfied at origin
origin
servers
1.54 Mbps
access link
īļ access link utilization:
ī‚§ 60% of requests use access link
īļ data rate to browsers over access
link = 0.6*1.50 Mbps = .9 Mbps
ī‚§ utilization = 0.9/1.54 = .58
īļ total delay
ī‚§ = 0.6 * (delay from origin servers)
+0.4 * (delay when satisfied at
cache)
ī‚§ = 0.6 (2.01) + 0.4 (~msecs)
ī‚§ = ~ 1.2 secs
ī‚§ less than with 154 Mbps link (and
cheaper too!)
public
Internet
institutional
network
1 Gbps LAN
local web
cache
Application Layer 2-35
Chapter 2: outline
2.1 principles of
network
applications
ī‚§ app architectures
ī‚§ app requirements
2.2 Web and HTTP
2.3 FTP
2.4 electronic mail
ī‚§ SMTP, POP3,
IMAP
2.5 DNS
2.6 P2P applications
2.7 socket
programming with
UDP and TCP
Application Layer 2-36
DNS: domain name system
Internet hosts:
ī‚§ IP address (32 bit) -
used for addressing
datagrams
ī‚§ “name”, e.g.,
www.yahoo.com -
used by humans
Q: how to map between IP
address and name, and
vice versa ?
Domain Name System:
īļ distributed database
implemented in hierarchy of
many name servers
īļ application-layer protocol:
hosts, name servers
communicate to resolve
names (address/name
translation)
Application Layer 2-37
DNS: services, structure
why not centralize DNS?
īļ single point of failure
īļ traffic volume
īļ distant centralized
database
īļ maintenance
DNS services
īļ hostname to IP address
translation
īļ host aliasing
ī‚§ canonical, alias names
īļ mail server aliasing
īļ load distribution
ī‚§ replicated Web
servers: many IP
addresses
correspond to one
name
A: doesn’t scale!
Application Layer 2-38
Root DNS Servers
com DNS servers org DNS servers edu DNS servers
poly.edu
DNS servers
umass.edu
DNS servers
yahoo.com
DNS servers
amazon.com
DNS servers
pbs.org
DNS servers
DNS: a distributed, hierarchical
database
client wants IP for www.amazon.com; 1st approx:
īļ client queries root server to find com DNS server
īļ client queries .com DNS server to get amazon.com DNS
server
īļ client queries amazon.com DNS server to get IP address for
www.amazon.com
â€Ļ â€Ļ
Application Layer 2-39
DNS: root name servers
īļ contacted by local name server that can not resolve name
īļ root name server:
ī‚§ contacts authoritative name server if name mapping not
known
ī‚§ gets mapping
ī‚§ returns mapping to local name server
13 root name
“servers”
worldwide
a. Verisign, Los Angeles CA
(5 other sites)
b. USC-ISI Marina del Rey, CA
l. ICANN Los Angeles, CA
(41 other sites)
e. NASA Mt View, CA
f. Internet Software C.
Palo Alto, CA (and 48 other
sites)
i. Netnod, Stockholm (37 other sites)
k. RIPE London (17 other sites)
m. WIDE Tokyo
(5 other sites)
c. Cogent, Herndon, VA (5 other sites)
d. U Maryland College Park, MD
h. ARL Aberdeen, MD
j. Verisign, Dulles VA (69 other sites )
g. US DoD Columbus,
OH (5 other sites)
Application Layer 2-40
TLD, authoritative servers
top-level domain (TLD) servers:
ī‚§ responsible for com, org, net, edu, aero, jobs,
museums, and all top-level country domains, e.g.: uk,
fr, ca, jp
ī‚§ Network Solutions maintains servers for .com TLD
ī‚§ Educause for .edu TLD
authoritative DNS servers:
ī‚§ organization’s own DNS server(s), providing
authoritative hostname to IP mappings for
organization’s named hosts
ī‚§ can be maintained by organization or service
provider
Application Layer 2-41
Local DNS name server
īļ does not strictly belong to hierarchy
īļ each ISP (residential ISP, company,
university) has one
ī‚§ also called “default name server”
īļ when host makes DNS query, query is sent to
its local DNS server
ī‚§ has local cache of recent name-to-address
translation pairs (but may be out of date!)
ī‚§ acts as proxy, forwards query into hierarchy
Application Layer 2-42
requesting host
cis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS server
dns.poly.edu
1
2
3
4
5
6
authoritative DNS server
dns.cs.umass.edu
7
8
TLD DNS server
DNS name
resolution example
īļ host at cis.poly.edu
wants IP address for
gaia.cs.umass.edu
iterated query:
īļ contacted server
replies with name of
server to contact
īļ “I don’t know this
name, but ask this
server”
Application Layer 2-43
45
6
3
recursive query:
īļ puts burden of
name resolution on
contacted name
server
īļ heavy load at
upper levels of
hierarchy?
requesting host
cis.poly.edu
gaia.cs.umass.edu
root DNS server
local DNS server
dns.poly.edu
1
2
7
authoritative DNS server
dns.cs.umass.edu
8
DNS name
resolution example
TLD DNS
server
Application Layer 2-44
DNS: caching, updating records
īļ once (any) name server learns mapping, it
caches mapping
ī‚§ cache entries timeout (disappear) after some time
(TTL)
ī‚§ TLD servers typically cached in local name servers
â€ĸ thus root name servers not often visited
īļ cached entries may be out-of-date (best effort
name-to-address translation!)
ī‚§ if name host changes IP address, may not be
known Internet-wide until all TTLs expire
īļ update/notify mechanisms proposed IETF
standard
ī‚§ RFC 2136

More Related Content

What's hot

Chapter 2
Chapter 2Chapter 2
Chapter 2Videoguy
 
CCNA 1 Routing and Switching v5.0 Chapter 10
CCNA 1 Routing and Switching v5.0 Chapter 10CCNA 1 Routing and Switching v5.0 Chapter 10
CCNA 1 Routing and Switching v5.0 Chapter 10Nil Menon
 
Application layer
Application layerApplication layer
Application layerFarah Hunny
 
Lecture application layer
Lecture application layerLecture application layer
Lecture application layerHasam Panezai
 
Application Layer and Protocols
Application Layer and ProtocolsApplication Layer and Protocols
Application Layer and ProtocolsRubal Sagwal
 
Application layer
Application layerApplication layer
Application layerSakthiVinoth78
 
Chapter2 application layer
Chapter2 application layerChapter2 application layer
Chapter2 application layerKhÃĄnh Gháēģ
 
The Internet and World Wide Web
The Internet and World Wide WebThe Internet and World Wide Web
The Internet and World Wide Webwebhostingguy
 
Application layer in network system
Application layer in network systemApplication layer in network system
Application layer in network systemSalauddin Rubel
 
Ajp notes-chapter-04
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04Ankit Dubey
 
Application protocols
Application protocolsApplication protocols
Application protocolsOnline
 
Application layer
Application layerApplication layer
Application layerMukesh Chinta
 
Exp2003 Int Ppt 01
Exp2003 Int Ppt 01Exp2003 Int Ppt 01
Exp2003 Int Ppt 01lonetree
 
Unit-4 networking basics in java
Unit-4 networking basics in javaUnit-4 networking basics in java
Unit-4 networking basics in javaAmol Gaikwad
 
Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Max Kleiner
 

What's hot (20)

Chapter 2
Chapter 2Chapter 2
Chapter 2
 
CCNA 1 Routing and Switching v5.0 Chapter 10
CCNA 1 Routing and Switching v5.0 Chapter 10CCNA 1 Routing and Switching v5.0 Chapter 10
CCNA 1 Routing and Switching v5.0 Chapter 10
 
Application layer
Application layerApplication layer
Application layer
 
Lecture application layer
Lecture application layerLecture application layer
Lecture application layer
 
Chapter3
Chapter3Chapter3
Chapter3
 
Application Layer and Protocols
Application Layer and ProtocolsApplication Layer and Protocols
Application Layer and Protocols
 
Application layer
Application layerApplication layer
Application layer
 
Chapter2 application layer
Chapter2 application layerChapter2 application layer
Chapter2 application layer
 
The Internet and World Wide Web
The Internet and World Wide WebThe Internet and World Wide Web
The Internet and World Wide Web
 
Application layer in network system
Application layer in network systemApplication layer in network system
Application layer in network system
 
Ajp notes-chapter-04
Ajp notes-chapter-04Ajp notes-chapter-04
Ajp notes-chapter-04
 
Application protocols
Application protocolsApplication protocols
Application protocols
 
Application layer
Application layerApplication layer
Application layer
 
Application layer
Application layerApplication layer
Application layer
 
Chapter 2 v6.3
Chapter 2 v6.3Chapter 2 v6.3
Chapter 2 v6.3
 
Networking
NetworkingNetworking
Networking
 
Ch10
Ch10Ch10
Ch10
 
Exp2003 Int Ppt 01
Exp2003 Int Ppt 01Exp2003 Int Ppt 01
Exp2003 Int Ppt 01
 
Unit-4 networking basics in java
Unit-4 networking basics in javaUnit-4 networking basics in java
Unit-4 networking basics in java
 
Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3
 

Similar to Ch2 application layer Network

02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptx02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptxALI2H
 
Chapter2 l2 modified_um
Chapter2 l2 modified_umChapter2 l2 modified_um
Chapter2 l2 modified_umSajid Baloch
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 ApplicationDiego Corrales
 
applayerslides.ppt
applayerslides.pptapplayerslides.ppt
applayerslides.pptSatishBangal3
 
Chapter2_L2.ppt
Chapter2_L2.pptChapter2_L2.ppt
Chapter2_L2.pptRashmin Tanna
 
applicationapplicationapplicationapplication.ppt
applicationapplicationapplicationapplication.pptapplicationapplicationapplicationapplication.ppt
applicationapplicationapplicationapplication.pptDEEPAK948083
 
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptxCS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptxfarhanali32014
 
Lec 6(Application Layer)
Lec 6(Application Layer)Lec 6(Application Layer)
Lec 6(Application Layer)maamir farooq
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks Kathirvel Ayyaswamy
 
Computer network network edge and network
Computer network network edge and networkComputer network network edge and network
Computer network network edge and networkrjnavallasca
 
Appl layer
Appl layerAppl layer
Appl layerrajanikant
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdfEidTahir
 
Hasanain_Application Layer_Chapter_2_Version 7.1.ppt
Hasanain_Application Layer_Chapter_2_Version 7.1.pptHasanain_Application Layer_Chapter_2_Version 7.1.ppt
Hasanain_Application Layer_Chapter_2_Version 7.1.pptnadeemrana0257
 
2. application layer
2. application layer2. application layer
2. application layerTageleBerihun
 
Chapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7thChapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 

Similar to Ch2 application layer Network (20)

02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptx02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptx
 
Chapter2 l2 modified_um
Chapter2 l2 modified_umChapter2 l2 modified_um
Chapter2 l2 modified_um
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
applayerslides.ppt
applayerslides.pptapplayerslides.ppt
applayerslides.ppt
 
Chapter2_L2.ppt
Chapter2_L2.pptChapter2_L2.ppt
Chapter2_L2.ppt
 
applicationapplicationapplicationapplication.ppt
applicationapplicationapplicationapplication.pptapplicationapplicationapplicationapplication.ppt
applicationapplicationapplicationapplication.ppt
 
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptxCS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
CS3001_Computer_Networks_Chapter_2_v8.1(1).pptx
 
Lec 6(Application Layer)
Lec 6(Application Layer)Lec 6(Application Layer)
Lec 6(Application Layer)
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Chapter_2_v8.3.pptx
Chapter_2_v8.3.pptxChapter_2_v8.3.pptx
Chapter_2_v8.3.pptx
 
Chapter_2_v8.1.pptx
Chapter_2_v8.1.pptxChapter_2_v8.1.pptx
Chapter_2_v8.1.pptx
 
Computer network network edge and network
Computer network network edge and networkComputer network network edge and network
Computer network network edge and network
 
Appl layer
Appl layerAppl layer
Appl layer
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdf
 
Hasanain_Application Layer_Chapter_2_Version 7.1.ppt
Hasanain_Application Layer_Chapter_2_Version 7.1.pptHasanain_Application Layer_Chapter_2_Version 7.1.ppt
Hasanain_Application Layer_Chapter_2_Version 7.1.ppt
 
2. application layer
2. application layer2. application layer
2. application layer
 
Chapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7thChapter 2 - Computer Networking a top-down Approach 7th
Chapter 2 - Computer Networking a top-down Approach 7th
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
App layer
App layerApp layer
App layer
 

More from cairo university

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedcairo university
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devicescairo university
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitscairo university
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xcairo university
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitscairo university
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...cairo university
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuitscairo university
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuitscairo university
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuitscairo university
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency responsecairo university
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsxcairo university
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfetcairo university
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revisioncairo university
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01cairo university
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01cairo university
 

More from cairo university (20)

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extended
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devices
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuits
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified x
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuits
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuits
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuits
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuits
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency response
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsx
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfet
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revision
 
Fields Lec 2
Fields Lec 2Fields Lec 2
Fields Lec 2
 
Fields Lec 1
Fields Lec 1Fields Lec 1
Fields Lec 1
 
Fields Lec 5&6
Fields Lec 5&6Fields Lec 5&6
Fields Lec 5&6
 
Fields Lec 4
Fields Lec 4Fields Lec 4
Fields Lec 4
 
Fields Lec 3
Fields Lec 3Fields Lec 3
Fields Lec 3
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01
 

Recently uploaded

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoÃŖo Esperancinha
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Study on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube ExchangerAnamika Sarkar
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 

Recently uploaded (20)

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned īģŋTube Exchanger
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 

Ch2 application layer Network

  • 1. Application Layer 2-1 Chapter 2: outline 2.1 principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail ī‚§ SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP
  • 2. Application Layer 2-2 Chapter 2: application layer our goals: īļ conceptual, implementation aspects of network application protocols ī‚§ transport-layer service models ī‚§ client-server paradigm ī‚§ peer-to-peer paradigm īļ learn about protocols by examining popular application-level protocols ī‚§ HTTP ī‚§ FTP ī‚§ SMTP / POP3 / IMAP ī‚§ DNS īļ creating network applications ī‚§ socket API
  • 3. Application Layer 2-3 Some network apps īļ e-mail īļ web īļ text messaging īļ remote login īļ P2P file sharing īļ multi-user network games īļ streaming stored video (YouTube, Hulu, Netflix) īļ voice over IP (e.g., Skype) īļ real-time video conferencing īļ social networking īļ search īļ â€Ļ īļ â€Ļ
  • 4. Application Layer 2-4 Creating a network app write programs that: īļ run on (different) end systems īļ communicate over network īļ e.g., web server software communicates with browser software no need to write software for network-core devices īļ network-core devices do not run user applications īļ applications on end systems allows for rapid app development, propagation application transport network data link physical application transport network data link physical application transport network data link physical
  • 5. Application Layer 2-5 Application architectures possible structure of applications: īļ client-server īļ peer-to-peer (P2P)
  • 6. Application Layer 2-6 Client-server architecture server: īļ always-on host īļ permanent IP address īļ data centers for scaling clients: īļ communicate with server īļ may be intermittently connected īļ may have dynamic IP addresses īļ do not communicate directly with each other client/server
  • 7. Application Layer 2-7 P2P architecture īļ no always-on server īļ arbitrary end systems directly communicate īļ peers request service from other peers, provide service in return to other peers ī‚§ self scalability – new peers bring new service capacity, as well as new service demands īļ peers are intermittently connected and change IP addresses ī‚§ complex management peer-peer
  • 8. Application Layer 2-8 Processes communicating process: program running within a host īļ within same host, two processes communicate using inter-process communication (defined by OS) īļ processes in different hosts communicate by exchanging messages client process: process that initiates communication server process: process that waits to be contacted īļ aside: applications with P2P architectures have client processes & server processes clients, servers
  • 9. Application Layer 2-9 Sockets īļ process sends/receives messages to/from its socket īļ socket analogous to door ī‚§ sending process shoves message out door ī‚§ sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process Internet controlled by OS controlled by app developer transport application physical link network process transport application physical link network process socket
  • 10. Application Layer 2-10 Addressing processes īļ to receive messages, process must have identifier īļ host device has unique 32-bit IP address īļ Q: does IP address of host on which process runs suffice for identifying the process? īļ 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 īļ more shortlyâ€Ļ ī‚§ A: no, many processes can be running on same host
  • 11. Application Layer 2-11 What transport service does an app need? data integrity īļ some apps (e.g., file transfer, web transactions) require 100% reliable data transfer īļ other apps (e.g., audio) can tolerate some loss timing īļ some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” throughput īļ some apps (e.g., multimedia) require minimum amount of throughput to be “effective” īļ other apps (“elastic apps”) make use of whatever throughput they get security īļ encryption, data integrity, â€Ļ
  • 12. Application Layer 2-12 Transport service requirements: common apps application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games text messaging data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss throughput elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps 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
  • 13. Application Layer 2-13 Internet transport protocols services TCP service: īļ 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 guarantee, security īļ connection-oriented: setup required between client and server processes UDP service: īļ unreliable data transfer between sending and receiving process īļ does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, orconnection setup, Q: why bother? Why is there a UDP?
  • 14. Application Layer 2-14 Internet apps: application, transport protocols application e-mail remote terminal access Web file transfer streaming multimedia Internet telephony application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] HTTP (e.g., YouTube), RTP [RFC 1889] SIP, RTP, proprietary (e.g., Skype) underlying transport protocol TCP TCP TCP TCP TCP or UDP TCP or UDP
  • 15. Securing TCP TCP & UDP īļ no encryption īļ cleartext passwds sent into socket traverse Internet in cleartext SSL īļ provides encrypted TCP connection īļ data integrity īļ end-point authentication SSL is at app layer īļ Apps use SSL libraries, which “talk” to TCP SSL socket API īļ cleartext passwds sent into socket traverse Internet encrypted īļ See Chapter 7 Application Layer 2-15
  • 16. Application Layer 2-16 Chapter 2: outline 2.1 principles of network applications ī‚§ app architectures ī‚§ app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail ī‚§ SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP
  • 17. Application Layer 2-17 Web and HTTP First, a reviewâ€Ļ īļ web page consists of objects īļ object can be HTML file, JPEG image, Java applet, audio file,â€Ļ īļ web page consists of base HTML-file which includes several referenced objects īļ each object is addressable by a URL, e.g., www.someschool.edu/someDept/pic.gif host name path name
  • 18. Application Layer 2-18 HTTP overview HTTP: hypertext transfer protocol īļ Web’s application layer protocol īļ client/server model ī‚§ client: browser that requests, receives, (using HTTP protocol) and “displays” Web objects ī‚§ server: Web server sends (using HTTP protocol) objects in response to requests PC running Firefox browser server running Apache Web server iphone running Safari browser
  • 19. Application Layer 2-19 HTTP overview (continued) uses TCP: īļ client initiates TCP connection (creates socket) to server, port 80 īļ server accepts TCP connection from client īļ HTTP 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 protocols that maintain “state” are complex! īļ past history (state) must be maintained īļ if server/client crashes, their views of “state” may be inconsistent, must be reconciled aside
  • 20. Application Layer 2-20 HTTP connections non-persistent HTTP īļ at most one object sent over TCP connection ī‚§ connection then closed īļ downloading multiple objects required multiple connections persistent HTTP īļ multiple objects can be sent over single TCP connection between client, server
  • 21. Application Layer 2-21 Non-persistent HTTP suppose user enters URL: 1a. HTTP client initiates TCP connection to HTTP server (process) at www.someSchool.edu on port 80 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.inde x 1b. HTTP server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client 3. HTTP server receives request message, forms response message containing requested object, and sends message into its sockettime (contains text, references to 10 jpeg images) www.someSchool.edu/someDepartment/home.index
  • 22. Application Layer 2-22 Non-persistent HTTP (cont.) 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. HTTP server closes TCP connection. time
  • 23. Application Layer 2-23 Non-persistent HTTP: response time RTT (definition): time for a small packet to travel from client to server and back HTTP response time: īļ one RTT to initiate TCP connection īļ one RTT for HTTP request and first few bytes of HTTP response to return īļ file transmission time īļ non-persistent HTTP response time = 2RTT+ file transmission time time to transmit file initiate TCP connection RTT request file RTT file received time time
  • 24. Application Layer 2-24 Persistent HTTP non-persistent HTTP issues: īļ requires 2 RTTs per object īļ OS overhead for each TCP connection īļ browsers often open parallel TCP connections to fetch referenced objects persistent HTTP: īļ server leaves connection open after sending response īļ subsequent HTTP messages between same client/server sent over open connection īļ client sends requests as soon as it encounters a referenced object īļ as little as one RTT for all the referenced objects
  • 25. īļ With persistent connections, the server leaves the TCP connection open after īļ sending a response. Subsequent requests and responses between the same client and īļ server can be sent over the same connection. In particular, an entire Web page (in īļ the example above, the base HTML file and the 10 images) can be sent over a single īļ persistent TCP connection. Moreover, multiple Web pages residing on the same īļ server can be sent from the server to the same client over a single persistent TCP īļ connection. These requests for objects can be made back-to-back, without waiting īļ for replies to pending requests (pipelining). Typically, the HTTP server closes a connection īļ when it isn’t used for a certain time (a configurable timeout interval). When īļ the server receives the back-to-back requests, it sends the objects back-to- back. The īļ default mode of HTTP uses persistent connections with pipelining. Application Layer 2-25
  • 26. Application Layer 2-26 User-server state: cookies many Web sites use cookies four components: 1) cookie header line of HTTP response message 2) cookie header line in next HTTP request message 3) cookie file kept on user’s host, managed by user’s browser 4) back-end database example: īļ Susan always access Internet from PC īļ visits specific e- commerce site for first time īļ when initial HTTP requests arrives at site, site creates: ī‚§ unique ID ī‚§ entry in backend database for ID
  • 27. Application Layer 2-27 Cookies: keeping “state” (cont.) client server usual http response msg usual http response msg cookie file one week later: usual http request msg cookie: 1678 cookie- specific action access ebay 8734 usual http request msg Amazon server creates ID 1678 for user create entry usual http response set-cookie: 1678ebay 8734 amazon 1678 usual http request msg cookie: 1678 cookie- specific action access ebay 8734 amazon 1678 backend database
  • 28. Application Layer 2-28 Cookies (continued) what cookies can be used for: īļ authorization īļ shopping carts īļ recommendations īļ user session state (Web e-mail) cookies and privacy: īļ cookies permit sites to learn a lot about you īļ you may supply name and e-mail to sites aside how to keep “state”: īļ protocol endpoints: maintain state at sender/receiver over multiple transactions īļ cookies: http messages carry state
  • 29. Application Layer 2-29 Web caches (proxy server) īļ user sets browser: Web accesses via cache īļ browser sends all HTTP requests to cache ī‚§ object in cache: cache returns object ī‚§ else cache requests object from origin server, then returns object to client goal: satisfy client request without involving origin server client proxy server client origin server origin server
  • 30. Application Layer 2-30 More about Web caching īļ cache acts as both client and server ī‚§ server for original requesting client ī‚§ client to origin server īļ typically cache is installed by ISP (university, company, residential ISP) why Web caching? īļ reduce response time for client request īļ reduce traffic on an institution’s access link īļ Internet dense with caches: enables “poor” content providers to effectively deliver content (so too does P2P file sharing)
  • 31. Application Layer 2-31 Caching example: origin servers public Internet institutional network 1 Gbps LAN 1.54 Mbps access link assumptions: īļ avg object size: 100K bits īļ avg request rate from browsers to origin servers:15/sec īļ avg data rate to browsers: 1.50 Mbps īļ RTT from institutional router to any origin server: 2 sec īļ access link rate: 1.54 Mbps consequences: īļ LAN utilization: 15% īļ access link utilization = 99% īļ total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + usecs problem!
  • 32. Application Layer 2-32 assumptions: īļ avg object size: 100K bits īļ avg request rate from browsers to origin servers:15/sec īļ avg data rate to browsers: 1.50 Mbps īļ RTT from institutional router to any origin server: 2 sec īļ access link rate: 1.54 Mbps consequences: īļ LAN utilization: 15% īļ access link utilization = 99% īļ total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + usecs Caching example: fatter access link origin servers 1.54 Mbps access link 154 Mbps 154 Mbps msecs Cost: increased access link speed (not cheap!) 9.9% public Internet institutional network 1 Gbps LAN
  • 33. institutional network 1 Gbps LAN Application Layer 2-33 Caching example: install local cache origin servers 1.54 Mbps access link local web cache assumptions: īļ avg object size: 100K bits īļ avg request rate from browsers to origin servers:15/sec īļ avg data rate to browsers: 1.50 Mbps īļ RTT from institutional router to any origin server: 2 sec īļ access link rate: 1.54 Mbps consequences: īļ LAN utilization: 15% īļ access link utilization = 100% īļ total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + usecs ? ? How to compute link utilization, delay? Cost: web cache (cheap!) public Internet
  • 34. Application Layer 2-34 Caching example: install local cache Calculating access link utilization, delay with cache: īļ suppose cache hit rate is 0.4 ī‚§ 40% requests satisfied at cache, 60% requests satisfied at origin origin servers 1.54 Mbps access link īļ access link utilization: ī‚§ 60% of requests use access link īļ data rate to browsers over access link = 0.6*1.50 Mbps = .9 Mbps ī‚§ utilization = 0.9/1.54 = .58 īļ total delay ī‚§ = 0.6 * (delay from origin servers) +0.4 * (delay when satisfied at cache) ī‚§ = 0.6 (2.01) + 0.4 (~msecs) ī‚§ = ~ 1.2 secs ī‚§ less than with 154 Mbps link (and cheaper too!) public Internet institutional network 1 Gbps LAN local web cache
  • 35. Application Layer 2-35 Chapter 2: outline 2.1 principles of network applications ī‚§ app architectures ī‚§ app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail ī‚§ SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP
  • 36. Application Layer 2-36 DNS: domain name system Internet hosts: ī‚§ IP address (32 bit) - used for addressing datagrams ī‚§ “name”, e.g., www.yahoo.com - used by humans Q: how to map between IP address and name, and vice versa ? Domain Name System: īļ distributed database implemented in hierarchy of many name servers īļ application-layer protocol: hosts, name servers communicate to resolve names (address/name translation)
  • 37. Application Layer 2-37 DNS: services, structure why not centralize DNS? īļ single point of failure īļ traffic volume īļ distant centralized database īļ maintenance DNS services īļ hostname to IP address translation īļ host aliasing ī‚§ canonical, alias names īļ mail server aliasing īļ load distribution ī‚§ replicated Web servers: many IP addresses correspond to one name A: doesn’t scale!
  • 38. Application Layer 2-38 Root DNS Servers com DNS servers org DNS servers edu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers DNS: a distributed, hierarchical database client wants IP for www.amazon.com; 1st approx: īļ client queries root server to find com DNS server īļ client queries .com DNS server to get amazon.com DNS server īļ client queries amazon.com DNS server to get IP address for www.amazon.com â€Ļ â€Ļ
  • 39. Application Layer 2-39 DNS: root name servers īļ contacted by local name server that can not resolve name īļ root name server: ī‚§ contacts authoritative name server if name mapping not known ī‚§ gets mapping ī‚§ returns mapping to local name server 13 root name “servers” worldwide a. Verisign, Los Angeles CA (5 other sites) b. USC-ISI Marina del Rey, CA l. ICANN Los Angeles, CA (41 other sites) e. NASA Mt View, CA f. Internet Software C. Palo Alto, CA (and 48 other sites) i. Netnod, Stockholm (37 other sites) k. RIPE London (17 other sites) m. WIDE Tokyo (5 other sites) c. Cogent, Herndon, VA (5 other sites) d. U Maryland College Park, MD h. ARL Aberdeen, MD j. Verisign, Dulles VA (69 other sites ) g. US DoD Columbus, OH (5 other sites)
  • 40. Application Layer 2-40 TLD, authoritative servers top-level domain (TLD) servers: ī‚§ responsible for com, org, net, edu, aero, jobs, museums, and all top-level country domains, e.g.: uk, fr, ca, jp ī‚§ Network Solutions maintains servers for .com TLD ī‚§ Educause for .edu TLD authoritative DNS servers: ī‚§ organization’s own DNS server(s), providing authoritative hostname to IP mappings for organization’s named hosts ī‚§ can be maintained by organization or service provider
  • 41. Application Layer 2-41 Local DNS name server īļ does not strictly belong to hierarchy īļ each ISP (residential ISP, company, university) has one ī‚§ also called “default name server” īļ when host makes DNS query, query is sent to its local DNS server ī‚§ has local cache of recent name-to-address translation pairs (but may be out of date!) ī‚§ acts as proxy, forwards query into hierarchy
  • 42. Application Layer 2-42 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server DNS name resolution example īļ host at cis.poly.edu wants IP address for gaia.cs.umass.edu iterated query: īļ contacted server replies with name of server to contact īļ “I don’t know this name, but ask this server”
  • 43. Application Layer 2-43 45 6 3 recursive query: īļ puts burden of name resolution on contacted name server īļ heavy load at upper levels of hierarchy? requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 7 authoritative DNS server dns.cs.umass.edu 8 DNS name resolution example TLD DNS server
  • 44. Application Layer 2-44 DNS: caching, updating records īļ once (any) name server learns mapping, it caches mapping ī‚§ cache entries timeout (disappear) after some time (TTL) ī‚§ TLD servers typically cached in local name servers â€ĸ thus root name servers not often visited īļ cached entries may be out-of-date (best effort name-to-address translation!) ī‚§ if name host changes IP address, may not be known Internet-wide until all TTLs expire īļ update/notify mechanisms proposed IETF standard ī‚§ RFC 2136