0% found this document useful (0 votes)
15 views

DCCN Unit5

Uploaded by

srivastavbadam
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)
15 views

DCCN Unit5

Uploaded by

srivastavbadam
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/ 27

UNIT -5

Application Layer: Domain name space, DNS in internet, electronic mail, SMTP, FTP,WWW,
HTTP, SNMP.

Domain Name System

 Domain Name System is an Internet service that translates domain names into IP addresses.
 The DNS has a distributed database that resides on multiple machines on the Internet.
 DNS has some protocols that allow the client and servers to communicate with each other.
 When the Internet was small, mapping was done by using hosts.txt file.
 The host file was located at host's disk and updated periodically from a master host file.
 When any program or any user wanted to map domain name to an address, the host consulted
the host file and found the mapping.
 Now Internet is not small, it is impossible to have only one host file to relate every address with
a name and vice versa.
 The solution used today is to divide the host file into smaller parts and store each part on a
different computer.
 In this method, the host that needs mapping can call the closest computer holding the needed
information.
 This method is used in Domain Name System (DNS).

Name space

 The names assigned to the machines must be carefully selected from a name space with
complete control over the binding between the names and IP addresses.
 There are two types of name spaces: Flat name spaces and Hierarchical names.

Flat name spaces

 In a flat name space, a name is a sequence of characters without structure.


 A name in this space is assigned to an address.
 The names were convenient and short.
 A flat name space cannot be used in a large system such as the internet because it must be
centrally controlled to avoid ambiguity and duplication.

Hierarchical Name Space

 In hierarchical name space, each name consists of several parts.


 First part defines the nature of the organization, second part defines the name of an
organization, third part defines department of the organization, and so on.
 In hierarchical name space, the authority to assign and control the name spaces can be
decentralized.
 Authority for names in each partition is passed to each designated agent.

DNS in the Internet

 DNS is a protocol that can be used in different platform.


 Domain Name Space is divided into different sections in the Internet: Generic domain, country
domain and inverse domain.
Generic Domains

The generic domains define registered hosts according to their generic behavior.

Generic domain labels are as stated below:

1. Country Domains
 Country domain uses two character country abbreviations.
 Second labels can be more specific, national designation.
 For example, for Australia the country domain is “au”, Inida is .in, UK is .uk etc.

2. Inverse Domains
 Inverse domain is used to map an address to a name.
 For example, a client send a request to the server for performing a particular task, server finds a
list of authorized client. The list contains only IP addresses of the client.
 The server sends a query to the DNS server to map an address to a name to determine if the
client is on the authorized list.
 This query is called an inverse query.
 This query is handled by first level node called arpa.

Introduction to World Wide Web

 The World Wide Web (WWW) is a collection of documents and other web resources which are
identified by URLs, interlinked by hypertext links, and can be accessed and searched by
browsers via the Internet.
 World Wide Web is also called the Web and it was invented by Tim Berners-Lee in 1989.
 Website is a collection of web pages belonging to a particular organization.
 The pages can be retrieved and viewed by using browser.
Let us go through the scenario shown in above fig.

 The client wants to see some information that belongs to site 1.


 It sends a request through its browser to the server at site 2.
 The server at site 1 finds the document and sends it to the client.
Client (Browser):
 Web browser is a program, which is used to communicate with web server on the Internet.
 Each browser consists of three parts: a controller, client protocol and interpreter.
 The controller receives input from input device and use the programs to access the documents.
 After accessing the document, the controller uses one of the interpreters to display the document
on the screen.

Server:

 A computer which is available for the network resources and provides service to the other
computer on request is known as server.
 The web pages are stored at the server.
 Server accepts a TCP connection from a client browser.
 It gets the name of the file required.
 Server gets the stored file. Returns the file to the client and releases the top connection.

Uniform Resource Locater (URL)

 The URL is a standard for specifying any kind of information on the Internet.
 The URL consists of four parts: protocol, host computer, port and path.
 The protocol is the client or server program which is used to retrieve the document or file. The
protocol can be ftp or http.
 The host is the name of computer on which the information is located.
 The URL can optionally contain the port number and it is separated from the host name by a
colon.
 Path is the pathname of the file where the file is stored.
E-MAIL
One of the most famous network services is electronic mail (e-mail). The simple standard
mechanism for electronic mail on the internet. The first email systems simply consisted of file
transfer protocols.
But some of the limitations of this system were as follows−

 Sending a message to a group of people was inconvenient.


 Messages did not have many internet structures. So, its computer processing was
complex.
 The sender never knew if the message arrived or not.
 It was not easy to hand over one's email to someone else.
 The user interface was poorly integrated.
 It was impossible to create and send messages containing a text, drawing, facsimile and
