0% found this document useful (0 votes)
12 views65 pages

CNS - Unit I

The document discusses the Client-Server and Peer-to-Peer paradigms, detailing their structures, advantages, and disadvantages. It also covers various application layer protocols including DNS, FTP, TFTP, HTTP, SMTP, POP, and IMAP, explaining their purposes, workings, and characteristics. Additionally, it highlights the limitations of SMTP and introduces MIME for enhanced email functionality.

Uploaded by

0605zwj2ww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views65 pages

CNS - Unit I

The document discusses the Client-Server and Peer-to-Peer paradigms, detailing their structures, advantages, and disadvantages. It also covers various application layer protocols including DNS, FTP, TFTP, HTTP, SMTP, POP, and IMAP, explaining their purposes, workings, and characteristics. Additionally, it highlights the limitations of SMTP and introduces MIME for enhanced email functionality.

Uploaded by

0605zwj2ww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Unit I

Client Server Paradigm


and
Peer to Peer Paradigm
Prof.M.A.Gade 1
• CO1: Describe the responsibilities, services offered and protocol

used at application layer of network.

• 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.

• In the client-server architecture, when the client computer sends a


request for data to the server through the internet, the server accepts
the requested process and deliver the data packets requested back to
the client. Clients do not share any of their resources.

• Examples of Client-Server Model are Email, World Wide Web, etc.

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:

• Centralized system with all data in a single place.


• Cost efficient requires less maintenance cost and Data recovery is
possible.

• The capacity of the Client and Servers can be changed separately.

6
Disadvantages of Client-Server model:
• Clients are prone to viruses, Trojans and worms if present in the
Server or uploaded into the Server.

• Server are prone to Denial of Service (DOS) attacks.

• Data packets may be spoofed or modified during transmission.


• Phishing or capturing login credentials or other useful information of
the user are common and MITM(Man in the Middle) attacks are
common.
7
Peer to Peer Paradigm

• P2P is a file-sharing technology, allowing the users to access mainly


the multimedia files like videos, music, e-books, games, etc.

• The individual users in this network are referred to as peers.


• The peers request files from other peers by establishing TCP or UDP
connections.

8
How P2P works
A peer-to-peer network allows computer hardware and software to
communicate without the need for a server.

Unlike client-server architecture, there is no central server for


processing requests in a P2P architecture.

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.

• This is decided by the underlying architecture supported by the P2P systems.

• 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.

• So basically this server maintains a huge database regarding which file is


present at which IP addresses.

13
2. Query Flooding
• Unlike the centralized approach, this method makes use of distributed
systems.

• In this, the peers are supposed to be connected to an overlay network. It


means if a connection/path exists from one peer to another, it is a part of this
overlay network.

• 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

used at application layer of network.

 TLO2: Analyze different Application Layer Protocols.

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-

• DNS is a host name to IP Address translation service.


• It converts the names we type in our web browser address bar to the
IP Address of web servers hosting those sites.

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:

• A user program sends a name query to a library procedure called the


resolver.

• 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:

• DNS server looks up the name.


• If a match is found, it returns the corresponding IP Address to the
resolver.
• If no match is found, the local DNS server sends a query to a higher
level DNS server.
• This process is continued until a result is returned.

• Step-04:

• After receiving a response, the DNS client returns the resolution


result to the application.
8
• DNS uses UDP at the transport layer due to the following reasons-

• Point-01:

• UDP is much faster than TCP.


• TCP is slow as it uses Three way handshake to start the data transfer.

• Point-02:

• DNS requests are very small.


• So, they fits well within UDP segments.

9
• DNS uses UDP at the transport layer for replying to the DNS queries of
clients.
• Therefore, it is a connection less protocol.

Mapping an IP Address onto a domain name is referred to as Inverse


domain. :
Domain Name to IP address and Vise versa

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-

• FTP is short for File Transfer Protocol.


• It is an application layer protocol.

• Purpose-

• It is used for exchanging files over the internet.


• It enables the users to upload and download the files from the
internet.

12
Working-
• FTP establishes two TCP connections between the client and the server.

