Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Computer and

Communication Networks
EE-357
By Dr Mir Yasir Umair
Associate Professor, MCS, NUST
Application Layer
Lecture 02
Chapter 2: application layer
our goals: • learn about
• conceptual, protocols by
implementation examining popular
aspects of network application-level
application
protocols protocols
o HTTP
o transport-layer
o FTP
service models
o SMTP / POP3 / IMAP
o client-server
o DNS
paradigm
o peer-to-peer • creating network
paradigm applications
o socket API

Application Layer
Some network apps
• e-mail • voice over IP (e.g.,
• web Skype)
• text messaging • real-time video
• remote login conferencing
• P2P file sharing • social networking
• multi-user network • search
games • …
• streaming stored • …
video (YouTube, Hulu,
Netflix)

Application Layer
Creating a network app application
transport
network
data link
write programs that: physical

• run on (different) end


systems
• communicate over
network
• e.g., web server software
communicates with
browser software
no need to write software for
application
transport

network-core devices network


data link application

• network-core devices do
physical transport
network

not run user applications


data link
physical

• applications on end
systems allows for rapid
app development,
propagation

Application Layer
Application architectures
possible structure of applications:
• client-server
• peer-to-peer (P2P)

Application Layer
Client-server architecture
server:
• always-on host
• permanent IP address
• data centers for scaling
clients:
• communicate with server
• may be intermittently
client/server connected
• may have dynamic IP
addresses
• do not communicate
directly with each other

Application Layer
P2P architecture
• no always-on server peer-peer
• arbitrary end systems
directly communicate
• peers request service
from other peers,
provide service in
return to other peers
o self scalability – new peers
bring new service capacity, as
well as new service demands

• peers are intermittently


connected and
change IP addresses
o complex management
Application Layer
Processes communicating
process: program clients, servers
running within a client process: process
host that initiates
communication
• within same host, two server process: process
processes that waits to be
communicate using contacted
inter-process
communication
(defined by OS) ❖ aside: applications with P2P
architectures have client
• processes in different
hosts communicate by processes & server
exchanging messages processes

Application Layer
Sockets
• process sends/receives messages to/from its socket
• socket analogous to door
o sending process shoves message out door
o sending process relies on transport infrastructure on other side of door to
deliver message to socket at receiving process

application application
socket controlled by
process process app developer

transport transport
network network controlled
link by OS
link Internet
physical physical

Application Layer
Addressing processes
• to receive messages, • identifier includes both
process must have IP address and port
identifier numbers associated
• host device has unique with process on host.
32-bit IP address • example port numbers:
• Q: does IP address of o HTTP server: 80
host on which process o mail server: 25
runs suffice for • to send HTTP message
identifying the to gaia.cs.umass.edu
process? web server:
▪ A: no, many processes o IP address: 128.119.245.12
can be running on same o port number: 80
host • more shortly…
Application Layer
App-layer protocol defines
• types of messages open protocols:
exchanged,
o e.g., request, • defined in RFCs Request For Comments - Org that
defines Protocols..
response • allows for
• message syntax:
interoperability
o what fields in
messages & how fields • e.g., HTTP, SMTP
are delineated
proprietary protocols:
• message semantics
o meaning of • e.g., Skype
information in fields
• rules for when and how
processes send &
respond to messages

Application Layer
What transport service does an app need?
data integrity throughput
• some apps (e.g., file ❖ some apps (e.g.,
transfer, web multimedia) require
transactions) require minimum amount of
100% reliable data throughput to be
transfer “effective”
• other apps (e.g., audio) ❖ other apps (“elastic apps”)
can tolerate some loss make use of whatever
timing throughput they get
• some apps (e.g.,
Internet telephony, security
interactive games)
❖ encryption, data integrity,
require low delay to
be “effective” …

Application Layer
Transport service requirements: common apps

application data loss throughput time sensitive

file transfer no loss elastic no


e-mail no loss elastic no
Web documents no loss elastic no
real-time audio/video loss-tolerant audio: 5kbps-1Mbps yes, 100’s
video:10kbps-5Mbps msec
stored audio/video loss-tolerant same as above
interactive games loss-tolerant few kbps up yes, few secs
text messaging no loss elastic yes, 100’s
msec
yes and no

Application Layer
Internet transport protocols services
TCP service: UDP service:
• reliable transport • unreliable data
between sending and
receiving process transfer between
• flow control: sender sending and receiving
won’t overwhelm process
receiver
• congestion control: • does not provide:
throttle sender when reliability, flow control,
network overloaded congestion control,
• does not provide: timing,
minimum throughput timing, throughput
guarantee, security guarantee, security,
• connection-oriented: orconnection setup,
setup required between
client and server
processes Q: why bother? Why is
there a UDP?

Application Layer
Internet apps: application, transport protocols
application underlying
application layer protocol transport protocol

e-mail SMTP [RFC 2821] TCP


remote terminal access Telnet [RFC 854] TCP
Web HTTP [RFC 2616] TCP
file transfer FTP [RFC 959] TCP
streaming multimedia HTTP (e.g., YouTube), TCP or UDP
RTP [RFC 1889]
Internet telephony SIP, RTP, proprietary
(e.g., Skype) TCP or UDP

Application Layer

You might also like