0% found this document useful (0 votes)
16 views29 pages

Unit 1

Uploaded by

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

Unit 1

Uploaded by

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

22CYT503- COMPUTER NETWORKS

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

LECTURE NOTES

V SEMESTER

22CYT503 – COMPUTER NETWORKS

Regulation – 2022
Academic Year 2024 – 2025(Even Semester)

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

UNIT I INTRODUCTION AND APPLICATION LAYER 10


1.1 Data Communication
1.2 Networks
1.3 Network Types
1.4 Protocol Layering
1.5 TCP/IP Protocol suite
1.6 OSI Model
1.7 Introduction to Sockets
1.8 Application Layer protocols
1.8.1 HTTP
1.8.2 FTP
1.9 Email protocols
1.9.1 SMTP
1.9.2 POP3
1.9.3 IMAP
1.9.4 MIME
1.10 DNS
1.11 SNMP

Prepared by

Mr. S. Senthilnathan, AP / CSE

1.1 DATA COMMUNICATION


Data Communications are the exchange of data between two devices via some form of
transmission.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.1.1 Data Communication Characteristics


1. Delivery: The system must deliver data to the correct destination.
2. Accuracy:
 Data delivered accurately.
 Altered data which left uncorrected are unusable.
3. Timelines:
The system must deliver data in timely manner without delay (real-time).
1.2 NETWORKS
 A network is a set of devices (often referred to as nodes) connected by communication
links.
 A node can be a computer, printer, or any other device capable of sending or receiving
data generated by other nodes on the network.
 When we communicate, we are sharing information. This sharing can be local or
remote.

The five components are:


1. Message - It is the information to be communicated. Popular forms of information
include text, pictures, audio, video etc.
2. Sender - It is the device which sends the data messages. It can be a computer,
workstation, telephone handset etc.
3. Receiver - It is the device which receives the data messages. It can be a computer,
workstation, telephone handset etc.
4. Transmission Medium - It is the physical path by which a message travels from sender
to receiver. Some examples include twisted-pair wire, coaxial cable, radio waves etc.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

5. Protocol - It is a set of rules that governs the data communications. It represents an


agreement between the communicating devices. Without a protocol, two devices may be
connected but not communicating.
1.2.1 Transmission Modes
The way in which data is transmitted from one device to another device is known as
transmission mode.
The transmission mode is also known as the communication mode
The Transmission mode is divided into three categories:
 Simplex Mode
 Half-duplex Mode
 Full-duplex mode (Duplex Mode)

1.2.1.1 Simplex Mode


 In Simplex mode, the communication is unidirectional, i.e., the data flow in one
direction.
 A device can only send the data but cannot receive it or it can receive the data but
cannot send the data.
 This transmission mode is not very popular as mainly communications require the
two- way exchange of data. The simplex mode is used in the business field as in sales
that do not require any corresponding reply.
 The radio station is a simplex channel as it transmits the signal to the listeners but
never allows them to transmit back.
 Keyboard and Monitor are the examples of the simplex mode as a keyboard can
only accept the data from the user and monitor can only be used to display the data on
the screen.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.2.1.2 Half-Duplex Mode


 In a Half-duplex channel, direction can be reversed, i.e., the station can transmit
and receive the data as well.
Messages flow in both the directions, but not at the same time.
The entire bandwidth of the communication channel is utilized in one direction at a
time.
In half-duplex mode, it is possible to perform the error detection, and if any error
occurs, then the receiver requests the sender to retransmit the data.
A Walkie-talkie is an example of the Half-duplex mode.

1.2.1.3 Full-Duplex Mode


 In Full duplex mode, the communication is bi-directional, i.e., the data flow in both the
directions.
 Both the stations can send and receive the message simultaneously.
 Full-duplex mode has two simplex channels. One channel has traffic moving in one