voice together.
Email Architecture and Services
An e-mail system includes two subsystems as under:

 User agents
 Message transfer agents
User agents
They allow people to read message transfer agents.
They transfer the messages from the source to the destination.
Basic Functions
The E-mail system supports five basic systems, which are as follows:
Composition
The process of generating messages and answering them is called composition. The system can
also support assistance with addressing and several header fields attached to each message.
Transfer
It is the process of moving messages from the sender to the recipient. This includes establishing
a connection from the sender to a destination or some intermediate machine, outputting the
message and releasing the connection.
Reporting
This is to tell the sender whether the message was delivered or rejected, or lost.
Displaying
It is the process of displaying incoming messages. For this purpose, simple conversation and
formatting are required to be done.
Disposition
This is concerned with what the recipient does with the messages after receiving them. Some of
the possibilities are as follows −

 Throw after reading


 Throw before reading
 Save messages
 Forward messages
 Process messages in some other way
Advanced Features
Some of the advanced features of Email Systems included in addition to the essential functions
are as follows −

 It can be forwarding an email to a person away from his computer.


 It can create and destroy mailboxes to store incoming e-mail.
 It can inspect the contents of the mailbox, insert and delete messages from the mailboxes.
 It can send a message to a vast group of people using the mail list idea.
 It is used to provide a registered email.
 It is used for automatic notification of undelivered email.
 It is used to carbon copies.
 It is used to high priority email.
 It can make an alternative recipient.
Advantages of Email
There are various advantages of email, which are as follows:

 It is a cost-effective service to transmit with others as there are various email services
available to individuals and organizations for complimentary of cost. Once a customer is
online, it does not contain any additional charge for the services.
 Email supports a simple user interface and allows users to categorize and filter their
messages. This can help us to identify unwanted emails such as junk and spam mail.
 Emails are beneficial for broadcasting products. As email is a form of transmission,
organizations can involve many people and inform them quickly.
 Email exchanges can be saved for future retrieval, which allows users to keep essential
conversations or confirmations in their data and can be searched and retrieved when
needed quickly.
 Emails are beneficial for advertising products. An email is a form of transmission.
Organizations or companies can interact with many people and inform them in a short
time.
E-mail is represented as the transmission of messages on the Internet. It is one of the most
commonly used features over communications networks containing text, files, images, or other
attachments.
Format of E-mail− An e-mail includes three parts that are as follows−
E-mail Envelope
In modern e-mail systems, there is a distinction made between the e-mail and its contents. An e-
mail envelope contains the message, destination Address, Priority security level etc. The
message transport agents use this envelope for routing.
Message
The actual message inside the envelope is made of two parts

 Header
 Body
The header carries the control information while the Body contains the message contents. The
envelope and messages are shown in the figure below −
Message Formats
Let us understand the RFC 822 message format in an email.
Messages consist of a primitive envelope, some header fields and a blank line, and the message
body. Each header field logically includes a single line of ASCII text which contains the field
name, a colon and a field. RFC 822 is an old standard. Usually, the user agent builds a message
and passes it to be the message transfer agent with the user’s header fields to construct an
envelope.
The following table shows the principal header fields related to message transport.
RFC 822 header fields related to message transport

Header Meaning

To − E-mail address of primary recipients.


Header Meaning

Cc − E-mail address of secondary recipients.

BCC E-mail address for blind carbon copies.

From − Person who created the message.

Sender E-mail address of the actual sender.

Received Line inserted by each transfer agent along the route.

Return Patch It can use it to identify the path to the sender.

The To − field
The field gives the DNS address of the primary recipient. It is allowed to have multiple
recipients.
The Cc − field
This field gives the addresses of any secondary recipients.
The Bcc
The long form of Bcc is Blind Carbon Copy. This field is such as the Cc field, except that this is
removed from all the copies shared with the primary and secondary recipients. This feature
allows people to send copies to third parties without primary and secondary recipients knowing
this.
From − and Sender fields
These fields tell about who wrote the message and who sent the message, respectively, because
the person who creates the message and the person who sends it can be different.
The from the field is required, but the sender field can be omitted if it is the same as the one from
the field. These fields are required in case the message is undeliverable and is to be returned to
the sender.
Received field
A-line containing the Received field is added by each message transfer agent along the way. This
line carries the agent’s identity, date and time at which they received the message. It also
contains some other information that can be used to find bugs in the routing system.
The Return-Path− field
The final message transfer agent adds this field, and it is predetermined to tell how to receive
back to the sender. It can gather this information from all the received headers.
Other header fields
In addition to the field to table below, RFC 822 messages may contain various header fields used
by user agents or human recipients. Many of them are shown in the table below
Some fields in RFC 822 message header are as follows :

