Application Layer I Flashcards
To give an overview of: • The Internet and its components and services • Protocols and protocol layers To understand: • The main principles of network applications • Application architectures • Process communication • Transport services
Internet: components view
▪ billions of connected
computing devices:
* hosts = end systems
* running network apps
▪ communication links
* fibre, copper, radio,
satellite
* transmission rate:
bandwidth
▪ packet switches: forward
packets (chunks of data)
* routers and switches
▪ Internet: “network of
networks”
* Interconnected ISPs
▪ protocols control sending,
receiving of messages
* e.g., TCP, IP, HTTP, SMTP,
802.11
▪ Internet standards
* RFC: Request for comments
* IETF: Internet Engineering Task
Force
Internet: service view
▪infrastructure that provides
services to applications:
* Web, VoIP, email, games, e-
commerce, social nets, …
▪ provides programming
interface to apps
* hooks that allow sending
and receiving app programs
to “connect” to Internet
* provides service options,
analogous to postal service
What is a protocol?
specific messages sent
… specific actions taken
when messages
received, or other
events
protocols def
protocols define format,
order of messages sent and
received among network
entities, and actions taken
on message transmission,
receipt
network protocols
▪ machines rather than
humans
▪ all communication activity
in Internet governed by
protocols
Protocol layers
▪ hosts
▪ routers
▪ links of various
media
▪ applications
▪ protocols
▪ hardware,
software
layers
each layer implements a service
▪ via its own internal-layer actions
▪ relying on services provided by layer below
Protocol stack
*internet protocol stack
*ISO/OSI reference model
Internet protocol stack
- application: supporting network
applications (FTP, SMTP, HTTP) - transport: process-process data
transfer (TCP, UDP) - network: routing of datagrams from
source to destination (IP, routing
protocols) - link: data transfer between
neighbouring network elements
(Ethernet, 802.11 (WiFi), PPP) - physical: bits “on the wire
ISO/OSI reference model
- presentation: allow
applications to interpret
meaning of data, e.g.,
encryption, compression, - session: synchronisation,
checkpointing, recovery
of data exchange
Some network apps
- web
- P2P file sharing
- text messaging
- voice over IP
- video conferencing
- multi-player network games
- streaming stored video
- social networking
- search
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
developmen
Application architectures
▪ Main structures of applications:
* Client-server
* Peer-to-peer (P2P)
Client-server architecture
server:
* always-on host
* permanent IP address
* data centres for scaling
▪ clients:
* communicate with server
* may be intermittently
connected
* may have dynamic IP addresses
* do not communicate directly
with each other
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
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
clients, servers
client process: process
that initiates
communication
server process: process
that waits to be contacted
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
Addressing processes
- to receive messages, process
must have identifier - host device has unique 32-
bit IP address - identifier includes both IP
address and port numbers
associated with process on
host.
App-layer protocol defines
*types of messages
exchanged,
* e.g., request, response
* message syntax:
* what fields in messages
& how fields are defined
* message semantics
* meaning of information
in fields
* rules for when and how
processes send & respond to
messages
open protocols:
* defined in RFCs
* allows for interoperability
* e.g., HTTP, SMTP
* proprietary protocols:
.e.g., Skype
What transport service does an
app need?
data integrity
timing
throughput
security
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,
Internet transport protocols
services
TCP service
UDP service
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, or
connection setup,
Securing TCP
TCP & UDP
TLS / SSL
SSL is at app layer
SSL socket API
TCP & UDP
- no encryption
- cleartext passwords sent
into socket traverse
Internet in cleartext
TLS / SSL
- provides encrypted TCP
connection - data integrity
- end-point authentication
SSL is at app layer
- apps use SSL libraries, that
“talk” to TCP
SSL socket API
- cleartext passwords sent
into socket traverse
Internet encrypted