direction, and another channel has traffic flowing in the opposite direction.
 The Full-duplex mode is the fastest mode of communication between devices.
 The most common example of the full-duplex mode is a Telephone network.
 When two people are communicating with each other by a telephone line, both can talk
and listen at the same time.

1.3 NETWORK TYPES


 PAN (Personal Area Network).
 LAN (Local Area Network).
 CAN (Campus Area Network).
 MAN (Metropolitan Area Network).
 WAN (Wide Area Network).

PAN (Personal Area Network)

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 PAN is a short-distance network design to individual user (person).


 PAN may be contained: - printer, mobile, computer, wireless printers, PDA, etc.
 components of PAN connected together via Bluetooth, USB cable,
I r D A (infrared), etc.
LAN (Local Area Network)
 A LAN is a group of nodes connected together in a small specific area.
 LAN may be contained workstations, computers, scanner, printers, servers, etc.

CAN (Campus Area Network)


 A CAN is a group of interconnection LAN within limited geographical area.
 A CAN using in school campus, military base, university campus, etc.,

MAN (Metropolitan Area Network)


 A MAN is a large computer network uses to connect between LAN in
different location (cities).
 A MAN is a group of nodes connect together over city.

WAN (Wide Area Network)


 A WAN is a computer network that covers large geographical area.
 WANs are used to connect types of networks together.

1.4 Protocol Layering


 In networking, a protocol defines the rules that both the sender and receiver and all
intermediate devices need to follow to be able to communicate effectively.
 A protocol provides a communication service that the process uses to exchange
messages.
 When communication is simple, we may need only one simple protocol.
 When the communication is complex, we may need to divide the task between
different layers, in which case we need a protocol at each layer, or protocol layering.
 Protocol layering is that it allows us to separate the services from the implementation.
 A layer needs to be able to receive a set of services from the lower layer and to give
the services to the upper layer

1.4.1 Basic Elements of Layered Architecture

 Service: It is a set of actions that a layer provides to the higher layer.

 Protocol: It defines a set of rules that a layer uses to exchange the information with
peer entity. These rules mainly concern about both the contents and order of the
messages used.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 Interface: It is a way through which the message is transferred from one layer to
another layer.
1.5 TCP / IP PROTOCOL SUITE

The TCP/IP architecture is also called as Internet architecture


It is a 4-layer model. The layers of TCP/IP are
1. Application layer
2. Transport Layer (TCP/UDP)
3. Internet Layer

4. Network Interface Layer


1.5.1 Application Layer
 An application layer incorporates the function of top three OSI layers. An application
layer is the topmost layer in the TCP/IP model.
 It is responsible for handling high-level protocols, issues of representation.
 This layer allows the user to interact with the application.
 When one application layer protocol wants to communicate with another application
layer, it forwards its data to the transport layer.
 Protocols such as FTP, HTTP, SMTP, POP3, etc running in the application layer
provides service to other program running on top of application layer
1.5.2 Transport Layer
 The transport layer is responsible for the reliability, flow control, and correction of
data which is being sent over the network.
 The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
 UDP – UDP provides connectionless service and end-to-end delivery of
transmission. It is an unreliable protocol as it discovers the errors but not specify the
error.
 TCP – TCP provides a full transport layer services to applications. TCP is a

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

reliable protocol as it detects the error and retransmits the damaged frames.
1.5.3 Internet Layer
 The internet layer is the second layer of the TCP/IP model.
 An internet layer is also known as the network layer.
 The main responsibility of the internet layer is to send the packets from any network,
and they arrive at the destination irrespective of the route they take.
 Internet layer handle the transfer of information across multiple networks through
router and gateway.
 IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP
suite.
1.5.4 Network Interface Layer
 The network interface layer is the lowest layer of the TCP/IP model.
 This layer is the combination of the Physical layer and Data Link layer defined in the
OSI reference model.
 It defines how the data should be sent physically through the network.
 This layer is mainly responsible for the transmission of the data between two devices
