Professional Documents
Culture Documents
Lec 2 - Application Layer - I
Lec 2 - Application Layer - I
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
• network-core devices do
physical transport
network
• 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
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 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
Application Layer