Module V
• Domain name system, Electronic Mail, Simple
Mail Transfer Protocol – File Transfer Protocol,
Hypertext Transfer Protocols.
Electronic Email
• Electronic mail (or e-mail) allows users to
exchange digital messages.
Architecture
1. User Agent
2. Message Transfer Agent
3. Message Access Agent
4. Web Based Email
Architecture
1. User Agent
2. Message Transfer Agent (SMTP)
3. Message Access Agent (POP & IMAP)
4. Web Based Email
First Scenario: User Agent
First Scenario
• Sender and receiver of the email are users on
the same system; they are directly connected
to a shared system.
• The administrator has created one mailbox
for each user where the received messages
are stored.
• In the example
• Alice runs a user agent program to prepare a
message and store it in Bob’s mailbox.
Second Scenario: User Agent and Message Transfer Agent
• In the second scenario, the sender and
receiver of the email are users of two different
systems.
• The message needs to be sent over an
internet.
• Alice needs to use a user agent program to
send her message to the system at her own
site.
• The system at her site uses a queue to store
messages waiting to be sent.
• Bob also needs a user agent program to
retrieve messages stored in the mailbox of the
system at the site.
• Here two message transfer agents are used
one at the client and the other at the server.
• Message transfer agent
It is used for transferring messages from one
MTA client to the other MTA server.
Third Scenario MTA
• When the sender is connected to the mail
server via a LAN or a WAN. The scenario needs
two user agents and two pairs of message
transfer agents(client and server).
Fourth scenario
• Both sender and receiver are connected to the
mail server via a LAN or a WAN, we need two
UAs, two pairs of MTAs (client and server), and
a pair of MAAs (client and server).
User Agent
• It provides service to the user to make the
process of sending and receiving easier.
1. Composing a message
2. Reading messages
3. Replying messages
4. Forwarding messages
5. Handling inboxes
Multipurpose Internet Mail Extension
7-bit Network virtual Terminal American
Standard Code for Information Interchange
• MIME is a kind of add-on or a supplementary
protocol that allows non-ASCII data to be sent
through SMTP. It allows the users to exchange
different kinds of data files on the Internet:
audio, video, images, application programs as
well.
1. MIME Version:
It specifies the MIME protocol version. This header typically has a parameter
value of 1.0, indicating that the message is MIME-formatted.
2. Content-Type:
It specifies the kind and subtype of data that will be transmitted in the message.
These communications can be of various sorts, including text, picture, audio, and
video, and they can also have several subtypes, such as png or jpeg. Similarly, the
Video subtype might be WEBM, MP4, and so forth.
3. Content Type Encoding:
This field specifies the technique used to transform mail information into ASCII or
Binary numbers, such as 7-bit encoding, 8-bit encoding, and so on.
4. Content ID:
A unique “Content Id” number is attached to every email messages in this field so
that they may be uniquely recognized.
5. Content Description:
This section includes a brief summary of the email’s content. This implies that the
“Content Description” clearly contains information about whatever is being
mailed. This field also contains data about the file’s name, creation date, and
modification date.
Message Transfer Agent: SMTP
• It is used for transferring messages from one
MTA client to the other MTA server.
The formal protocol that defines the MTA
client to the other MTA server in the internet
is Simple Mail Transfer Protocol.
SMTP Range
• SMTP is used two times, between the sender
and sender’s mail server and between the two
mail servers.
• SMTP defines how commands and responses
must be sent back and forth.
Commands and Responses
• SMTP uses commands and responses to
transfer messages between MTA client and
MTA Server.
Responses
• The responses are sent from the server to the
client. A response has a digital code may be
followed by a additional textual information.
Positive Completion Reply
Positive Intermediate Reply
Permanent Negative Completion Reply
Mail Transfer phases
• The process of mail transfer occurs through
three phases: connection establishment, mail
transfer and connection termination.
• MTA uses Push operation.
Message Access Agent: POP3 and
IMAP
• It is a Pull protocol; the client must pull the
message from the server.
• The direction of bulk data is from the server to
the client.
• This stage uses two message access agent.
• Post office protocol(POP3).
• Internet message Access Protocol (IMAP4).
Post office protocol(POP3).
Post office protocol(POP3).
• There are two modes in POP3 delete mode
and keep mode.
• Delete mode : The mail is deleted from the
mailbox after each retrieval.
• Keep mode the mail remains in the mailbox
after each retrieval.
• The delete mode works when the user is
working on his permanent computer.
• The keep mode works when the user is
working on an access away from the primary
access computer.
Internet message Access Protocol
(IMAP4).
1. A user can check the email header before
downloading.
2. A user can check the email or specific string
before downloading.
3. A user can partially download an email.
4. A user can create, delete or rename mail
boxes on the server.
5. A user can create hierarchy of mailboxes in a
folder.
Domain Name system
• Main purpose:
Translate hostnames to IP addresses.
The DNS protocol runs over UDP and uses
port 53.
• A name space which maps an unique name
can be organized into
Flat name space
Hierarchical name space
• Flat name space
A name is assigned to an address.
A name in this space is a sequence of
characters without structure .
The disadvantage of Flat name space is that it
cannot support large systems.
Hierarchical name space
• Hierarchical name space, each name is made
up of several parts.
• Example
[Link]
Domain name space
• To have a hierarchical name space, a domain
name space was designed.
• In this design the names are designed with an
inverted-tree structure with the root at the
top.
• The tree can have only 128 levels:
• level 0 ( ) root to level 127
Label
Each node in the tree has label, which is a
string with a maximum of 63 characters.
The root label is a null string.
DNS requires that children of a node have
different labels, which guarantees uniqueness
for the domain.
Note
• Each domain name should end with dot.
• Between the labels the dot specifies it is a
domain name.
• Root is a null string it has no dots.
root
Fully Qualified Domain Name
• If the label is terminated by null string it is
called Fully Qualified Domain Name.
Partially Qualified Domain Name
• If the label is not terminated by null string it is
called Partially Qualified Domain Name.
DISTRIBUTION OF NAME SPACE
• The information contained in the domain
name space must be stored. However, it is
very inefficient and also unreliable to have just
one computer store such a huge amount of
information.
• Hierarchy of Name Servers
• Zone
• Root Server
• Primary and Secondary Servers
Hierarchy of Name Servers
Hierarchy of Name Servers is to distribute the
information among many computers called
DNS servers.
Root stand alone server creates many sub
trees as first level nodes.
Primary and Secondary Servers
• DNS defines Primary Servers and Secondary
Servers.
• Primary Server is a server that stores a file
about the zone as its authority.
• It is responsible for creating, maintaining and
updating the zone file.
• Secondary Server
• A Secondary Server is a server that transfers
the complete information about a zone file
from another server and stores the file on its
local disk.
• Root server
A root server is a server whose zone consists
of the whole tree.
DNS in the Internet
• Generic Domains
• Country Domains
• Inverse domains
Generic Domains
It defines the registered hosts according to the
generic behaviour.
Generic Domains
Country domains: The country domain uses two character country abbreviations.
Inverse domain: It is used to map an address to a name
HTTP
• Hyper Text Transfer Protocol
HTTP is a protocol used mainly to
transfer the data in the www (world wide
web).
HTTP functions as a combination of FTP and
SMTP.
File Transfer Protocol
Simple Mail Transfer Protocol
HTTP works on TCP with port number 80.
• The HTTP protocol can be used to transfer the
data in the form of plain text, hypertext,
audio, video, and so on.
• 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.
• HTTP is used to carry the data in the form of MIME-like
format.
• Multipurpose Internet Mail Extension
Features of HTTP:
• 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.
• 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.
• 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.
File Transfer Protocol
• File Transfer Protocol (FTP) is a standard
network protocol used for the transfer of files
between a client and a server on a computer
network.
• FTP is used to upload and download files,
such as documents, images, and videos,
between computers on a network.
Terminology and modes of FTP
• 1. FTP client: An FTP client is a software
program that allows a user to upload and
download files from an FTP server.
• 2. FTP server: An FTP server is a software
program that runs on a computer and allows
clients to connect and transfer files.
• 3. FTP login: An FTP login is the process of
providing a username and password to gain
access to an FTP server.
4. FTP session: An FTP session is a connection
between an FTP client and an FTP server.
5. FTP commands: FTP commands are used to
control and manage the file transfer process
between the client and server. Common FTP
commands include PUT, GET, DELETE, and LIST.
FTP passive mode: FTP passive mode is a mode
in which the data connection between the
client and server is initiated by the client,
rather than the server. This mode is useful when
the client is behind a firewall.
• FTP active mode: FTP active mode is a mode
in which the data connection between the
client and server is initiated by the server,
rather than the client. This mode is the default
mode for FTP.
• Binary mode: Binary mode is a type of FTP
transfer mode that is used to transfer binary
files, such as images, videos, and executable
files.
• ASCII mode: ASCII mode is a type of FTP
transfer mode that is used to transfer text
files, such as documents and scripts.
HTTP
• User enter a URL (Uniform Resource Locator) in the
browser to visit a website?
• The browser fetches the IP address corresponding to
the entered URL using DNS (Domain Name System).
• Once the browser gets the IP address corresponding to
the entered URL, the browser sends a request to the
server at the backend (along with the IP address of the
website) to fetch the webpage of the website. In
return, the browser receives a response from the
server and this response contains the HTML (Hypertext
Markup Language) information of the webpage.
1. Extracting the IP address of a URL (Uniform
Resource Locator)
2. Sending request to the server to access the
webpage and receiving response
3. Receiving HTTP response and displaying the
webpage
• Request Line consists of
Request method
Request URL
HTTP Version
• Request Method A request method defines what type
of request is needed to send to the web server. For
example, if we want to fetch something from the web
server, we use a GET request method. If we want to
send something from the client to the web server, we
use POST request method.
• Request URI It is the the URI of the
website/destination we want to reach. For example
“[Link]
• HTTP Version It states the version of the HTTP we are
using. For example HTTP 1.0, HTTP 1.1.
• Response Status Line
• Response Headers
• Response Body
• Response Status Line
• An HTTP request line consists of 3 parts which are discussed below.
• HTTP Version It states the version of the HTTP we are using. For
example HTTP 1.0, HTTP 1.1.
• Status Code It is a three-digit code that tells the status of
the HTTP response. For example code 200 stands for a
successful HTTP response.
• Status Phrase It is a short description of the status code