CNS - Unit I
CNS - Unit I
• TLO1: Explain the basics of Client Server Paradigm and Peer to Peer
Paradigm
2
Client-server model
• The Client-server model is a distributed application structure that
partitions task or workload between the providers of a resource or
service, called servers, and service requesters called clients.
3
Client-server model
4
How the Client-Server Model works ?
• Client: When we talk the word Client, it mean to talk of a person or an
organization using a particular service. Similarly in the digital world a Client is a
computer (Host) i.e. capable of receiving information or using a particular
service from the service providers (Servers).
• Servers: Similarly, when we talk the word Servers, It mean a person or medium
that serves something. Similarly in this digital world a Server is a remote
computer which provides information (data) or access to particular services.
5
Advantages of Client-Server model:
6
Disadvantages of Client-Server model:
• Clients are prone to viruses, Trojans and worms if present in the
Server or uploaded into the Server.
8
How P2P works
A peer-to-peer network allows computer hardware and software to
communicate without the need for a server.
The peers directly interact with one another without the requirement
of a central server.
9
How P2P works
• when one peer makes a request, it is possible that multiple peers have a copy
of that requested object.
• Now the problem is how to get the IP addresses of all those peers.
• By means of one of these methods, the client peer can get to know about all
the peers which have the requested object/file and the file transfer takes
place directly between these two peers.
10
How P2P works
Three such Architectures exist:
• Centralized Directory
• Query Flooding
• Exploiting Heterogeneity
11
12
1.Centralized Directory
• It is somewhat similar to client-server architecture in the sense that it
maintains a huge central server to provide directory service.
• All the peers inform this central server of their IP address and the files they
are making available for sharing.
• The server queries the peers at regular intervals to make sure if the peers
are still connected or not.
13
2. Query Flooding
• Unlike the centralized approach, this method makes use of distributed
systems.
• In this overlay network, peers are called nodes, and the connection between
peers is called an edge between the nodes, thus resulting in a graph-like
structure.
14
3. Exploiting heterogeneity
• This P2P architecture makes use of both the above-discussed systems.
• It resembles a distributed system like Gnutella because there is no central
server for query processing.
• The peers with higher bandwidth and network connectivity are at a higher
priority and are called group leaders/super nodes. The rest of the peers
are assigned to these super nodes.
• These super nodes are interconnected and the peers under these super
nodes inform their respective leaders about their connectivity, IP address,
and the files available for sharing.
15
• Video Link :
https://www.youtube.com/watch?v=hTaCLXMmDQM
16
References:
• https://www.geeksforgeeks.org/p2ppeer-to-peer-file-sharing/
• https://www.tutorialspoint.com/Peer-to-Peer-Computing
• https://www.computerworld.com/article/2588287/networking-peer-
to-peer-network.html
17
UNIT – I APPLICATION LAYER
1
CO1: Describe the responsibilities, services offered and protocol
2
Application Layer Protocols: Domain Name Service
• DNS is short for Domain Name Service or Domain Name System.
• It is an application layer protocol.
• Purpose-
3
Domain Name Service
4
Need-
• The need for Domain Name Service arises due to the following reasons-
• Point-01:
• IP Addresses are not static and may change dynamically.
• So, a mapping is required which maps the domain names to the IP
Addresses of their web servers.
• Point-02:
• IP Addresses are a complex series of numbers.
• So, it is difficult to remember IP Addresses directly while it is easy to
remember names.
5
DNS Resolution-
6
• The steps involved in DNS Resolution are-
• Step-01:
• Step-02:
• Resolver looks up the local domain name cache for a match.
• If a match is found, it sends the corresponding IP Address back.
• If no match is found, it sends a query to the local DNS server.
7
• Step-03:
• Step-04:
• Point-01:
• Point-02:
9
• DNS uses UDP at the transport layer for replying to the DNS queries of
clients.
• Therefore, it is a connection less protocol.
10
Domain Name Types
• .com – commercial business (the most common TLD)
• org – organizations (typically, nonprofit)
• gov – government agencies.
• edu – educational institutions.
• net – network organizations.
• mil – military.
11
Application Layer Protocols: FTP
• File Transfer Protocol-
• Purpose-
12
Working-
• FTP establishes two TCP connections between the client and the server.
13
Characteristics of FTP-
• FTP uses TCP at the transport layer.
14
Emails can’t be sent using FTP:
15
Application Layer Protocols :TFTP
• TFTP stands for Trivial File Transfer Protocol.
• It is lighter the FTP and is used when a file transfer functionality is
need without FTP features.
• It works on Port 69 and follows UDP protocol.
16
Differences between FTP and TFTP:
17
• TFTP Server is used for simple file transfer (typically for boot-loading
remote devices).
• TFTP servers allow connections from a TFTP Client for sending and
receiving files.
18
Application Layer Protocols: HTTP
• Hyper Text Transfer Protocol-
20
• HTTP opens a connection between the client and server through TCP.
• HTTP sends a request to the server which collects the requested data.
• HTTP sends the response with the objects back to the client.
• HTTP closes the connection.
21
Non-persistent HTTP connection Example:
• Suppose a request has been made for a HTML page that contains 10
images (called objects).
• Then,
• With non-persistent connection, all the 11 objects (1 page + 10
images) will be sent one by one.
• For getting each object, a new separate connection will be opened
and used.
22
Persistent HTTP connection:
• Suppose a request has been made for a HTML page that contains 10
images (called objects).
• Then, With persistent connection, all the 11 objects
(1 page + 10 images) will be sent one after the other using a single TCP
connection.
23
• HTTP uses TCP at the transport layer.
• HTTP clients uses port 80 to send and receive requested web pages
from a HTTP server.
• Similarly, HTTP server responds to all the requests at port 80.
• HTTP 1.0 is non-persistent and HTTP 1.1 is persistent.
24
Application Layer Protocols: SMTP
• Simple Mail Transfer Protocol-
25
Working-
27
SMTP is used two times-
• Between the sender and the sender’s mail server
• sender’s mail server to receiver mail server.
28
Characteristics of SMTP-
29
Application Layer Protocol: POP
• Post Office Protocol-
POP is short for Post Office Protocol.
• It is an application layer protocol.
• Purpose-
• It is a message access protocol.
• It enables the clients to receive or download the emails from their
remote mail server.
• POP version 3 (POP3) is the most popularly used version.
30
Working-
To retrieve a message from the mail server-
• Client establishes a TCP connection using port 110.
• Client identifies itself to the server.
• Client issues a series of POP3 commands.
31
• Characteristics of POP-
• POP is a pull protocol.
• POP uses TCP at the transport layer.
• POP uses port number 110.
• POP uses persistent TCP connections.
• POP is a connection oriented protocol.
32
Internet Message Access Protocol-
• Internet Message Access Protocol-
• IMAP is short for Internet Message Access Protocol.
33
• Characteristics of IMAP-
• IMAP is a pull protocol.
34
Differences between POP and IMAP-
Post Office Protocol (POP3):
• POP is a simple protocol that only allows downloading messages from
your Inbox to your local computer.
• POP server listens on port 110
• In POP3 the mail can only be accessed from a single device at a time.
• To read the mail it has to be downloaded on the local system.
• A user can not search the content of mail before downloading to the
local system.
35
Internet Message Access Protocol (IMAP):
• IMAP is much more advanced and allows you the user to see all the
folders on the mail server.
• The user can organize the emails directly on the mail server.
36
Multipurpose Internet Mail Extension (MIME)
Limitations of Simple Mail Transfer Protocol (SMTP):
• SMTP has a very simple structure
• It cannot be used for languages that do not support 7-bit ASCII format
such as- French, German, Russian, Chinese and Japanese, etc. so it
cannot be transmitted using SMTP. So, in order to make SMTP more
broad we use MIME.
• It cannot be used to send binary files or video or audio data.
37
Features of MIME –
• It is able to send multiple attachments with a single message.
38
MIME Working:
• User Agent(UA)
39
• Suppose a user wants to send an email through user agent and it is in
a non-ASCII format so there is a MIME protocol which converts it into
7-bit NVT ASCII format.
41
Functions of Network Management System:
42
• The Simple Network Management Protocol (SNMP) is a framework
for managing devices in an internet using the TCP/IP protocol suite.
43
SNMP :
SNMP defines the format of packets SNMP defines the format of packets exchanged between a manager and
an agent It reads and changes the an agent. It reads and changes the status (values) of objects (variables) i
SNMP k t in SNMP packets.
44
45
Fig. Management overview
46
• Video Link Application Layer Protocols:
https://www.youtube.com/watch?v=cgkLPyQx8ns
47
References:
Computer Networks, Fifth Edition by Andrew Tanenbaum and David
Wetherall, © Pearson Education-Prentice Hall,
48