Understanding Peer-to-Peer Communication and Application Layer Protocols, Exercises of Network and System Administration

An overview of peer-to-peer (p2p) communication, focusing on processes communicating, sockets, and application layer protocols such as http and smtp. It covers the basics of p2p systems, inter-process communication, sockets, and the importance of application layer protocols in enabling communication between different systems.

Typology: Exercises

2018/2019

Uploaded on 03/09/2019

Meshari1234
Meshari1234 🇸🇦

2 documents

1 / 70

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Application Layer
Chapter 2
CEN303- Semester II 2018-2019
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46

Partial preview of the text

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