on the same network.
 The functions carried out by this layer are encapsulating the IP datagram into frames
transmitted by the network and mapping of IP addresses into physical addresses.
 The protocols used by this layer are Ethernet, token ring, FDDI, X.25, frame relay.

1.6 OSI MODEL


 OSI stands for Open System Interconnection.

 OSI consists of seven layers, and each layer performs a particular network function.

 OSI model divides the whole task into seven smaller and manageable tasks. Each
layer is assigned a particular task.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.6.1 Physical Layer

The physical layer coordinates the functions required to transmit a bit stream over a physical
medium. The physical layer is concerned with the following functions:

 Physical characteristics of interfaces and media - The physical layer defines the
characteristics of the interface between the devices and the transmission medium.
 Representation of bits - To transmit the stream of bits, it must be encoded to signals.
The physical layer defines the type of encoding.
 Signals: It determines the type of the signal used for transmitting the information.

 Data Rate or Transmission rate - The number of bits sent each second –is also
defined by the physical layer.
 Synchronization of bits - The sender and receiver must be synchronized at the bit
level. Their clocks must be synchronized.
1.6.2 Data Link Layer

It is responsible for transmitting frames from one node to the next node. The other
responsibilities of this layer are
 Framing - Divides the stream of bits received into data units called frames.

 Physical addressing – If frames are to be distributed to different systems on the network,


data link layer adds a header to the frame to define the sender and receiver.

 Flow control- If the rate at which the data are absorbed by the receiver is less than
the rate produced in the sender, the Data link layer imposes a flow ctrl mechanism.
 Error control- Used for detecting and retransmitting damaged or lost frames and to
prevent duplication of frames. This is achieved through a trailer added at the end of

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

the frame.
1.6.3 Network Layer
 This layer is responsible for the delivery of packets from source to destination.

 It determines the best path to move data from source to the destination based on the network
conditions, the priority of service, and other factors. The other responsibilities of this layer
are

 Logical addressing - If a packet passes the network boundary, we need another


addressing system for source and destination called logical address. This addressing is
used to identify the device on the internet.
 Routing – Routing is the major component of the network layer, and it determines the
best optimal path out of the multiple paths from source to the destination.
1.6.4 Transport Layer
 It is responsible for Process to Process delivery. That is responsible for source-to-
destination (end-to-end) delivery of the entire message, It also ensures whether the
message arrives in order or not.
 The other responsibilities of this layer are
 Port addressing / Service Point addressing - The header includes an address called
port address / service point address. This layer gets the entire message to the correct
process on that computer.
 Segmentation and reassembly - The message is divided into segments and each
segment is assigned a sequence number. These numbers are arranged correctly on the
arrival side by this layerConnection control - This can either be connectionless or
connection oriented. ·
 The connectionless treats each segment as an individual packet and delivers to the
destination. · The connection-oriented makes connection on the destination side before
the delivery. After the delivery the termination will be terminated
1.6.5 Session Layer

 This layer establishes, manages and terminates connections between applications.

 Dialog control - Session layer acts as a dialog controller that creates a dialog between
two processes or we can say that it allows the communication between two processes
which can be either half-duplex or full-duplex.
 Synchronization- Session layer adds some checkpoints when transmitting the data in
a sequence. If some error occurs in the middle of the transmission of data, then the

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

transmission will take place again from the checkpoint. This process is known as
Synchronization and recovery.
1.6.6 Presentation Layer
It is concerned with the syntax and semantics of information exchanged between two
systems. The other responsibilities of this layer are
 Translation – Different computers use different encoding system, this layer is
responsible for interoperability between these different encoding methods. It will
change the message into some common format.
 Encryption and Decryption-It means that sender transforms the original information
to another form and sends the resulting message over the n/w. and vice versa.
 Compression and Expansion-Compression reduces the number of bits contained in
