0% found this document useful (0 votes)
17 views

Lec 3 Application Layer

Uploaded by

abdoalsenaweabdo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lec 3 Application Layer

Uploaded by

abdoalsenaweabdo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Introduction to Computer Network

Application Layer Functionality and Protocols


2023- 2024
Prof Dr. Hesham Arafat
Application Layer: OSI and TCP/IP Models

 The communication process between two


communicating nodes is Actually a communication
process between two applications on these devices.

 Service

 Application

 Protocol

 Application layer protocols are used to exchange data between


programs running on the source and destination hosts.
Application Layer: OSI and TCP/IP Models
Network-Aware Applications
&
Application layer Services
 Applications are the software programs for
communication over the network , implement the application
layer protocols and are able to communicate directly with the
lower layers of the protocol stack
 Other programs may need the assistance of
Application layer services to use network resources,
like file transfer or network print spooling
 Each application or network service uses protocols
which define the standards and data formats to be
used
Network categories based on
Sharing of Information

 Client/ Server Model


 Peer-to-peer Model
Client/Server (C/S) Model

 Device requesting the information is called a client


 Device responding to the request is called a server.
 Client and server processes are considered to be in
the Application layer.
Client
Server
Model

 The client begins the exchange by requesting data from


the server.
 Server responds by sending one or more streams of data
to the client.
 Application layer protocols describe the format of the
requests and responses between clients and servers.
Peer-to-Peer Networks
 In a peer-to-peer network, two or more computers are
connected via a network and can share resources (such as
printers and files) without having a dedicated server.
 Every connected end device (known as a peer) can function as
either a server or a client.
 A simple home network with two connected computers sharing
a printer is
 an example of a P2P network.
 Each person can set his or her computer to share files,
enable networked games, or share an Internet connection.

 Unlike the client/server model, P2P networks decentralize the
resources
 In P2P it is difficult to enforce security
Peer-to-Peer Networks
 A peer-to-peer application (P2P), allows a device to act
as both a client and a server within the same
communication.
 Both can initiate a communication and are considered
equal in the communication process.
 P2P applications require that each end device provide a
user interface and run a background service.
 Some P2P applications use a hybrid system where resource
sharing is decentralized but the indexes that point to
resource locations are stored in a centralized directory.
 Peer-to-peer applications can be used on peer-to-peer
networks, client/server networks, and across the
Internet.
P2P – Centralized Directory Peer B

Peer
Centralized Peer
Directory
1 – Inform and Update 3 – File Transfer
Server
Peer A

1. Peer A starts P2P application


2. Informs centralized directory server of its:
IP address
Names of objects making available for sharing (MP3, videos, etc.)
3. Directory server collects information from each peer that becomes active.
Dynamic database
Maps IP addresses with object names
4. Peer A queries directory server for IP addresses of other peers for specific content
Directory Server returns IP addresses for those peers (Peer B)
5. Peer A establishes TCP connection and downloads file (i.e. HTTP GET) from other peer, Peer B.
6. Directory server removes Peer from database when Peer closes application or disconnects from
Internet (periodic messages – pings – from server).
Application Layer: OSI and TCP/IP
 TCP/IP Application layer protocols are those that provide for the
exchange of user information. They specify the format and control
information necessary for many of the common Internet
communication functions.
 Domain Name Service Protocol (DNS) is used to resolve Internet
names to IP addresses.
 Hypertext Transfer Protocol (HTTP) is used to transfer files that make
up the Web pages of the World Wide Web.
 Simple Mail Transfer Protocol (SMTP) is used for the transfer of mail
messages and attachments.
 Telnet, a terminal emulation protocol, is used to provide remote access
to servers and networking devices.
 File Transfer Protocol (FTP) is used for interactive file transfer
between systems
Report 1

 Specify the function of the application layer protocols?


 Specify the relation between (application - Application
layer - services , and protocol) ?
 Specify the relation between OSI and TCP/IP model?
 Write a short note about Centralized Directory and DNS
in P2P model?
 Compare between P2P , Client/Server Network
HTTP
(WWW) DHCP
We will examine (IP address
HTTP in detail. resolution)

FTP
(file transfer) DNS
(domain name
resolution)

SMTP SMB
(email) (file sharing)

P2P
Telnet (file sharing)
(remote login)
Domain Name System (DNS)
Name Resolution

Resolver
 DNS client programs used to look up DNS name information.
Name Resolution
 The two types of queries that a DNS resolver (either a DNS client or
another DNS server) can make to a DNS server are the following:
Recursive queries
 Queries performed by Host to Local DNS Server
Iterative queries
 Queries performed Local DNS server to other servers
DNS Name
Resolution
1

 User types http://www.example.com

Step 1.
 The DNS resolver on the DNS client sends a recursive query to its
configured Local DNS server.
 Requests IP address for "www.example.com".
 The DNS server for that client is responsible for resolving the name
Cannot refer the DNS client to another DNS server.
2 2
3

DNS Name
Resolution
1

Step 2.
 Local DNS Server forwards the query to a Root DNS server.

Step 3.
 Root DNS server
Makes note of .com suffix
Returns a list of IP addresses for TLD (Top Level Domain Servers)
responsible for .com.
DNS Name Resolution 4 4

Step 4.
 The local DNS server sends query for www.example.com to one of
the TLD servers.

Step 5.
 TLD Server
Makes note of example.com
Returns IP address for authoritative server example.com (such as
dns.example.com server)
DNS Name Resolution
6

6
7

Step 6.
 Local DNS server sends query for www.example.com directly to
DNS server for example.com

Step 7.
 example.com DNS server responds with its IP address for
www.example.com
DNS Name Resolution
8

Step 8.
 Local DNS server sends the IP address of www.example.com to the
DNS client.

 DNS Caching
 When a DNS server receives a DNS reply (mapping hostname to an
IP address) it can cache the information in its local memory.
DHCP – Dynamic Host Configuration Protocol

 IP addresses and other information can be obtained:


Statically
Dynamically (DHCP)
DHCP

 DHCP Information can


include:
IP address
Subnet mask
Default gateway
Domain name
DNS Server
 DHCP servers can be:
Server on LAN
Router
Server at ISP
Telnet Telnet
Telnet
Server

 Allows a user to remotely access another device (host, router,


switch).
 A connection using Telnet is called a Virtual Terminal (VTY) session,
or connection.
 Telnet uses software to create a virtual device that provides the same
features of a terminal session with access to the server command line
interface (CLI).
 Telnet clients (Teraterm ,Hyperterm)
Telnet

 Telnet supports user authentication, but does not encrypt data.


 All data exchanged during a Telnet sessions is transported as plain
text.
 Secure Shell (SSH) protocol offers an alternate and secure
method for server access.
Stronger authentication
Encrypts data
HTTP (HyperText Transfer Protocol)

HTTP
HTTP
Client
Server

Web page (html document) Browser – The user


Web page consists of agent for the Web.
Objects Displays requested
HTML file ,JPEG Web page and
image ,GIF image provides navigational
,JAVA applet, Audio and configuration
file features.
Web
Web Cache or HTTP Client
Caching HTTP
Request
Proxy Request

Server
Origin HTTP Response

Server HTTP Response


HTTP
HTTP Request
Request
Origin HTTP Response
Server HTTP Response
Client

1. Client/browser sends HTTP Request to Web cache (Proxy server).


2. Web cache checks to see if it has a local copy of the object.
2a. Local copy: Web cache sends object to client’s browser.
2b. No Local copy: Web cache sends HTTP request to origin server.
3. Origin server sends object to Web cache.
4. Web cache stores a local copy of the object.
5. Web cache forwards copy of the object to the client browser.
Note: TCP connections are also created between Client and Web Cache; Web cache
and Origin server (later).
FTP
FTP (File Transfer Protocol)
FTP
Client Server

 FTP was developed to allow for file transfers between a client and a server.
 Used to push and pull files from a server running the FTP daemon (FTPd).
 Uses get and put commands
SMTP – Simple Mail Transfer Protocol
User agent Mail server Mail server User agent
SMTP SMTP

POP3
IMAP

 Internet mail involves:


User agents
Allows users to read, reply, compose, forward, save, etc., mail messages
GUI user agents: Outlook, Eudora, Messenger
Mail servers
Stores user mail boxes, communicates with local user agents and other mail servers.
SMTP
Principle application layer protocol for Internet mail
Sent over TCP
Mail access protocols: POP3 (Post Office Protocol ), IMAP (Internet Message
Access Protocol ), HTTP (Web-based email)
SMTP

MTA
 receives email from the
client's MUA
 passes email to the MDA
for final delivery
 uses SMTP to route email
between servers

Mail software, processes used: MTA and MDA


 MUA (Mail User Agent) – Email client software.
 MTA (Mail Transfer Agent) – Software that governs transfer of email between
mail servers.
Includes UNIX sendmail, Microsoft Exchange Server, Postfix, and Exim
 MDA (Mail Delivery Agent) – Software that governs transfer of email from mail
servers to clients.
On Unix systems, procmail and maildrop are the most popular MDAs.
File sharing and services and SMB Protocol
•SMB is a client/server file sharing protocol.
•Describes the structure of shared network resources,
•It is a request-response protocol.
•Unlike FTP, clients establish a long term connection to servers. the user of
the client can access the resources on the server as if the resource is local
to the client host.
Report 2
 Describe the two forms of application layer SW and the
purpose of each (hint use application and services in
your answer)?
 Discuss the meaning of the client and server in the
context of the data network ?
 Compare between client server and P2P ?
 List five general functions that application layer protocol
specify?
 Give the specific purpose of the DNS, HTTP, SMB and
SMTP/POP application layer protocol?

You might also like