Header Meaning

Date: The date and time of the message.

Reply− To The E-mail address to which the reply is to be sent.

Message-Id: Message identifying number

In− Reply − To: Message-Id of the message to which this is a reply.

References: Other relevant messages identifying numbers.

Keywords: Keywords chosen by users.

Subject: Summary of the message for the one-line display.

The RFC 822 allows the users to invent new headers for their private use, but these headers must
start with the string X − Event of the week.
Message Body
The message body comes after the header. The users can put whatever they want to send in the
message body. It is possible to terminate the messages with ASCII cartoons, quotations, and
political statements.

SMTP
o SMTP stands for Simple Mail Transfer Protocol.
o SMTP is a set of communication guidelines that allow software to transmit an
electronic mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on e-
mail addresses.
o It provides a mail exchange between users on the same or different computers,
and it also supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between
servers. The servers have a way of identifying themselves and announcing what
kind of communication they are trying to perform. They also have a way of
handling the errors such as incorrect email address. For example, if the recipient
address is wrong, then receiving server reply with an error message of some kind.

Components of SMTP
o First, we will break the SMTP client and SMTP server into two components such
as user agent (UA) and mail transfer agent (MTA). The user agent (UA) prepares
the message, creates the envelope and then puts the message in the envelope.
The mail transfer agent (MTA) transfers this mail across the internet.

o SMTP allows a more complex system by adding a relaying system. Instead of just
having one MTA at sending side and one at receiving side, more MTAs can be
added, acting either as a client or server to relay the email.
o The relaying system without TCP/IP protocol can also be used to send the emails
to users, and this is achieved by the use of the mail gateway. The mail gateway is
a relay MTA that can be used to receive an email.
Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail
message using a Mail User Agent (MUA). Mail User Agent is a program which is
used to send and receive mail. The message contains two parts: body and header.
The body is the main part of the message while the header includes information
such as the sender and recipient address. The header also includes descriptive
information such as the subject of the message. In this case, the message body is
like a letter and header is like an envelope that contains the recipient's address.
2. Submission of Mail: After composing an email, the mail client then submits the
completed e-mail to the SMTP server by using SMTP on TCP port 25.
3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient
and domain name. For example, vivek@gmail.com, where "vivek" is the username
of the recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's
domain name, then MSA will send the mail to the Mail Transfer Agent (MTA). To
relay the email, the MTA will find the target domain. It checks the MX record from
Domain Name System to obtain the target domain. The MX record contains the
domain name and IP address of the recipient's domain. Once the record is
located, MTA connects to the exchange server to relay the message.
4. Receipt and Processing of Mail: Once the incoming message is received, the
exchange server delivers it to the incoming server (Mail Delivery Agent) which
stores the e-mail where it waits for the user to retrieve it.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by
using MUA (Mail User Agent). MUA can be accessed by using login and
password.

HTTP
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency
that allows us to use in a hypertext environment where there are rapid jumps
from one document to another document.
o HTTP is similar to the FTP as it also transfers the files from one host to another
host. But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no
control connection to transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The
HTTP differs from the SMTP in the way the messages are sent from the client to
the server and from server to the client. SMTP messages are stored and
forwarded while HTTP messages are delivered immediately.

Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates
a request and waits for a response from the server. When the server receives the
request, the server processes the request and sends back the response to the
HTTP client after which the client disconnects the connection. The connection
between client and server exist only during the current request and response
time only.
o Media independent: HTTP protocol is a media independent as data can be sent
as long as both the client and server know how to handle the data content. It is
required for both the client and server to specify the content type in MIME-type
header.
o Stateless: HTTP is a stateless protocol as both the client and server know each
other only during the current request. Due to this nature of the protocol, both
the client and server do not retain the information between various requests of
the web pages.
HTTP Transactions

The above figure shows the HTTP transaction between client and server. The client
initiates a transaction by sending a request message to the server. The server replies to
the request message by sending a response message.

Messages

HTTP messages are of two types: request and response. Both the message types follow
the same message format.

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.

23.4M

508

How to find Nth Highest Salary in SQL

Uniform Resource Locator (URL)


o A client that wants to access the document in an internet needs an address and
to facilitate the access of documents, the HTTP uses the concept of Uniform
Resource Locator (URL).
o The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
o The URL defines four parts: method, host computer, port, and path.
o Method: The method is the protocol used to retrieve the document from a
server. For example, HTTP.
o Host: The host is the computer where the information is stored, and the
computer is given an alias name. Web pages are mainly stored in the computers
and the computers are given an alias name that begins with the characters
"www". This field is not mandatory.
o Port: The URL can also contain the port number of the server, but it's an optional
field. If the port number is included, then it must come between the host and
path and it should be separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The path
itself contain slashes that separate the directories from the subdirectories and
files.