the information particularly in text, audio and video.
1.6.7 Application Layer
This layer enables the user to access the network. It handles issues such as network
transparency, resource allocation, etc. This allows the user to log on to remote user.
The other responsibilities of this layer are
 FTAM (File Transfer, Access, Management) - Allows user to access files in a remote
host.
 Mail services - Provides email forwarding and storage.
 Directory services - Provides database sources to access information about various
sources and objects.

1.7 INTRODUCTION TO SOCKETS

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

The services provided (often by the operating system) that provide the interface between
application and protocol software.

Application Network API


Protocol AProtocol BProtocol C

1.7.1 Types of Sockets


Two different types of sockets:
stream vs. datagram
 Stream socket :( a. k. a. connection- oriented socket)
It provides reliable, connected networking service Error free; no out- of- order
packets (uses TCP) applications: telnet/ ssh, http, …
 Datagram socket :( a. k. a. connectionless socket)
It provides unreliable, best- effort networking service Packets may be lost; may
arrive out of order (uses UDP) applications: streaming audio/ video (real player),

1.8 APPLICATION LAYER PROTOCOLS


 The application layer is the highest layer in the protocol suite.
 The application layer provides services to the user.
 Communication is provided using a logical connection, which means that the
two application layers assume that there is an imaginary direct connection
through which they can send and receive messages.
 The application layer is the only layer that provides services to the Internet
user
Types of Application Protocols:
Standard and Nonstandard Protocols
Standard Application-Layer Protocols
There are several application-layer protocols that have been standardized and documented by
the Internet authority.
Two very widely-used standardized application protocols:
SMTP : Simple Mail Transfer Protocol is used to exchange electronic mail.
HTTP : Hyper Text Transport Protocol is used to communicate between Web
browsers and Web servers.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

Nonstandard Application-Layer Protocols


A programmer can create a nonstandard application-layer program if they can write two
programs that provide service to the user by interacting with the transport layer.

1.8.1 HTTP (Hypertext Transfer Protocol)


 The Hyper Text Transfer Protocol (HTTP) is used to define how the client-server
programs can be written to retrieve web pages from the Web.
 It is a protocol used to access the data on the World Wide Web (WWW).
 The HTTP protocol can be used to transfer the data in the form of plain text, hypertext,
audio, video, and so on.
 HTTP is a stateless request/response protocol that governs client/server
communication.
 An HTTP client sends a request; an HTTP server returns a response.

Features of HTTP
1. Connectionless protocol
2. Media independent
3. Stateless

1.8.1.1 HTTP Request and Response Messages


 The HTTP protocol defines the format of the request and response messages.
 Request Message: The request message is sent by the client that consists
of a request line, headers, and sometimes a body.
 Response Message: The response message is sent by the server to the client
that consists of a status line, headers, and sometimes a body.

1.8.1.2 HTTP Cookies


 An HTTP cookie (also called web cookie, Internet cookie, browser cookie, or
simply cookie) is a small piece of data sent from a website and stored on the
user's computer by the user's web browser while the user is browsing.
 HTTP is stateless, Cookies are used to add State.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 Cookies were designed to be a reliable mechanism for websites to remember


stateful information (such as items added in the shopping cart in an online
store) or to record the user's browsing activity (including clicking particular
buttons, logging in, or recording which pages were visited in the past).

1.8.1.3 Components of Cookie


A cookie consists of the following components:
1. Name
2. Value
3. Zero or more attributes (name/value pairs). Attributes store information such as the
cookie's expiration, domain, and flags

1.8.1.4 Types of Cookies


1. Authentication cookies These are the most common method used by web servers to know
whether the user is logged in or not, and which account they are logged in with. Without such
a mechanism, the site would not know whether to send a page containing sensitive
information, or require the user to authenticate themselves by logging in.
2. Tracking cookies These are commonly used as ways to compile individuals browsing
histories.
3. Session cookie A session cookie exists only in temporary memory while the user navigates
the website. Web browsers normally delete session cookies when the user closes the browser.

