You are on page 1of 19

Application Layer

Types of paradigms
Client-server paradigm
Peer-to-peer paradigm
Client-server paradigm
Server
A program running on the remote machine
providing service to the clients
Accepts requests from clients and responds
Infinite program
Client
A program running on the local machine
requesting service from a server
Finite program
Types of clients/servers
Client
Concurrency running multiple clients
Iterative one client running in a machine
Server
Concurrency multiple client requests
Iterative Can process only one request at a time
Server types
Servers

Connectionless Connectionless Connection-oriented Connection-oriented


Iterative Concurrent iterative concurrent
UDP TCP/SCTP
Connectionless Iterative Server
Connectionless Iterative Server
Servers that use UDP are normally iterative
Server processes one request at a time
Datagrams are stored in a queue, waiting for
service
Single well-known port is used
Connection-oriented Concurrent
Server
Connection-oriented concurrent server
Servers that use TCP or SCTP are normally
concurrent
Can serve many clients at a time
Requires many ports
Server can use only one well-known port
One well-known port and many ephemeral ports
are used
Peer-to-peer paradigm
Peer acts as both client and server
Suitable for file transfer applications
E.g. Chat application
Domain Name System
IP address uniquely identifies the connection
of host to the Internet
People prefer to use names instead of
addresses
Mapping is needed
Single host file was used when the Internet
was small
Host file is huge and cannot be stored either
at the host or at the central server
The concept of DNS
Divide huge amount of information into
smaller parts and store each part on a
different computer
Host that needs mapping can contact the
closest computer holding the needed
information
Purpose of DNS
Host
name

Host
name
File
DDNS
transfer DNS
client
client Server
IP
address

IP
address Query

Transport
Layer Response
Name Space
Flat Name Space
Hierarchical Name Space
DNS was designed based on this
Domain Name
FQDN,PQDN
Domain
A sub-tree of the domain name space
Domain Name Space

Generic Countries

int com gov edu net org mil in us jp

sun yale ernet net ac co


cs eng cdac iisc vsnl keio nec
eng
ai linda dssd www cs csl
robot
pc24
Distribution of Name Space
Inefficient if one computer stores all the
information
Hierarchy of Name Servers called DNS servers
Zone
Authoritative server
Root Server
Primary DNS Server
Secondary DNS Server
Resolver
Application use this library procedure to
query name server.
It uses recursive query.
VU CS EDU Yale Yale CS
Originator name server name server
1 2 name server
3 name server
4
flits.cs.vu.nl cs.vu.nl edu yale.edu cs.yale.edu
8 7 6 5
?

linda.cs.yale.edu
Resolution
Resolver
Recursive resolution
Iterative resolution
Caching
Authoritative server keeps a TTL
DNS server maintains a TTL
Resource Records
Every domain has several resource records
associated with it.
They are 5-tuples
Domain_name
Time_to_live
Class
Type
Value
Resolver - gives a domain name and gets RRs
associated with that domain name.
Resource Records (contd)
Types Meaning Value
SOA Start of Authority Parameters for this zone
A IP address of a host 32-bit integer
MX Mail Exchange Priority, domain willing to accept the mail
NS Name Server Name of a DNS for this domain
CNAME Canonical Name Domain Name
PTR Pointer Alias for an IP address
HINFO Host information CPU and Os information about host
TXT Text ASCII text

Every DNS database has an NS record for each of


the top level domains.
References
TCP/IP Protocol Suite, Fourth Edition by
Behrouz A. Ferouzan
Computer Networks, Fourth Edition by
Andrew S. Tanenbaum

You might also like