Application Layer: A Note On The Use of These PPT Slides
Application Layer: A Note On The Use of These PPT Slides
Application Layer
2: Application Layer 2
Chapter 2: Application Layer
Our goals: learn about protocols
conceptual, by examining popular
implementation application-level
aspects of network protocols
application protocols HTTP
transport-layer FTP
service models SMTP / POP3 / IMAP
client-server
DNS
programming network
paradigm
peer-to-peer applications
paradigm socket API
2: Application Layer 3
Some network apps
e-mail voice over IP
web real-time video
instant messaging conferencing
remote login grid computing
2: Application Layer 4
Creating a network app application
transport
network
data link
2: Application Layer 6
Application architectures
Client-server
Peer-to-peer (P2P)
Hybrid of client-server and P2P
2: Application Layer 7
Client-server architecture
server:
always-on host
permanent IP address
server farms for scaling
clients:
communicate with server
may be intermittently
client/server connected
may have dynamic IP
addresses
do not communicate directly
with each other
2: Application Layer 8
Pure P2P architecture
no always-on server
arbitrary end systems
directly communicate peer-peer
peers are intermittently
connected and change IP
addresses
2: Application Layer 9
Hybrid of client-server and P2P
Skype
voice-over-IP P2P application
centralized server: finding address of remote
party:
client-client connection: direct (not through
server)
Instant messaging
chatting between two users is P2P
centralized service: client presence
detection/location
• user registers its IP address with central
server when it comes online
• user contacts central server to find IP
addresses of buddies
2: Application Layer 10
Processes communicating
Process: program running Client process: process
within a host. that initiates
within same host, two communication
processes communicate Server process: process
using inter-process that waits to be
communication (defined contacted
by OS).
processes in different Note: applications with
hosts communicate by P2P architectures have
exchanging messages client processes &
server processes
2: Application Layer 11
Sockets
host or host or
process sends/receives server server
messages to/from its
socket controlled by
app developer
socket analogous to door process process
socket
sending process shoves socket
message out door TCP with TCP with
buffers, Internet buffers,
sending process relies on variables variables
transport infrastructure
on other side of door which
controlled
brings message to socket by OS
at receiving process
API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this
later)
2: Application Layer 12
Addressing processes
to receive messages,
process must have
identifier
host device has unique
32-bit IP address
Q: does IP address of
host suffice for
identifying the process?
2: Application Layer 13
Addressing processes
to receive messages, identifier includes both
process must have IP address and port
identifier numbers associated with
host device has unique process on host.
32-bit IP address Example port numbers:
Q: does IP address of HTTP server: 80
host on which process Mail server: 25
runs suffice for to send HTTP message
identifying the process? to gaia.cs.umass.edu web
A: No, many server:
processes can be IP address: 128.119.245.12
running on same host Port number: 80
more shortly…
2: Application Layer 14
App-layer protocol defines
Types of messages Public-domain protocols:
exchanged, defined in RFCs
e.g., request, response allows for
Message syntax: interoperability
what fields in messages &
e.g., HTTP, SMTP
how fields are delineated
Message semantics Proprietary protocols:
e.g., Skype
meaning of information in
fields
Rules for when and how
processes send &
respond to messages
2: Application Layer 15
What transport service does an app need?
Data loss Throughput
some apps (e.g., audio) can some apps (e.g., multimedia)
tolerate some loss require minimum amount of
other apps (e.g., file throughput to be “effective”
transfer, telnet) require other apps (“elastic apps”)
100% reliable data make use of whatever
transfer throughput they get
Timing Security
some apps (e.g., Encryption, data integrity, …
Internet telephony,
interactive games)
require low delay to be
“effective”
2: Application Layer 16
Transport service requirements of common apps
2: Application Layer 17
Internet transport protocols services
Application Underlying
Application layer protocol transport protocol
2: Application Layer 19
Chapter 2: Application layer
2.1 Principles of 2.6 P2P applications
network applications 2.7 Socket programming
app architectures with TCP
app requirements 2.8 Socket programming
2.2 Web and HTTP
with UDP
2.4 Electronic Mail
SMTP, POP3, IMAP
2.5 DNS
2: Application Layer 20
Web and HTTP
First some jargon
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
Example URL:
www.someschool.edu/someDept/pic.gif
2: Application Layer 21
HTTP overview
HTTP: hypertext
transfer protocol HT
TP
r
equ
Web’s application layer PC running HT est
TP
protocol Explorer res
pon
se
client/server model
client: browser that
e st
u
requests, receives, P r eq se Server
T o n
“displays” Web objects HT r es
p running
T P Apache Web
server: Web server HT
server
sends objects in
response to requests
Mac running
Navigator
2: Application Layer 22
HTTP overview (continued)
Uses TCP: HTTP is “stateless”
client initiates TCP server maintains no
connection (creates socket) information about
to server, port 80 past client requests
server accepts TCP
connection from client aside
Protocols that maintain
HTTP messages (application- “state” are complex!
layer protocol messages) past history (state) must
exchanged between browser be maintained
(HTTP client) and Web if server/client crashes,
server (HTTP server)
their views of “state” may
TCP connection closed
be inconsistent, must be
reconciled
2: Application Layer 23
HTTP connections
Nonpersistent HTTP Persistent HTTP
At most one object is Multiple objects can
sent over a TCP be sent over single
connection. TCP connection
between client and
server.
2: Application Layer 24
Nonpersistent HTTP
(contains text,
Suppose user enters URL www.someSchool.edu/someDepartment/home.index
references to 10
jpeg images)
time
2: Application Layer 25
Nonpersistent HTTP (cont.)
2: Application Layer 26
Non-Persistent HTTP: Response time
Definition of RTT: time for a
small packet to travel
from client to server and
back. initiate TCP
connection
Response time:
RTT
one RTT to initiate TCP
request
connection file
time to
one RTT for HTTP request RTT
transmit
and first few bytes of file
file
HTTP response to return received
file transmission time
time time
total = 2RTT+transmit time
2: Application Layer 27
Persistent HTTP
2: Application Layer 28
HTTP request message
two types of HTTP messages: request, response
HTTP request message:
ASCII (human-readable format)
request line
(GET, POST, GET /somedir/page.html HTTP/1.1
HEAD commands) Host: www.someschool.edu
User-agent: Mozilla/4.0
header Connection: close
lines Accept-language:fr
Carriage return,
line feed (extra carriage return, line feed)
indicates end
of message
2: Application Layer 29
HTTP request message: general format
2: Application Layer 30
Uploading form input
Post method:
Web page often
includes form input URL method:
Input is uploaded to Uses GET method
server in entity body Input is uploaded in
URL field of request
line:
www.somesite.com/animalsearch?monkeys&banana
2: Application Layer 31
Method types
HTTP/1.0 HTTP/1.1
GET GET, POST, HEAD
POST PUT
HEAD uploads file in entity
body to path specified
asks server to leave
in URL field
requested object out of
response DELETE
deletes file specified in
the URL field
2: Application Layer 32
HTTP response message
status line
(protocol
status code HTTP/1.1 200 OK
status phrase) Connection close
Date: Thu, 06 Aug 1998 12:00:15 GMT
header Server: Apache/1.3.0 (Unix)
lines Last-Modified: Mon, 22 Jun 1998 …...
Content-Length: 6821
Content-Type: text/html
2: Application Layer 33
HTTP response status codes
In first line in server->client response message.
A few sample codes:
200 OK
request succeeded, requested object later in this message
301 Moved Permanently
requested object moved, new location specified later in
this message (Location:)
400 Bad Request
request message not understood by server
404 Not Found
requested document not found on this server
505 HTTP Version Not Supported
2: Application Layer 34
Trying out HTTP (client side) for yourself
2: Application Layer 35
User-server state: cookies
Example:
Many major Web sites
Susan always access
use cookies
Internet always from PC
Four components:
visits specific e-
1) cookie header line of
HTTP response message commerce site for first
2) cookie header line in time
HTTP request message when initial HTTP
3) cookie file kept on
user’s host, managed by requests arrives at site,
user’s browser site creates:
4) back-end database at unique ID
Web site
entry in backend
database for ID
2: Application Layer 36
Cookies: keeping “state” (cont.)
client server
ebay 8734
usual http request msg
Amazon server
cookie file usual http response creates ID
Set-cookie: 1678 1678 for user create
ebay 8734 entry
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
one week later: usual http response msg action backend
database
access
ebay 8734 usual http request msg
amazon 1678 cookie: 1678 cookie-
spectific
usual http response msg action
2: Application Layer 37
Cookies (continued)
aside
What cookies can bring: Cookies and privacy:
authorization cookies permit sites to
shopping carts learn a lot about you
you may supply name
recommendations
and e-mail to sites
user session state
(Web e-mail)
How to keep “state”:
protocol endpoints: maintain state
at sender/receiver over multiple
transactions
cookies: http messages carry state
2: Application Layer 38
Web caches (proxy server)
Goal: satisfy client request without involving origin server
client
origin
server
2: Application Layer 39
More about Web caching
cache acts as both Why Web caching?
client and server reduce response time
typically cache is for client request
installed by ISP reduce traffic on an
(university, company, institution’s access link.
residential ISP) Internet dense with
caches: enables “poor”
content providers to
effectively deliver
content (but so does
P2P file sharing)
2: Application Layer 40
Caching example
origin
Assumptions servers
average object size = 100,000
bits public
Internet
avg. request rate from
institution’s browsers to origin
servers = 15/sec
delay from institutional router to 1.5 Mbps
any origin server and back to access link
router = 2 sec
institutional
Consequences network
10 Mbps LAN
utilization on LAN = 15%
utilization on access link = 100%
total delay = Internet delay + access
delay + LAN delay institutional
= 2 sec + minutes + milliseconds cache
2: Application Layer 41
Caching example (cont)
origin
possible solution servers
increase bandwidth of access
public
link to, say, 10 Mbps Internet
consequence
utilization on LAN = 15%
utilization on access link = 15% 10 Mbps
Total delay = Internet delay + access link
access delay + LAN delay institutional
= 2 sec + msecs + msecs network
10 Mbps LAN
often a costly upgrade
institutional
cache
2: Application Layer 42
Caching example (cont)
origin
possible solution: install servers
cache public
suppose hit rate is 0.4 Internet
consequence
40% requests will be
satisfied almost immediately
60% requests satisfied by 1.5 Mbps
access link
origin server
utilization of access link institutional
reduced to 60%, resulting in network
10 Mbps LAN
negligible delays (say 10
msec)
total avg delay = Internet
delay + access delay + LAN institutional
delay = .6*(2.01) secs + . cache
4*milliseconds < 1.4 secs
2: Application Layer 43
Conditional GET
2: Application Layer 45
FTP: the file transfer protocol
2: Application Layer 46
FTP: separate control, data connections
TCP control connection
FTP client contacts FTP server port 21
at port 21, TCP is transport
protocol TCP data connection
client authorized over control FTP port 20 FTP
connection client server
client browses remote server opens another TCP
directory by sending commands
data connection to transfer
over control connection.
another file.
when server receives file control connection: “out of
transfer command, server
band”
opens 2 TCP connection (for
nd
FTP server maintains “state”:
file) to client
current directory, earlier
after transferring one file,
authentication
server closes data connection.
2: Application Layer 47
FTP commands, responses
2: Application Layer 48
Chapter 2: Application layer
2.1 Principles of 2.6 P2P applications
network applications 2.7 Socket programming
2.2 Web and HTTP with TCP
2.3 FTP 2.8 Socket programming
2.4 Electronic Mail with UDP
SMTP, POP3, IMAP
2.5 DNS
2: Application Layer 49
Electronic Mail outgoing
message queue
user mailbox
user
Three major components: agent
user agents mail
user
mail servers server
agent
simple mail transfer protocol:
SMTP mail
SMTP
server user
2: Application Layer 50
Electronic Mail: mail servers
user
Mail Servers agent
mailbox contains incoming
mail
user
messages for user server
agent
message queue of outgoing
SMTP
(to be sent) mail messages mail
server user
SMTP protocol between mail
servers to send email
SMTP agent
messages SMTP
client: sending mail mail user
agent
server server
“server”: receiving mail
user
server agent
user
agent
2: Application Layer 51
Electronic Mail: SMTP [RFC 2821]
uses TCP to reliably transfer email message from client
to server, port 25
direct transfer: sending server to receiving server
three phases of transfer
handshaking (greeting)
transfer of messages
closure
command/response interaction
commands: ASCII text
response: status code and phrase
2: Application Layer 52
Scenario: Alice sends message to Bob
1) Alice uses UA to compose 4) SMTP client sends Alice’s
message and “to” message over the TCP
[email protected] connection
2) Alice’s UA sends message 5) Bob’s mail server places the
to her mail server; message message in Bob’s mailbox
placed in message queue 6) Bob invokes his user agent
3) Client side of SMTP opens to read message
TCP connection with Bob’s
mail server
1 mail
mail
server user
user server
2 agent
agent 3 6
4 5
2: Application Layer 53
Sample SMTP interaction
S: 220 hamburger.edu
C: HELO crepes.fr
S: 250 Hello crepes.fr, pleased to meet you
C: MAIL FROM: <[email protected]>
S: 250 [email protected]... Sender ok
C: RCPT TO: <[email protected]>
S: 250 [email protected] ... Recipient ok
C: DATA
S: 354 Enter mail, end with "." on a line by itself
C: Do you like ketchup?
C: How about pickles?
C: .
S: 250 Message accepted for delivery
C: QUIT
S: 221 hamburger.edu closing connection
2: Application Layer 54
Try SMTP interaction for yourself:
telnet servername 25
see 220 reply from server
enter HELO, MAIL FROM, RCPT TO, DATA, QUIT
commands
above lets you send email without using email client
(reader)
2: Application Layer 55
SMTP: final words
SMTP uses persistent Comparison with HTTP:
connections
HTTP: pull
SMTP requires message
SMTP: push
(header & body) to be in 7-
bit ASCII both have ASCII
SMTP server uses
command/response
CRLF.CRLF to determine interaction, status codes
end of message
HTTP: each object
encapsulated in its own
response msg
SMTP: multiple objects
sent in multipart msg
2: Application Layer 56
Mail message format
2: Application Layer 57
Message format: multimedia extensions
MIME: multimedia mail extension, RFC 2045, 2056
additional lines in msg header declare MIME content
type
From: [email protected]
MIME version To: [email protected]
Subject: Picture of yummy crepe.
method used MIME-Version: 1.0
to encode data Content-Transfer-Encoding: base64
Content-Type: image/jpeg
multimedia data
type, subtype, base64 encoded data .....
parameter declaration .........................
......base64 encoded data
encoded data
2: Application Layer 58
Mail access protocols
SMTP SMTP access user
user
agent protocol agent
2: Application Layer 59
POP3 (more) and IMAP
More about POP3 IMAP
Previous example uses Keep all messages in
“download and delete” one place: the server
mode. Allows user to
Bob cannot re-read e-
organize messages in
mail if he changes folders
client IMAP keeps user state
“Download-and-keep”:
across sessions:
copies of messages on names of folders and
different clients mappings between
POP3 is stateless message IDs and folder
across sessions name
2: Application Layer 60
Chapter 2: Application layer
2.1 Principles of 2.6 P2P applications
network applications 2.7 Socket programming
2.2 Web and HTTP with TCP
2.3 FTP 2.8 Socket programming
2.4 Electronic Mail with UDP
SMTP, POP3, IMAP 2.9 Building a Web
2.5 DNS server
2: Application Layer 61
DNS: Domain Name System
2: Application Layer 62
DNS
DNS services Why not centralize DNS?
hostname to IP single point of failure
address translation traffic volume
host aliasing distant centralized
Canonical, alias names database
mail server aliasing maintenance
load distribution
replicated Web servers: doesn’t scale!
set of IP addresses for
one canonical name
2: Application Layer 63
Distributed, Hierarchical Database
Root DNS Servers
13 root name
servers worldwide
b USC-ISI Marina del Rey, CA
l ICANN Los Angeles, CA
2: Application Layer 65
TLD and Authoritative Servers
Top-level domain (TLD) servers:
responsible for com, org, net, edu, etc, and all
top-level country domains uk, fr, ca, jp.
Network Solutions maintains servers for com TLD
Educause for edu TLD
Authoritative DNS servers:
organization’s DNS servers, providing
authoritative hostname to IP mappings for
organization’s servers (e.g., Web, mail).
can be maintained by organization or service
provider
2: Application Layer 66
Local 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
acts as proxy, forwards query into hierarchy
2: Application Layer 67
DNS name root DNS server
resolution example
2
Host at cis.poly.edu 3
TLD DNS server
wants IP address for 4
gaia.cs.umass.edu 5
gaia.cs.umass.edu
2: Application Layer 68
DNS name
resolution example root DNS server
recursive query: 2 3
puts burden of name
7 6
resolution on
TLD DNS server
contacted name
server
heavy load? local DNS server
dns.poly.edu 5 4
1 8
gaia.cs.umass.edu
2: Application Layer 69
DNS: caching and updating records
once (any) name server learns mapping, it caches
mapping
cache entries timeout (disappear) after some
time
TLD servers typically cached in local name
servers
• Thus root name servers not often visited
update/notify mechanisms under design by IETF
RFC 2136
http://www.ietf.org/html.charters/dnsind-charter.html
2: Application Layer 70
DNS records
DNS: distributed db storing resource records (RR)
RR format: (name, value, type, ttl)
Type=A Type=CNAME
name is hostname name is alias name for some
value is IP address “canonical” (the real) name
Type=NS www.ibm.com is really
servereast.backup2.ibm.com
name is domain (e.g. foo.com)
value is hostname of
value is canonical name
authoritative name server
for this domain
Type=MX
value is name of mailserver
associated with name
2: Application Layer 71
DNS protocol, messages
DNS protocol : query and reply messages, both with same message format
msg header
identification: 16 bit #
for query, reply to query
uses same #
flags:
query or reply
recursion desired
recursion available
reply is authoritative
2: Application Layer 72
DNS protocol, messages
RRs in response
to query
records for
authoritative servers
additional “helpful”
info that may be used
2: Application Layer 73
Inserting records into DNS
example: new startup “Network Utopia”
register name networkuptopia.com at DNS registrar
(e.g., Network Solutions)
provide names, IP addresses of authoritative name server
(primary and secondary)
registrar inserts two RRs into com TLD server:
2: Application Layer 74
Chapter 2: Application layer
2.1 Principles of 2.6 P2P applications
network applications 2.7 Socket programming
app architectures with TCP
app requirements 2.8 Socket programming
2.2 Web and HTTP
with UDP
2.4 Electronic Mail
SMTP, POP3, IMAP
2.5 DNS
2: Application Layer 75
Pure P2P architecture
no always-on server
arbitrary end systems
directly communicate peer-peer
peers are intermittently
connected and change IP
addresses
Three topics:
File distribution
Searching for information
Case Study: Skype
2: Application Layer 76
Chapter 2: Application layer
2.1 Principles of 2.6 P2P applications
network applications 2.7 Socket programming
2.2 Web and HTTP with TCP
2.3 FTP 2.8 Socket programming
2.4 Electronic Mail with UDP
SMTP, POP3, IMAP
2.5 DNS
2: Application Layer 77
Socket programming
Goal: learn how to build client/server application that
communicate using sockets
2: Application Layer 78
Socket-programming using TCP
Socket: a door between application process and end-end-
transport protocol (UCP or TCP)
TCP service: reliable transfer of bytes from one process
to another
controlled by
controlled by process application
application process
developer
developer socket socket
controlled by TCP with TCP with controlled by
buffers, operating
operating buffers, internet system
system variables variables
host or host or
server server
2: Application Layer 79
Socket programming with TCP
Client must contact server When contacted by client,
server process must first be server TCP creates new
running socket for server process to
server must have created communicate with client
socket (door) that welcomes allows server to talk with
client’s contact multiple clients
Client contacts server by: source port numbers
creating client-local TCP used to distinguish
socket clients (more in Chap 3)
specifying IP address, port
number of server process application viewpoint
When client creates socket: TCP provides reliable, in-order
client TCP establishes transfer of bytes (“pipe”)
connection to server TCP between client and server
2: Application Layer 80
Client/server socket interaction: TCP
Server (running on hostid) Client
create socket,
port=x, for
incoming request:
welcomeSocket =
ServerSocket()
write reply to
connectionSocket read reply from
clientSocket
close
connectionSocket close
clientSocket
2: Application Layer 81
Stream jargon
keyboard monitor
A stream is a sequence of
characters that flow into
or out of a process.
inFromUser
input
stream
An input stream is Client
Process
attached to some input process
source for the process,
e.g., keyboard or socket.
An output stream is
attached to an output
inFromServer
outToServer
output input
source, e.g., monitor or stream stream
socket.
client
clientSocket
TCP
socket TCP
socket
2: Application Layer 82
Socket programming with TCP
Example client-server app:
1) client reads line from
standard input (inFromUser
stream) , sends to server via
socket (outToServer
stream)
2) server reads line from socket
3) server converts line to
uppercase, sends back to
client
4) client reads, prints modified
line from socket
(inFromServer stream)
2: Application Layer 83
Example: Java client (TCP)
import java.io.*;
import java.net.*;
class TCPClient {
sentence = inFromUser.readLine();
Send line
to server outToServer.writeBytes(sentence + '\n');
clientSocket.close();
}
}
2: Application Layer 85
Example: Java server (TCP)
import java.io.*;
import java.net.*;
class TCPServer {
2: Application Layer 86
Example: Java server (TCP), cont
Create output
stream, attached DataOutputStream outToClient =
to socket new DataOutputStream(connectionSocket.getOutputStream());
Read in line
from socket clientSentence = inFromClient.readLine();
2: Application Layer 87
Chapter 2: Application layer
2.1 Principles of 2.6 P2P applications
network applications 2.7 Socket programming
2.2 Web and HTTP with TCP
2.3 FTP 2.8 Socket programming
2.4 Electronic Mail with UDP
SMTP, POP3, IMAP
2.5 DNS
2: Application Layer 88
Socket programming with UDP
2: Application Layer 89
Client/server socket interaction: UDP
Server (running on hostid) Client
write reply to
serverSocket
specifying read datagram from
client address, clientSocket
port number close
clientSocket
2: Application Layer 90
Example: Java client (UDP)
keyboard monitor
inFromUser
input
stream
Client
Process
Input: receives
process
packet (recall
Output: sends thatTCP received
packet (recall “byte stream”)
receivePacket
sendPacket
that TCP sent UDP
packet
UDP
packet
“byte stream”)
client
clientSocket UDP
socket UDP
socket
2: Application Layer 91
Example: Java client (UDP)
import java.io.*;
import java.net.*;
class UDPClient {
public static void main(String args[]) throws Exception
{
Create
input stream BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
Create
client socket DatagramSocket clientSocket = new DatagramSocket();
Translate
InetAddress IPAddress = InetAddress.getByName("hostname");
hostname to IP
address using DNS byte[] sendData = new byte[1024];
byte[] receiveData = new byte[1024];
2: Application Layer 93
Example: Java server (UDP)
import java.io.*;
import java.net.*;
class UDPServer {
public static void main(String args[]) throws Exception
Create {
datagram socket
DatagramSocket serverSocket = new DatagramSocket(9876);
at port 9876
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];
while(true)
{
Create space for
DatagramPacket receivePacket =
received datagram
new DatagramPacket(receiveData, receiveData.length);
Receive serverSocket.receive(receivePacket);
datagram
2: Application Layer 94
Example: Java server (UDP), cont
String sentence = new String(receivePacket.getData());
Get IP addr
InetAddress IPAddress = receivePacket.getAddress();
port #, of
sender int port = receivePacket.getPort();
sendData = capitalizedSentence.getBytes();
Create datagram
DatagramPacket sendPacket =
to send to client new DatagramPacket(sendData, sendData.length, IPAddress,
port);
Write out
datagram serverSocket.send(sendPacket);
to socket }
}
} End of while loop,
loop back and wait for
another datagram
2: Application Layer 95
Chapter 2: Summary
our study of network apps now complete!
application architectures specific protocols:
client-server HTTP
P2P
FTP
hybrid
SMTP, POP, IMAP
application service
DNS
requirements:
P2P: BitTorrent, Skype
reliability, bandwidth, delay
Internet transport service socket programming
model
connection-oriented, reliable: TCP
unreliable, datagrams: UDP
2: Application Layer 96
Chapter 2: Summary
Most importantly: learned about protocols
typical request/reply Important themes:
message exchange: control vs. data msgs
client requests info or in-band, out-of-band
service
centralized vs.
server responds with data,
status code decentralized
stateless vs. stateful
message formats:
headers: fields giving info
reliable vs. unreliable msg
about data transfer
data: info being “complexity at network
communicated edge”
2: Application Layer 97