4. Persistent cookie Instead of expiring when the web browser is closed as session cookies do, a
persistent cookie expires at a specific date or after a specific length of time. This means that, for
the cookie's entire lifespan, its information will be transmitted to the server every time the user
visits the website that it belongs to, or every time the user views a resource belonging to that
website from another website.

1.8.1.5 HTTP Caching

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 HTTP Caching enables the client to retrieve document faster and reduces load on the
server.
 HTTP Caching is implemented at Proxy server, ISP router and Browser.
 Server sets expiration date (Expires header) for each page, beyond which it is not
cached.
 HTTP Cache document is returned to client only if it is an updated copy by checking
against If-Modified-Since header.
 If cache document is out-of-date, then request is forwarded to the server and response
is cached along the way.

1.8.1.6 HTTP Security


 HTTP does not provide security.
 However, HTTP can be run over the Secure Socket Layer (SSL).
 In this case, HTTP is referred to as HTTPS.
 HTTPS provides confidentiality, client and server authentication, and data integrity.

1.8.2 FTP (File Transfer Protocol)


 FTP is a standard internet protocol provided by TCP/IP used for transmitting the
files from one host to another.
 It is mainly used for transferring the web page files from their creator to the
computer that acts as a server for other computers on the internet.
 It is also used for downloading the files to computer from other servers.
 Although we can transfer files using HTTP, FTP is a better choice to transfer
large files or to transfer files using different formats.

1.8.2.1 FTP Mechanism

1.8.2.2 FTP Connections


 There are two types of connections in FTP - Control Connection and Data
Connection.
 The two connections in FTP have different lifetimes.
 The control connection remains connected during the entire interactive FTP

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

session.
 The data connection is opened and then closed for each file transfer activity.
When a user starts an FTP session, the control connection opens.
 While the control connection is open, the data connection can be opened and closed
multiple times if several files are transferred.

1.8.2.2.1 Control Connection:


 The control connection uses very simple rules for communication. o Through control
connection, we can transfer a line of command or line of response at a time.
 The control connection is made between the control processes.
 The control connection remains connected during the entire interactive FTP session.

1.8.2.2.2 Data Connection:


 The Data Connection uses very complex rules as data types may vary.
 The data connection is made between data transfer processes.
 The data connection opens when a command comes for transferring the files and
closes when the file is transferred.

1.8.2.3 FTP Communication

 FTP Communication is achieved through commands and responses.


 FTP Commands are sent from the client to the server
 FTP responses are sent from the server to the client.
 FTP Commands are in the form of ASCII uppercase, which may or may not be
followed by an argument.
1.8.2.4 FTP Transmission Mode

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 FTP can transfer a file across the data connection using one of the following three
transmission modes: stream mode, block mode, or compressed mode.
 The stream mode is the default mode; data are delivered from FTP to TCP as a
continuous stream of bytes.
 In the block mode, data can be delivered from FTP to TCP in blocks.
 In the compressed mode, data can be compressed and delivered from FTP to TCP.

1.8.2.5 FTP Security


 FTP requires a password; the password is sent in plaintext which is
unencrypted. This means it can be intercepted and used by an attacker.
 The data transfer connection also transfers data in plaintext, which is insecure.
 To be secure, one can add a Secure Socket Layer between the FTP application layer
and the TCP layer.

1.9 EMAIL (SMTP, MIME, IMAP, POP)


 One of the most popular Internet services is electronic mail (E-mail).
 Email is one of the oldest network applications.
 The three main components of an Email are
1. User Agent (UA)
2. Messsage Transfer Agent (MTA) – SMTP
3. Messsage Access Agent (MAA) - IMAP , POP

 When the sender and the receiver of an e-mail are on the same system, we need only
two User Agents and no Message Transfer Agent
 When the sender and the receiver of an e-mail are on different system, we need two