FTP
o FTP stands for File transfer protocol.
o FTP is a standard internet protocol provided by TCP/IP used for transmitting the
files from one host to another.
o 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.
o It is also used for downloading the files to computer from other servers.

Objectives of FTP
o It provides the sharing of files.
o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.
Why FTP?

Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems. For example, two systems may
have different file conventions. Two systems may have different ways to represent text
and data. Two systems may have different directory structures. FTP protocol overcomes
these problems by establishing two connections between hosts. One connection is used
for data transfer, and another connection is used for the control connection.
Mechanism of FTP

The above figure shows the basic model of the FTP. The FTP client has three
components: the user interface, control process, and data transfer process. The server
has two components: the server control process and the server data transfer process.
There are two types of connections in FTP:

o Control Connection: The control connection uses very simple rules for
communication. 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.
o 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.

FTP Clients
o FTP client is a program that implements a file transfer protocol which allows you
to transfer files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files
between you and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser. This
GUI based FTP client makes the file transfer very easy and also does not require
to remember the FTP commands.

Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the
fastest way to transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to
get the entire file.
o Security: To access the FTP server, we need to login with the username and
password. Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth.
Suppose you are a manager of the company, you send some information to all
the employees, and they all send information back on the same server.

Disadvantages of FTP:
o The standard requirement of the industry is that all the FTP transmissions should
be encrypted. However, not all the FTP providers are equal and not all the
providers offer encryption. So, we will have to look out for the FTP providers that
provides encryption.
o FTP serves two operations, i.e., to send and receive large files on a network.
However, the size limit of the file is 2GB that can be sent. It also doesn't allow you
to run simultaneous transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted
eavesdropping. So, it is quite possible that attackers can carry out the brute force
attack by trying to guess the FTP password.
o It is not compatible with every system.

SNMP
o SNMP stands for Simple Network Management Protocol.
o SNMP is a framework used for managing devices on the internet.
o It provides a set of operations for monitoring and managing the internet.

SNMP Concept
o SNMP has two components Manager and agent.
o The manager is a host that controls and monitors a set of agents such as routers.
o It is an application layer protocol in which a few manager stations can handle a
set of agents.
o The protocol designed at the application level can monitor the devices made by
different manufacturers and installed on different physical networks.
o It is used in a heterogeneous network made of different LANs and WANs
connected by routers or gateways.

Managers & Agents


o A manager is a host that runs the SNMP client program while the agent is a
router that runs the SNMP server program.
o Management of the internet is achieved through simple interaction between a
manager and agent.
o The agent is used to keep the information in a database while the manager is
used to access the values in the database. 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.
o 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.

Management with SNMP has three basic ideas:


o A manager checks the agent by requesting the information that reflects the
behavior of the agent.
o A manager also forces the agent to perform a certain function by resetting values
in the agent database.
o An agent also contributes to the management process by warning the manager
regarding an unusual condition.

Management Components
o Management is not achieved only through the SNMP protocol but also the use of
other protocols that can cooperate with the SNMP protocol. Management is
achieved through the use of the other two protocols: SMI (Structure of
management information) and MIB(management information base).
o Management is a combination of SMI, MIB, and SNMP. All these three protocols
such as abstract syntax notation 1 (ASN.1) and basic encoding rules (BER).

SMI

The SMI (Structure of management information) is a component used in network


management. Its main function is to define the type of data that can be stored in an
object and to show how to encode the data for the transmission over a network.

MIB
o The MIB (Management information base) is a second component for the network
management.
o Each agent has its own MIB, which is a collection of all the objects that the
manager can manage. MIB is categorized into eight groups: system, interface,
address translation, ip, icmp, tcp, udp, and egp. These groups are under the mib
object.

SNMP

SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,


GetResponse, and Trap.
GetRequest: The GetRequest message is sent from a manager (client) to the agent
(server) to retrieve the value of a variable.

GetNextRequest: The GetNextRequest message is sent from the manager to agent to


retrieve the value of a variable. This type of message is used to retrieve the values of the
entries in a table. If the manager does not know the indexes of the entries, then it will
not be able to retrieve the values. In such situations, GetNextRequest message is used to
define an object.

GetResponse: The GetResponse message is sent from an agent to the manager in


response to the GetRequest and GetNextRequest message. This message contains the
value of a variable requested by the manager.

SetRequest: The SetRequest message is sent from a manager to the agent to set a
value in a variable.

Trap: The Trap message is sent from an agent to the manager to report an event. For
example, if the agent is rebooted, then it informs the manager as well as sends the time
of rebooting.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy