Application Layer
Chapter 3
CCNA Exploration 1
Special thanks to instructors at St. Clair
College in Windsor, Ontario for their slides.
Applications
The Interface Between Human and Data
Networks
Application Layer
Application Layer OSI and
TCP/IP Models
Two important concepts:
Application Layer:
The first step for getting data on to the
network.
Application Software:
The programs used to communicate over the
network.
For example:
When displaying a web page:
The Application Layer uses the HTTP Protocol.
The Application Software is your browser.
Application Layer Software
Within the
Application
layer, there are two
forms
of software
programs or
processes that
provide access to
the network:
Applications
Services
User Applications, Services
& Protocols
Applications provide people a way to
create messages
Application layer services establish an
interface to the network
Protocols provide the rules and formats
that govern how data is treated.
Application Layer Software
Application layer protocols are used by both the
source and destination devices during a
communication session.
The application layer protocols implemented on the
source and destination host must match.
Application Layer Protocols
Establish consistent rules for data exchange.
Specify data structure in the message and types of
messages.
Define message dialogues (appropriate responses).
Application Layer Software
IP
TCP
HTTP
Header Header Header
Data
Applications and services can use multiple protocols.
Encapsulate the protocol.
Be encapsulated by a protocol.
Invoke other protocols.
For example, using a web browser (HTTP) may invoke:
DNS, ARP, ICMP
May use TCP, UDP, Ethernet, PPP (Much More Later)
Definitely uses IP
Application Layer
Making Provisions for
Applications and Services
Introduction
When accessing
information on a device,
the data may not be
physically stored on
that device.
If that is the case, a
request must be made
to the device where the
data resides.
Two methods:
Client/Server
Peer-to-Peer (P2P)
Servers
Servers are
repositories of
information.
Processes on
the server
control the
delivery of
information
to the client.
The information is usually shared with multiple clients.
Web Server
Email Server
Servers
Some servers
may require
user
authentication
to access the
data or the
network.
FTP Server:
May require
an account and password before allowing a
transfer.
Client/Server Model
Clients hardware,
May also require
control
Files information.
downloaded
User to
Authentication
the client.
or identify a file to be
transferred.
software combination
The client begins the
exchange by making
a request for data.
The server responds
with one or more
streams of data.
Resources are stored
on the server.
Files uploaded to
the server
Client/Server Model
The biggest advantage of the client/server model
is the centralization of resources.
User Names and Passwords, Files, Databases.
Peer-to-Peer Model: P2P
Networking
Two or more computers are connected via a network
and can share resources (such as printers and files)
without having a dedicated server.
End devices (peers) can function as either a server
or client depending upon the required service.
Peer-to-Peer (P2P)
Networking
One big disadvantage of P2P networking is
that it decentralizes the services on a
multiuser network.
Maintaining security and access policies on
a P2P network is definitely a challenge.
All Policies and User Names and
Passwords must be maintained on each
peer device.
Peer-to-Peer (P2P)
Applications
A peer-to-peer application, unlike a peer-
to-peer network, allows a device to act as
both a client and a server within the same
communication.
Application Layer
Application Layer Protocols
and Services Examples
Applications
Applications
APPLICATIONS
Usually, a single server will function as a server for multiple
application protocols.
Some Specific Used
Protocols
Domain Name System (DNS) - TCP/UDP Port 53
Hypertext Transfer Protocol (HTTP) - TCP Port 80
Simple Mail Transfer Protocol (SMTP) - TCP Port 25
Post Office Protocol (POP) - UDP Port 110
Telnet - TCP Port 23
Dynamic Host Configuration Protocol - UDP Port 67
File Transfer Protocol (FTP) - TCP Ports 20 and 21
22
DNS
Domain Name System
Helping Protocol
Domain Name System
(DNS)
DNS allows us to use simple, recognizable names instead of
an IP Address.
Domain Name System
(DNS)
?
1
1.
.
8
16
.
2
19
80
Data:
1025 Request for
web page
Trailer
Web Browser application
Port Number: 1025
www.cisco.com : ? IP address
Web Server
application Port
Number: 80
IP address :
200.20.20.1
IP address :
192.168.1.1
Domain Name System
(DNS)
We
ww b Se
w. rve
cis
r
co :
.co
m
Reply:
www.cisco.com =
198.133.219.25
DNS Address Book:
www.cisco.com = 198.133.219.25
www.yahoo.com = 200.133.2.56
== ?? Unique
IP address
Numbered
Address
Request
for IP address
Packet ready
to be send
to www.cisco.com
Data:
Request for
web page
Trailer
DNS-Domain Name System
Domain Name System
(DNS)
DNS is an automated client/server service.
Internet programs requiring domain name look up
send a resolution request to the DNS resolver
(Client side of DNS) in the local operating system
The resolver in turn handles the communications
required.
Web Browser
Mail Client
Operating System
DNS
Resolver
Domain Name System
(DNS)
DNS and the Browser:
1. First, a domain name or URL is entered in the address
field of the browser. The browser passes the name to
the resolver.
Domain Name System
(DNS)
www.cisco.com
DNS Resolver:
Port No. 1026
DNS Sever:
Port No. 53
IP Address :
10.10.1.3
???
IP Address :
10.10.1.2
MAC Address
.2
.1
0.
1
10
M
Se AC
ve o
r fD
N
M
S
A
C
of
Cl
ie
nt
10
.1
0.
1.
3
DNS and the Browser:
2. The resolver sends the DNS request to the DNS Server.
IP Address
53
1026
Data:
Request for
Domain
Name Lookup
Port Numbers
Trailer
Domain Name System
(DNS)
www.cisco.com
3
www.cisco.com = 198.133.219.25
DNS and the Browser:
2. The resolver sends the DNS request to the DNS Server.
3. The server then searches its records and resolves the
name with to a corresponding IP Address.
Domain Name System
(DNS)
www.cisco.com
3
www.cisco.com = 198.133.219.25
4
198.133.219.25
DNS and the Browser:
4. The DNS server then sends the IP Address back to the
client that made the request. The IP Address will be
used in the encapsulation process as the destination
address for packets going to www.cisco.com.
Domain Name System
(DNS)
How does the resolver know where to send the requests?
From the IP configuration on the device.
IP Address
192.168.25.25
Subnet Mask
255.255.255.0
Default Gateway
192.168.25.1
DNS Server
208.67.222.222
DNS: Client Settings
DNS: Client Settings
Domain Name System
(DNS)
ARP Reply
ARP Request
DNS Request
ready
to be send.
How does the resolver know the MAC Address of the DNS
Server?
By the help of ARP (Address Resolution Protocol)
Resolves Known IP address = Unknown MAC Address.
Where to send the ARP request?
To All Devices in the Network - BROADCAST
DNS Name Servers
Centralize DNS?
NO
Single point of failure
Traffic volume
REASONS ?
Distance centralized database
Maintenance
Doesnt scale!
Solution: Distributed Database
DNS Heirarchy
Also Known as
Authoritative
DNS Servers
Local DNS
Servers
DNS: Root name servers
13 root name servers worldwide
Contacted by local name server that can not
resolve name.
a NSI Herndon, VA
c PSInet Herndon, VA
d U Maryland College Park, MD
g DISA Vienna, VA
h ARL Aberdeen, MD
j NSI (TBD) Herndon, VA
e NASA Mt View, CA
f Internet Software C. Palo Alto, CA
b USC-ISI Marina del Rey, CA
l ICANN Marina del Rey, CA
k RIPE London
i NORDUnet Stockholm
m WIDE Tokyo
Domain Name System
(DNS)
For access to the Internet, DNS servers are arranged in a
hierarchy.
References to the hierarchy are included when a local DNS
server is installed.
Domain Name System
(DNS)
The servers at the Root know how to reach the Top-level
domain servers.
The top-level servers know how to reach the secondary level
servers and so on..
root name server
DNS Query Example
Two Types of DNS Queries :
Recursive
Iterative
local name server
dns.bracu.ac.bd
requesting host
Top Level Domain
.edu
5
4
Local DNS Server
dns.cs.umass.edu
PC17.bracu.ac.bd
gaia.cs.umass.edu
Recursive Query
root name server
DNS: Iterated Queries
Recursive query:
puts burden of
name resolution on
contacted name
server
heavy load?
Iterated query:
contacted server
replies with name of
server to contact
I dont know this
name, but ask this
server
iterated query
3
4
7
local name server
dns.eurecom.fr
requesting host
Top Level Domain
.edu
Local DNS Server
dns.cs.umass.edu
surf.eurecom.fr
gaia.cs.umass.edu
Iterative Query
Domain Name System
www.site.com = 202.2.2.2 (DNS)
www.site.com = 202.2.2.2
Store in cache, Send to client
? www.site.com
? www.site.com
www.site.com = 202.2.2.2 .Store in cache
DNS Cache : Storing DNS Information in
Local memory
nslookup
Windows operating systems provide
the nslookup utility.
Use to query a domain name and get
the IP Address.
Can also be used to troubleshoot
DNS resolution issues.
nslookup
Domain Name System
(DNS)
Utility:
ipconfig
/displaydns
Displays the
contents of the PC
cache.
ipconfig /flushdns
Clears the
contents of the PC
cache.
HTTP
Hypertext Transfer Protocol
And WWW Services
HTTP Components
Client
Web browser
Server
Web Server
Protocol
HTTP, HTTPS
Content
Web Documents
WWW Service and HTTP
Protocol
Browser
Web browsers are the client applications used to
interpret the HTTP application protocol received from
a web server.
Web Browser
WWW Service and HTTP
Web Server:
Stores the web objects (HTML, Pictures, Video, Files).
Each accessible by a URL.
Implements the server side of HTTP.
Examples:
Apache, Microsoft Internet Information Server (MIIS)
URL
The browser interprets the 3 parts of the
URL:
1. http (the protocol or scheme)
2. www.cisco.com(the server name)
3. web-server.htm (the specific file name
requested).
HTTP How does it work?
DNS Reply
Get Request for
Web page
Request
for IP address
Web Browser
Displays
HTTP is a request/response type of protocol.
HTTP 1.0: RFC 1945
HTTP 1.1: RFC 2068
HTTP Request Message
Method/Message types
HTTP/1.0
GET
POST
HEAD
asks server to leave
requested object out of
response
debugging
HTTP/1.1
GET, POST, HEAD
PUT
uploads file in entity
body to path specified
in URL field
DELETE
deletes file specified in
the URL field
WWW Service and HTTP
The server responds with either:
The requested object.
An error message, if necessary.
Or other status messages.
HTTP Response Message
status line
(protocol
status code
status phrase)
header
lines
data, e.g.,
requested
HTML file
HTTP/1.1 200 OK
Connection close
Date: Thu, 06 Aug 1998 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
Last-Modified: Mon, 22 Jun 1998 ...
Content-Length: 6821
Content-Type: text/html
data data data data data ...
HTTP response status codes
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
HTTP Request
HTTP Response
WWW Service and HTTP
For secure communications, Secure HTTP (HTTPS) is
used:
Allows servers and clients to exchange information
securely over the Internet.