UA, two pairs of MTA (client and server), and two MAA (client and server).
Working of Email

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 When Alice needs to send a message to Bob, she runs a UA program to prepare the
message and send it to her mail server.
 The mail server at her site uses a queue (spool) to store messages waiting to be sent.
The message, however, needs to be sent through the Internet from Alice’s site to
Bob’s site using an MTA.
 Here two message transfer agents are needed: one client and one server.
 The server needs to run all the time because it does not know when a client will ask
for a connection.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 The client can be triggered by the system when there is a message in the queue to be
sent.
 The user agent at the Bob site allows Bob to read the received message.
 Bob later uses an MAA client to retrieve the message from an MAA server running
on the second server.

1.9.1 Simple Mail Transfer Protocol (SMTP)


 SMTP is the standard protocol for transferring mail between hosts in the TCP/IP
protocol suite.

 SMTP is not concerned with the format or content of messages themselves.


 SMTP uses information written on the envelope of the mail (message header), but
does not look at the contents (message body) of the envelope.

 SMTP clients and servers have two main components


 User Agents (UA) – Prepares the message, encloses it in an envelope.
 Mail Transfer Agent (MTA) – Transfers the mail across the internet

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.9.1.1 SMTP Operations


Basic SMTP operation occurs in three phases:
1. Connection Setup
2. Mail Transfer
3. Connection Termination
1.9.1.1.1 Connection Setup
 The sequence is quite simple:
1. The sender opens a TCP connection with the receiver.
2. Once the connection is established, the receiver identifies itself with "Service
Ready”.
3. The sender identifies itself with the HELO command.
4. The receiver accepts the sender's identification with "OK".
5. If the mail service on the destination is unavailable, the destination host
returns a "Service Not Available" reply in step 2, and the process is
terminated.
1.9.1.1.2 Mail Transfer
 Once a connection has been established, the SMTP sender may send one or
more messages to the SMTP receiver.
 There are three logical phases to the transfer of a message:
1. A MAIL command identifies the originator of the message.
2. One or more RCPT commands identify the recipients for this message.
3. A DATA command transfers the message text.

1.9.1.1.3 Connection Termination


 The SMTP sender closes the connection in two steps.
 First, the sender sends a QUIT command and waits for a reply.
 The second step is to initiate a TCP close operation for the TCP connection.
 The receiver initiates its TCP close after sending its reply to the QUIT command.

1.9.2 Multipurpose Internet Mail Extension (MIME)


 SMTP provides a basic email service, while MIME adds multimedia capability to SMTP.

 MIME is an extension to SMTP and is used to overcome the problems and


limitations of SMTP.
 Email system was designed to send messages only in ASCII format.
 Languages such as French, Chinese, etc., are not supported.
 Image, audio and video files cannot be sent.
 MIME is a protocol that converts non-ASCII data to 7-bit NVT (Network Virtual
Terminal) ASCII and vice-versa.

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.9.2.1 Message Transfer in MIME


 MTA is a mail daemon (sendmail) active on hosts having mailbox, used to send
an email.
 Mail passes through a sequence of gateways before it reaches the recipient mail
server.
 Each gateway stores and forwards the mail using Simple mail transfer protocol
(SMTP).
 SMTP defines communication between MTAs over TCP on port 25.
 In an SMTP session, sending MTA is client and receiver is server. In each exchange

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.9.3 Internet Mail Access Protocol (IMAP)


 IMAP is an Application Layer Internet protocol that allows an e-mail client to
access e-mail on a remote mail server.
 It is a method of accessing electronic mail messages that are kept on a possibly
shared mail server.
 IMAP is a more capable wire protocol.
 IMAP is similar to SMTP in many ways.
 IMAP is a client/server protocol running over TCP on port 143.
 IMAP allows multiple clients simultaneously connected to the same mailbox, and
through flags stored on the server, different clients accessing the same mailbox at the
same or different times can detect state changes made by other clients.
 In other words, it permits a "client" email program to access remote message stores as
