You are on page 1of 16

Chapter 2

Application Layer
Overview
▪ Principle of network applications
▪ Web and HTTP
▪ E-mail, SMTP, IMAP
▪ The Domain Name System (DNS)
▪ P2P Applications
▪ Video Streaming and content distribution networks
▪ Socket programming with UDP and TCP
Chapter Goal
- Conceptual and implementation aspects of application-layer protocol
- Learn about protocols by examining
popular application-layer protocol and infrastructure

3
Chapter 2
Application Layer
Computer Networks
and the Internet Some Network Apps
Application Layer
• Principles of
network
o Social networking o Voice over IP (e.g.: Skype)
applications
• Web and HTTP
• E-mail, SMTP,
o Web o Real-time video
IMAP
• The Domain
Name System
o Text messaging conferencing (e.g.: Zoom)
DNS
• P2P applications
• video streaming
o E-mail o Internet search
and content
distribution
networks
o Multi-user network games o Remote login
Streaming stored video
• socket
programming
with UDP and TCP
o
Transport Layer (YouTube, Netflix)
Data Plane &
Control Plane: The
Network Layer
o P2P file sharing
Question: Your Favorites?
The Link Layer and
LANs

Wireless and Mobile


Networks

4
Chapter 2
Application Layer mobile network
Computer Networks
and the Internet Creating Network App national or global ISP
Application Layer
• Principles of
network
Write program that:
applications
• Web and HTTP
• E-mail, SMTP,
o Run on (different) end systems
IMAP
• The Domain
Name System
o Communicate over network
o E.g.: Web server software
DNS
• P2P applications local or
• video streaming regional ISP
and content
distribution communicate with browser software
networks
• socket home network content
programming
with UDP and TCP provider
network datacenter
Transport Layer network
Data Plane &
Control Plane: The
Network Layer

The Link Layer and


LANs
enterprise
Wireless and Mobile network
Networks

5
Chapter 2
Application Layer mobile
application
transport
network
network
Computer Networks
and the Internet Creating Network App data link
physical
national or global ISP
Application Layer
• Principles of
network
applications
• Web and HTTP
• E-mail, SMTP,
IMAP
• The Domain
Name System
DNS
• P2P applications local or
• video streaming regional ISP
and content
distribution
networks

No need to write software for network-


• socket home network
programming content
with UDP and TCP application provider
core devices:
transport
Transport Layer network network datacenter
application
data link network
transport
Data Plane &
Control Plane: The
Network Layer
o Network-core devices do not run user physical network
data link

The Link Layer and applications physical

LANs

Wireless and Mobile o Application on end systems allows for enterprise


network
Networks
rapid app development, propagation

6
Chapter 2
Application Layer
Computer Networks
and the Internet Client-Server Paradigm mobile network

CLIENTnational or global ISP


Application Layer
• Principles of
network
Server:
applications
• Web and HTTP
• E-mail, SMTP,
o Always-on host
IMAP
• The Domain
Name System
o Permanent IP address
o Often in data centers, for scaling
DNS
• P2P applications
• video streaming local or
and content regional ISP
distribution
networks
• socket
programming home network content
with UDP and TCP
provider
Transport Layer network datacenter
network
Data Plane &
Control Plane: The
Network Layer

The Link Layer and


LANs

Wireless and Mobile enterprise SERVER


Networks network

7
Chapter 2
Application Layer
Computer Networks
and the Internet Client-Server Paradigm mobile network
national or global ISP
Application Layer
• Principles of
network
applications
• Web and HTTP
• E-mail, SMTP,
IMAP
• The Domain
Name System
DNS
• P2P applications
• video streaming local or
Clients:
and content regional ISP
distribution
networks

o Contact, communicate with server


• socket
programming home network content
with UDP and TCP
provider
Transport Layer o May be intermittently connected network datacenter
network
Data Plane &
Control Plane: The
Network Layer
o May have dynamic IP addresses
The Link Layer and
LANs
o Do not communicate directly with
Wireless and Mobile
Networks
each other enterprise
network
o Examples: HTTP, IMAP, FTP

8
Chapter 2
Application Layer
Computer Networks
and the Internet Peer-Peer Architecture mobile network
national or global ISP
Application Layer
• Principles of o No always-on server
network
applications
• Web and HTTP
o Arbitrary end systems directly communicate
• E-mail, SMTP,
IMAP o Peers request service from other peers,
• The Domain
Name System provide service in return to other peers
DNS
• P2P applications
• video streaming
o Self scalability – new peers bring new local or
and content
distribution service capacity, as well as new service regional ISP
networks
• socket demands
programming home network content
with UDP and TCP o Peers are intermittently connected and change provider
Transport Layer
IP addresses network datacenter
network
Data Plane &
Control Plane: The
Network Layer
o Complex management
The Link Layer and o Example: P2P file sharing
LANs

Wireless and Mobile


enterprise
Networks network

9
Chapter 2
Application Layer
Computer Networks
and the Internet Processes Communicating
Application Layer
• Principles of Process: program running within a host clients, servers
client process:
network
applications
• Web and HTTP
• E-mail, SMTP,
o Within same host, two processes
IMAP
• The Domain communicate using inter-process process that initiates
communication
Name System
DNS
• P2P applications
communication (defined by OS)
• video streaming
and content
distribution
o Processes in different hosts server process:
networks
• socket
programming
communicate by exchanging messages process that waits to be
with UDP and TCP

Transport Layer
o Note: applications with P2P contacted
Data Plane & architectures have client processes &
Control Plane: The
Network Layer server processes
The Link Layer and
LANs

Wireless and Mobile


Networks

10
Chapter 2
Application Layer
Computer Networks
and the Internet Sockets
Application Layer
• Principles of o Process sends/receives messages to/from its socket
network
applications
• Web and HTTP
o Socket analogous to door
• E-mail, SMTP,
IMAP o Sending process shoves message out door
• The Domain
Name System
DNS
o Sending process relies on transport infrastructure on other side of door to deliver
• P2P applications
• video streaming
message to socket at receiving process
and content
distribution o Two sockets involved: one on each side
networks
• socket
programming
with UDP and TCP application application
Transport Layer
socket controlled by
process process app developer
Data Plane &
Control Plane: The
Network Layer transport transport
The Link Layer and network network controlled
LANs
link by OS
Wireless and Mobile
link Internet
Networks physical physical

11
Chapter 2
Application Layer
Computer Networks
and the Internet Addressing Processes
Application Layer
• Principles of o To receive messages, process o Identifier includes both IP address
network
applications must have identifier and port numbers associated
with process on host.
• Web and HTTP
• E-mail, SMTP,
IMAP
• The Domain o Host device has unique 32-
Name System
DNS bit IP address o Example port numbers:
• P2P applications
• video streaming o HTTP server: 80
and content
distribution
o Question: o mail server: 25
networks
• socket
programming Does IP address of host on o To send HTTP message to
which process runs suffice for
with UDP and TCP

Transport Layer gaia.cs.umass.edu web server:


identifying the process?
Data Plane &
o IP address: 128.119.245.12
Control Plane: The
Network Layer ▪ Answer:
o port number: 80
The Link Layer and
LANs
No, many processes can
Wireless and Mobile be running on same host o More shortly…
Networks

12
Chapter 2
Application Layer
Computer Networks
and the Internet An Application-Layer Protocol Defines:
Application Layer
• Principles of o Types of messages Open protocols:
network
applications
• Web and HTTP
exchanged, o Defined in RFCs, everyone has
• E-mail, SMTP,
IMAP
• The Domain
o e.g., request, response access to protocol definition
o Message syntax:
Name System
DNS
• P2P applications
o Allows for interoperability
• video streaming
o What fields in messages & how
and content
distribution
fields are delineated
o e.g., HTTP, SMTP
networks
• socket
programming
with UDP and TCP o Message semantics Proprietary protocols:
Transport Layer
o Meaning of information in fields o e.g., Skype, Zoom
Data Plane &
Control Plane: The
Network Layer o Rules for when and how
The Link Layer and
LANs
processes send & respond to
Wireless and Mobile
messages
Networks