13
Characteristics of FTP-
• FTP uses TCP at the transport layer.

• FTP uses port number 21 for control connection.

• FTP uses port number 20 for data connection.

• FTP uses persistent TCP connections for control connection.

• FTP uses non-persistent connections for data connection.

• FTP is a connection oriented protocol.

14
Emails can’t be sent using FTP:

• FTP requires the connection establishment between the client and


server before transferring the files.
• So, both have to be online at the same time.
• That is why, emails are not sent using FTP.

FTP can transfer one file at a time.

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:

• FTP is connection oriented, where as TFTP is not.


• TFTP uses error checking and flow control, where as TFTP does not
cause error checking.

• FTP uses TCP as transport protocol, where as TFTP uses UDP as


transport protocol.
• -Authentication is mandatory in FTP, where as authentication is not
needed in TFTP.

17
• TFTP Server is used for simple file transfer (typically for boot-loading
remote devices).

• Trivial File Transfer Protocol (TFTP) is a simple protocol for exchanging


files between two TCP/IP machines.

• TFTP servers allow connections from a TFTP Client for sending and
receiving files.

18
Application Layer Protocols: HTTP
• Hyper Text Transfer Protocol-

• HTTP is short for Hyper Text Transfer Protocol.


• It is an application layer protocol.

• Purpose-

• It is mainly used for the retrieval of data from websites throughout


the internet.
• It works on the top of TCP/IP suite of protocols.
19
Working-
HTTP uses a client-server model where-
• Web browser is the client.
• Client communicates with the web server hosting the website.

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.

HTTP connections can be of two types-


• Non-persistent HTTP connection
• Persistent HTTP 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-

• SMTP is short for Simple Mail Transfer Protocol.


• It is an application layer protocol.
• It is used for sending the emails efficiently and reliably over the
internet.

25
Working-

• SMTP server is always on a listening mode.


• Client initiates a TCP connection with the SMTP server.
• SMTP server listens for a connection and initiates a connection on
that port.
• The connection is established.
• Client informs the SMTP server that it would like to send a mail.
• Assuming the server is OK, client sends the mail to its mail server.
• Client’s mail server use DNS to get the IP Address of receiver’s mail
server.
• Then, SMTP transfers the mail from sender’s mail server to the
receiver’s mail server.
26
Simple Mail Transfer Protocol

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-

• SMTP is a push protocol.


• SMTP uses TCP at the transport layer.
• SMTP uses port number 25.
• SMTP uses persistent TCP connections, so it can send multiple emails
at once.
• SMTP is a connection oriented protocol.
• SMTP is an in-band protocol.
• SMTP is a stateless protocol.

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.

• It is an application layer protocol.


• It also enables the clients to receive or download the emails from
their remote mail server.

33
• Characteristics of IMAP-
• IMAP is a pull protocol.

• IMAP uses TCP at the transport layer.

• IMAP uses port number 143.

• IMAP uses persistent TCP connections.

• IMAP is a connection oriented 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.

• IMAP server listens on port 143

• Messages can be accessed across multiple devices.

• The mail content can be read partially before downloading.

• 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.

• Unlimited message length.


• Binary attachments (executables, images, audio, or video files) which
may be divided if needed.

• MIME provided support for varying content types and multi-part


messages.

38
MIME Working:

• Message Transfer Agent (MTA)

• 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.

• Message is transferred through e-mail system to the other side in 7-


bit format now MIME protocol again converts it back into non-ASCII
code and now the user agent of receiver side reads it and then
information is finally read by the receiver.

• MIME header is basically inserted at the beginning of any e-mail


transfer.
40
Network Management: SNMP
• Functions functions performed by a network management system can
be divided into five broad categories :
1) configuration management
2) fault management,
3) performance management,
4) security management
5) accounting management .

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.

• It provides a set of fundamental operations for monitoring and


maintaining an internet.

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,

 Microsoft word –B1-Unit 4


https://egyankosh.ac.in/bitstream/123456789/11784/1/Unit-4.pdf

48

You might also like