if they were local.

1.9.3.1 Operation of IMAP

 The mail transfer begins with the client authenticating the user and identifying the
mailbox they want to access.
 Client Commands LOGIN, AUTHENTICATE, SELECT, EXAMINE, CLOSE, and
LOGOUT
 Server Responses OK, NO (no permission), BAD (incorrect command),
 When user wishes to FETCH a message, server responds in MIME format.
 Message attributes such as size are also exchanged.
 Flags are used by client to report user actions. SEEN, ANSWERED, DELETED,
RECENT

1.9.4 Post Office Protocol (POP3)

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 Post Office Protocol (POP3) is an application-layer Internet standard protocol used by


local e-mail clients to retrieve e-mail from a remote server over a TCP/IP connection.
 POP is a much simpler protocol, making implementation easier.
 POP supports offline access to the messages, thus requires less internet usage time
 POP does not allow search facility.
 In order to access the messages, it is necessary to download them.
 It allows only one mailbox to be created on server.
 It is not suitable for accessing non mail data.
 POP treats the mailbox as one store, and has no concept of folders.
 POP works in two modes namely, delete and keep mode.
 In delete mode, mail is deleted from the mailbox after retrieval. The delete
mode is normally used when the user is working at their permanent computer and
can save and organize the received mail after reading or replying.
 In keep mode, mail after reading is kept in mailbox for later retrieval. The keep
mode is normally used when the user accesses her mail away from their primary
computer.

1.9.4.1 POP3 Commands

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

POP commands are generally abbreviated into codes of three or four letters
1. UID - This command opens the connection
2. STAT - It is used to display number of messages currently in the mailbox
3. LIST - It is used to get the summary of messages
4. RETR -This command helps to select a mailbox to access the messages
5. DELE - It is used to delete a message
6. RSET - It is used to reset the session to its initial state
7. QUIT - It is used to log off the session

1.10 DNS (DOMAIN NAME SYSTEM)

 Domain Name System was designed in 1984.


 DNS is used for name-to-address mapping.
 The DNS provides the protocol which allows clients and servers to communicate with
each other. Eg: Host name like www.yahoo.com is translated into numerical IP
addresses like 207.174.77.131
 Domain Name System (DNS) is a distributed database used by TCP/IP applications
to map between hostnames and IP addresses and to provide electronic mail routing
information.
 Each site maintains its own database of information and runs a server program that
other systems across the Internet can query.

Working of DNS

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

The following six steps shows the working of a DNS. It maps the host name to an IP address:
1. The user passes the host name to the file transfer client.
2. The file transfer client passes the host name to the DNS client.
3. Each computer, after being booted, knows the address of one DNS server. The DNS
client sends a message to a DNS server with a query that gives the file transfer server
name using the known IP address of the DNS server.
4. The DNS server responds with the IP address of the desired file transfer server.
5. The DNS server passes the IP address to the file transfer client.
6. The file transfer client now uses the received IP address to access the file transfer
server.

1.10.1 Name Space

 To be unambiguous, the names assigned to machines must be carefully selected from


a name space with complete control over the binding between the names and IP
address.
 The names must be unique because the addresses are unique.
 A name space that maps each address to a unique name can be organized in two
ways: flat (or) hierarchical.

1.10.1.1 Flat Name Space


 In a flat name space, a name is assigned to an address.
 A name in this space is a sequence of characters without structure.
 The main disadvantage of a flat name space is that it cannot be used in a large system
such as Internet because it must be centrally controlled to avoid ambiguity and
duplication

1.10.1.2 Hierarchical Name Space

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 In a hierarchical name space, each name is made of several parts.


 The first part can define the organization, the second part can define the name, the
third part can define departments, and so on.
 In this case, the authority to assign and control the name spaces can be decentralized.
 A central authority can assign the part of the name that defines the nature of the