13
Chapter 2
Application Layer
Computer Networks
and the Internet What Transport Service Does An App Need?
Application Layer
• Principles of Data integrity Throughput
network
applications
• Web and HTTP o Some apps (e.g., file transfer, o Some apps (e.g., multimedia)
• E-mail, SMTP,
IMAP
• The Domain web transactions) require require minimum amount of
Name System
DNS 100% reliable data transfer throughput to be “effective”
• P2P applications
• video streaming
and content o Other apps (e.g., audio) can o Other apps (“elastic apps”) make
use of whatever throughput they
distribution
networks
• socket tolerate some loss
programming
get
Timing
with UDP and TCP

Transport Layer
Security
Data Plane &
Control Plane: The
o Some apps (e.g., Internet
Network Layer
telephony, interactive games) o Encryption, data integrity, …
The Link Layer and
LANs require low delay to be
Wireless and Mobile
Networks “effective”

14
Chapter 2
Application Layer
Computer Networks
and the Internet Transport Service Requirements: Common Apps
Application Layer
• Principles of
network
applications
• Web and HTTP Application Data loss Throughput Time sensitive?
• E-mail, SMTP,
IMAP
• The Domain
Name System file transfer/download no loss elastic no
DNS
• P2P applications
• video streaming
e-mail no loss elastic no
and content
distribution Web documents no loss elastic no
networks
• socket
programming
real-time audio/video loss-tolerant audio: 5Kbps-1Mbps yes, 10’s msec
with UDP and TCP
video:10Kbps-5Mbps
Transport Layer

Data Plane &


streaming audio/video loss-tolerant same as above yes, few secs
Control Plane: The
Network Layer interactive games loss-tolerant Kbps+ yes, 10’s msec
The Link Layer and
LANs
text messaging no loss elastic yes and no
Wireless and Mobile
Networks

15
Chapter 2
Application Layer
Computer Networks
and the Internet Internet transport protocols services
Application Layer
• Principles of TCP service: UDP service:
network
applications
• Web and HTTP o Reliable transport between sending o Unreliable data transfer between
• E-mail, SMTP,
IMAP and receiving process sending and receiving process
• The Domain
Name System
DNS o Flow control: sender won’t o Does not provide: reliability, flow
• P2P applications
• video streaming overwhelm receiver control, congestion control, timing,
and content throughput guarantee, security, or
distribution
networks o Congestion control: throttle sender connection setup.
• socket
programming when network overloaded
with UDP and TCP
o Connection-oriented: setup
Transport Layer

Data Plane & required between client and server Question:


Control Plane: The
processes
Network Layer
Why bother?
The Link Layer and
LANs o Does not provide: timing, minimum
Wireless and Mobile
Networks
throughput guarantee, security Why is there a UDP?

16
Chapter 2
Application Layer
Computer Networks
and the Internet Internet Applications, and Transport Protocols
Application Layer
• Principles of
network
Application
applications
• Web and HTTP Application layer protocol Transport protocol
• E-mail, SMTP,
IMAP
• The Domain
Name System
DNS
• P2P applications
file transfer/download FTP [RFC 959] TCP
• video streaming
and content
distribution
e-mail SMTP [RFC 5321] TCP
networks
• socket
programming
Web documents HTTP 1.1 [RFC 7320] TCP
with UDP and TCP
Internet telephony SIP [RFC 3261], RTP [RFC TCP or UDP
Transport Layer

Data Plane &


Control Plane: The
3550], or proprietary HTTP
Network Layer
streaming audio/video [RFC 7320], DASH TCP
The Link Layer and
LANs
interactive games WOW, FPS (proprietary) UDP or TCP
Wireless and Mobile
Networks

17
Chapter 2
Application Layer
Computer Networks
and the Internet Securing TCP
Application Layer
• Principles of
network
Vanilla TCP & UDP sockets: TSL implemented in
applications
• Web and HTTP
• E-mail, SMTP,
o No encryption application layer
IMAP
• The Domain o Cleartext passwords sent into socket o Apps use TSL libraries,
Name System
DNS
• P2P applications
traverse Internet in cleartext (!) that use TCP in turn
• video streaming
and content
distribution Transport Layer Security (TLS) o Cleartext sent into
“socket” traverse
networks
• socket
programming o Provides encrypted TCP connections
with UDP and TCP
o Data integrity Internet encrypted
Transport Layer
o More: Chapter 8 ??
Data Plane &
Control Plane: The o End-point authentication
Network Layer

The Link Layer and


LANs

Wireless and Mobile


Networks

18

You might also like