Lec 3 Application Layer
Lec 3 Application Layer
Service
Application
Protocol
Peer
Centralized Peer
Directory
1 – Inform and Update 3 – File Transfer
Server
Peer A
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
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
HTTP
HTTP
Client
Server
Server
Origin HTTP Response
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
MTA
receives email from the
client's MUA
passes email to the MDA
for final delivery
uses SMTP to route email
between servers