organization and the name.
 The responsibility for the rest of the name can be given to the organization itself.
Suffixes can be added to the name to define host or resources.
 The management of the organization need not worry that the prefix chosen for a host
is taken by another organization because even if part of an address is the same, the
whole address is different.

1.10.1.3 Domain Name


 Each node in the tree has a label called as domain name.
 A full domain name is a sequence of labels separated by dots (.)
 The domain names are always read from the node up to the root.
 The last label is the label of the root (null).
 This means that a full domain name always ends in a null label, which means the last
character is a dot because the null string is nothing

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

1.10.1.3.1 Generic Domains


 The generic domains define registered hosts according to their generic behavior.
 Each node in the tree defines a domain, which is an index to the domain name space
database.
 The first level in the generic domains section allows seven possible three-
character levels.
 These levels describe the organization types as listed in following table.

1.10.1.3.2 Country Domains


 The country domains section follows the same format as the generic domains but
uses two characters for country abbreviations
o E.g.; in for India, us for United States etc) in place of the three-
character organizational abbreviation at the first level.
 Second level labels can be organizational, or they can be more specific, national
designation.

1.10.2 DNS Messages

 DNS has two types of messages: query and response.


 Both types have the same format.
 The query message consists of a header and question section.
 The response message consists of a header, question section, answer section,
authoritative section, and additional section

1.11 SNMP (SIMPLE NETWORK MANAGEMENT PROTOCOL)

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 The Simple Network Management Protocol (SNMP) is a framework for


managing devices in an internet using the TCP/IP protocol suite.
 SNMP is an application layer protocol that monitors and manages routers,
distributed over a network.
 It provides a set of operations for monitoring and managing the internet.
 SNMP uses services of UDP on two well-known ports: 161 (Agent) and 162
(manager).
 SNMP uses the concept of manager and agent.

SNMP MANAGER
 A manager is a host that runs the SNMP client program
 The manager has access to the values in the database kept by the agent.
 A manager checks the agent by requesting the information that reflects the behavior
of the agent.
 A manager also forces the agent to perform a certain function by resetting values
in the agent database.
 For example, a router can store in appropriate variables the number of packets
received and forwarded.
 The manager can fetch and compare the values of these two variables to see if the
router is congested or not.
SNMP AGENT
 The agent is a router that runs the SNMP server program.
 The agent is used to keep the information in a database while the manager is used to
access the values in the database.
o For example, a router can store the appropriate variables such as a number of
packets received and forwarded while the manager can compare these variables
to determine whether the router is congested or not.
 Agents can also contribute to the management process.
 A server program on the agent checks the environment, if something goes wrong, the
agent sends a warning message to the manager.
Structure of Management Information (SMI)
 To use SNMP, we need rules for naming objects.
 SMI is a protocol that defines these rules.
 SMI is a guideline for SNMP

CN 2.1 JNNIE/CSE/R-22/III YR/CN


22CYT503- COMPUTER NETWORKS

 It emphasizes three attributes to handle an object: name, data type, and encoding
method.
 Its functions are:
1. To name objects.
2. To define the type of data that can be stored in an object.
3. To show how to encode data for transmission over the network.

Management Information Base (MIB)


The Management Information Base (MIB) is the second component used in network
management.
 Each agent has its own MIB, which is a collection of objects to be managed.
 MIB classifies objects under groups.

SNMP MESSAGES/PDU

GetRequest
The GetRequest PDU is sent from the manager (client) to the agent (server) to retrieve the
value of a variable or a set of variables.

GetNextRequest
The GetNextRequest PDU is sent from the manager to the agent to retrieve the value of a
variable.
GetBulkRequest
The GetBulkRequest PDU is sent from the manager to the agent to retrieve a large amount of
data. It can be used instead of multiple GetRequest and GetNextRequest PDUs.

CN 2.1 JNNIE/CSE/R-22/III YR/CN

You might also like