Download Understanding Peer-to-Peer Communication and Application Layer Protocols and more Exercises Network and System Administration in PDF only on Docsity!
Application Layer
Chapter 2
CEN303- Semester II – 2018-
Chapter 2: Application Layer
Outline
2.1 Principles of Network Applications
2.2 Web and HTTP
2.3 FTP
2.4 Electronic mail
2.5 DNS
2.6 P2P Applications
2.7 socket programming with UDP and TCP
Some Network Apps
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
application transport network data link physical application transport network data link physical application transport network data link physical
Application Architectures
Possible structure of applications:
Client - Server
Peer-to-Peer (P2P)
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 irregularly connected
and change IP addresses
complex management
peer-peer
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
Client process : process that initiates communication
Server process : process that waits to be contacted
Applications with P2P architectures have client
processes & server processes
Addressing processes
to receive messages, process must have identifier
host device has unique 32-bit IP address
Question: Is IP address of host on which process runs
sufficient for identifying the process?
identifier includes both IP address and port numbers
associated with process on host.
example port numbers:
HTTP server: 80
mail server: 25
Application Layer Protocols
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
Transport service requirements
application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games text messaging data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss throughput elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic time sensitive no no no yes, 100’s ms yes, few secs yes, 100’s ms yes and no
Internet transport protocols services
TCP service:
reliable transport between
sending and receiving process
flow control : sender won’t
overwhelm receiver
congestion control : throttle
sender when network
overloaded
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.
Chapter 2: Application Layer
Outline
2.1 Principles of Network Applications
2.2 Web and HTTP
2.3 FTP
2.4 Electronic mail
2.5 DNS
2.6 P2P Applications
2.7 socket programming with UDP and TCP
Web and HTTP
First, a review…
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, e.g.,
www.someschool.edu/someDept/pic.gif
host name
path name
HTTP connections
non-persistent HTTP
at most one object sent
over TCP connection
connection then closed
downloading multiple
objects required multiple
connections
persistent HTTP
multiple objects can be
sent over single TCP
connection between
client, server
Non-persistent HTTP
suppose user enters URL:
1a. HTTP client initiates TCP
connection to HTTP server
(process) at
www.someSchool.edu on port 80
2. HTTP client sends HTTP request
message (containing URL) into
TCP connection socket.
Message indicates that client
wants object
someDepartment/home.index
1b. HTTP server at host
www.someSchool.edu waiting
for TCP connection at port 80.
“accepts” connection, notifying
client
3. HTTP server receives request
message, forms response
message containing requested
object, and sends message into
its socket
time
(contains text, references to 10 jpeg images) www.someSchool.edu/someDepartment/home.index