[go: up one dir, main page]

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

Unit - 4 Network Applications

The document discusses the Domain Name System (DNS), including DNS basics, characteristics, how DNS works, and the DNS hierarchy. It explains that DNS translates domain names to IP addresses, allowing users to access websites with human-readable names rather than numeric addresses. The DNS hierarchy has a root level and uses top-level domains and subdomains to organize domain names.
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)
38 views29 pages

Unit - 4 Network Applications

The document discusses the Domain Name System (DNS), including DNS basics, characteristics, how DNS works, and the DNS hierarchy. It explains that DNS translates domain names to IP addresses, allowing users to access websites with human-readable names rather than numeric addresses. The DNS hierarchy has a root level and uses top-level domains and subdomains to organize domain names.
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/ 29

Unit-4 - Network Applications

1. Domain Name System:


 DNS Basics
 Characteristics
 Working of DNS
 DNS Hierarchy
2. File Transfer Protocol:
 FTP Basics
 FTP Modes
 FTP Commands
3. Email:
 Email Basics
 Email Structure
 How Email Works?
4. Email Protocol:
 SMTP, IMAP, MIME and POP
5. HTTP Protocol & UDP Protocol

1|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


Domain Name System: DNS Basics, Characteristics, Working Of DNS, DNS
Hierarchy.

DNS Basics
The Domain Name System (DNS) is an application–layer protocol that is part of the standard
TCP/IP protocol suite. This protocol implements the DNS naming service, which is the naming
service used on the Internet.

This section introduces the basic DNS concepts. It assumes that you have some familiarity with
network administration, particularly TCP/IP, and some exposure to other naming services, such as
NIS+ and NIS.

What is DNS?
The Domain Name System (DNS) is the phonebook of the Internet. Humans access information
online through domain names, like nytimes.com or espn.com. Web browsers interact through
Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load
Internet resources.

Each device connected to the Internet has a unique IP address which other machines use to find the
device. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1
(in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2
(in IPv6).

2|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


Domain Name System helps to resolve the host name to an address. It uses a hierarchical naming
scheme and distributed database of IP addresses and associated names

IP Address
IP address is a unique logical address assigned to a machine over the network. An IP address
exhibits the following properties:

 IP address is the unique address assigned to each host present on Internet.


 IP address is 32 bits (4 bytes) long.
 IP address consists of two components: network component and host component.
 Each of the 4 bytes is represented by a number from 0 to 255, separated with dots. For
example 137.170.4.124

IP address is 32-bit number while on the other hand domain names are easy to remember names.
For example, when we enter an email address we always enter a symbolic string such as
webmaster@tutorialspoint.com.
Characteristics of DNS
The Domain Name System allows you to access remote systems by entering human-readable device
host names rather than IP addresses. DNS works by creating a mapping between a domain name,
such as “www.alliedtelesis.com”, and its IP address. These mappings are held on DNS servers.
DNS translates meaningful domain names into IP addresses for networking equipment to locate and
address these devices. The characteristics of DNS are given bellow:

Simple yet Powerful


What make Simple DNS Plus "simple" is its easy-to-use user interface and automation features.It
provides wizards for common tasks such as setting up new zones, importing data, making bulk
updates, etc.Simple DNS Plus is a very capable and full featured DNS server, and it has plenty of
options for expert users to tweak it just the way they want.

Authoritative and Recursive (resolver and cache) DNS server


All the DNS server features and functionality you need to host DNS for domain names, assign
domain name to computers and devices for easy access, create and delegate sub-domains, resolve
other domain names on the Internet, speed up Internet access with centralized DNS caching, etc.

High performance DNS server engine and user interface


Great for hosting and managing anywhere from a few domains to +100,000 domains, the user
interface is optimized to handle really large domain name portfolios.

Highly configurable
Simple DNS Plus has options to configure all aspects of the DNS services, including many unique
but important options not found in competing products such as the ability to limit recursion by IP
address. Of course the software comes preconfigured with settings that are appropriate for most
users.

3|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


Remote Management / Windows Server Core
The Simple DNS Plus user interface can be run on a desktop computer connecting to a remote
Simple DNS Plus server, making it easy and fast to manage the server without Remote Desktop,
VNC, or similar.

Direct support for dynamic IP clients


Simple DNS Plus supports TSIG authenticated dynamic DNS updates.This update method is more
efficient than the HTTP based and other proprietary update methods typically used because it
happens directly via the DNS protocol.Several dynamic IP updater applications can be used with
this.Setup tutorials are provided for DynSite and DirectUpdate.

Full support for IDNs (internationalized domain names)


In Simple DNS Plus you can enter domain names with native characters directly (no punycode
conversion needed), and have an option to display native character or punycoded domain names
anywhere in the user interface, and quickly switch between these modes.

Working Of DNS
DNS Definition
The domain name system (DNS) connects URLs with their IP address. With DNS, it’s possible to
type words instead of a string of numbers into a browser, allowing people to search for websites and
send emails using familiar names.

The internet is a huge network of computers. Each device connected to the internet is assigned a
unique IP address which helps other computers identify it.This IP address is a string of numbers
with periods that looks like this: 192.124.249.166

Now imagine if you had to remember such long strings of numbers to visit your favorite websites.
They are hard to remember and don’t tell you anything about the website you’ll see if you enter
them in a browser.

Domain names were invented to solve this problem by using alphabets and allowing users to select
easy to remember names for their websites.

DNS or Domain Name System basically translates those domain names into IP addresses and points
your device in the right direction.A domain name and its matching IP address is called a “DNS
record”.

Here is a simple way to understand how DNS works in four steps.

4|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


Suppose you want to visit our site at www.wpbeginner.com.

1. You open your browser and type www.wpbeginner.com in the address bar and hit Enter on the
keyboard. Immediately there is a quick check to see if you have visited our website previously.

If the DNS records are found in your computer’s DNS cache, then the rest of the DNS lookup is
skipped and you will be taken directly to www.wpbeginner.com.

2. If no DNS records are found, then a query is sent to your local DNS server. Typically this is your
Internet provider’s server and is often called a “resolving nameserver”.

3. If the records are not cached on the resolving nameserver, then the request is forwarded to what’s
called a “root nameserver” to locate the DNS records. Root nameservers are designated servers
around the world that are responsible for storing DNS data and keeping the system working
smoothly. Once the DNS record is found on the root nameserver, it’s cached by your computer.

4. Now that the DNS records are located, a connection to the server where the website is stored will
be opened and www.wpbeginner.com will be displayed on your screen.

DNS Hierarchy
5|P ag e SHREE ADARSH BCA COLLEGE - BOTAD
A DNS server is also a web server. Its primary objective is to interact with the aforementioned
database. These DNS servers translate the domain name entered into the URL area of a web
browser to the corresponding IP address. There are thousands of DNS servers worldwide which
form the Domain Name System which currently is the largest digital database.

DNS uses a hierarchy to manage its distributed database system. The DNS hierarchy, also called the
domain name space, is an inverted tree structure, much like Tree Directory.

The DNS tree has a single domain at the top of the structure called the root domain. A period or
dot (.) is the designation for the root domain. Below the root domain are the top-level domains that
divide the DNS hierarchy into segments.

Listed below are the top-level DNS domains and the types of organizations that use them. Below
the top-level domains, the domain name space is further divided into sub domains representing
individual organizations.

The DNS hierarchy is comprised of the following elements:


1) Root Level
2) Top Level Domains
3) Second Level Domains
4) Sub-Domain
5) Host

DNS Root Level


The DNS root zone is the highest level in the DNS hierarchy tree. The root name server is the name
server for the root zone. It answers the requests for records in the root zone and answers other
requests by providing a list of authoritative name servers for the appropriate TLD (top-level
domain). The root nameservers are very important because they are the first step in resolving a

6|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


domain name. These are the authoritative nameservers which serve the DNS root zone. These
servers contain the global list of the top-level domains. The root zone contains the following:

1) Organizational hierarchy such as .com, .net, .org.


2) Geographic hierarchy such as .uk, .fr, .pe.

Top Level Domains


Here, the “.com” is the top-level domain. It is called as tld in short. This is the next component in
the DNS hierarchy. A TLD can have many domains under it. For example, a .com tld can have
linux.com, centos.com, ubuntu.com, etc.
The next level in the DNS hierarchy is Top level domains. There are many TLDs available at the
moment. As we have seen the TLDs are classified as two sub categories. They are organizational
hierarchy and geographic hierarchy. Let us see each in detail.

Table. Top-Level DNS Domains

Domain Used by

.com Commercial organizations, as in novell.com

.edu Educational organizations, as in ucla.edu

.gov Governmental agencies, as in whitehouse.gov

.mil Military organizations, as in army.mil

.org Nonprofit organizations, as in redcross.org

.net Networking entities, as in nsf.net

.int International organizations, as in nato.int

Additional top-level domains organize domain name space geographically. For example, the top-
level domain for France is fr. DNS Hierarchy illustrates the DNS hierarchy.

7|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


Second Level Domains
The next level in the DNS hierarchy is the Second Level Domains. This is the domain that is
directly below the TLD (top-level domain). This is the main part of the domain name. It can vary
according to the buyer. There are no limits here as the tlds. Once the domain is available anyone
can purchase it. If the domain is unavailable at the moment, same 2nd level name with other tlds is
the best option.

Sub-domain
The sub-domain is the next level in the DNS hierarchy. The sub-domain can be defined as the
domain that is a part of the main domain. The only domain that is not also a sub-domain is the root
domain. Suppose two domains. one.example.com and two.example.com. Here, both the domains
are the sub-domains of the main domain example.com and the example.com is also a subdomain of
the com top level domain.

File Transfer Protocol: FTP Basics, FTP Modes, FTP Commands


What Is File Transfer Protocol (FTP)?
File transfer protocol (FTP) is a set of rules that computers follow for the transferring of files from
one system to another over the internet. It may be used by a business to transfer files from one
computer system to another, or websites may use FTP to upload or download files from a website's
server.
FTP Basics
FTP stands for 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.

 FTP is a client-server protocol where a client will ask for a file, and a local or remote server
will provide it.
 The end-users machine is typically called the local host machine, which is connected via the
internet to the remote host—which is the second machine running the FTP software.
 Anonymous FTP is a type of FTP that allows users to access files and other data without
needing an ID or password. Some websites will allow visitors to use a guest ID or
password- anonymous FTP allows this.
 File transfer protocol (FTP) is a way to download, upload, and transfer files from one
location to another on the internet and between computer systems.
 File transfer protocol (FTP) enables computers on the internet to transfer files back and
forth, and is an essential tool for those building and maintaining websites today.
 Many file transfer protocol (FTP) clients are available for free to download, although most
websites (and web browsers) that offer downloads already have the FTP built-in, so
downloading a separate piece of software isn't always required.

Objectives of FTP
 It provides the sharing of files.
 It is used to encourage the use of remote computers.

8|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


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

What is control connection?


For sending control information like user identification, password, commands to change the remote
directory, commands to retrieve and store files, etc., FTP makes use of control connection. The
control connection is initiated on port number 21.

What is data connection?


For sending the actual file, FTP makes use of data connection. A data connection is initiated on port
number 20.
FTP sends the control information out-of-band as it uses a separate control connection. Some
protocols send their request and response header lines and the data in the same TCP connection. For
this reason, they are said to send their control information in-band. HTTP and SMTP are such
examples.

FTP Modes
FTP may operate in an active or a passive mode, which determines how a data connection is
established. In both cases, a client creates a TCP control connection to an FTP server command port
21. This is a standard outgoing connection, as with any other file transfer protocol (SFTP, SCP,
WebDAV) or any other TCP client application (e.g. web browser). So, usually there are no
problems when opening the control connection.

Where FTP protocol is more complicated comparing to the other file transfer protocols are file
transfers. While the other protocols use the same connection for both session control and file (data)
transfers, the FTP protocol uses a separate connection for the file transfers and directory listings.

9|P ag e SHREE ADARSH BCA COLLEGE - BOTAD


OR

Active mode FTP

In the active mode, the client starts listening on a random port for incoming data connections from
the server (the client sends the FTP command PORT to inform the server on which port it is
listening). Nowadays, it is typical that the client is behind a firewall (e.g. built-in Windows firewall)
or NAT router (e.g. ADSL modem), unable to accept incoming TCP connections.

Among the two modes, Active mode is the older one. It was the mode introduced in the early days
of computing when mainframes were more common and attacks to information security were not as
prevalent.

Here's a simplified explanation on how an active mode connection is carried out, summarized in
two steps. Some relevant steps (e.g. ACK replies) have been omitted to simplify things.

10 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


1. A user connects from a random port on a file transfer client to port 21 on the server. It sends
the PORT command, specifying what client-side port the server should connect to. This port
will be used later on for the data channel and is different from the port used in this step for
the command channel.
2. The server connects from port 20 to the client port designated for the data channel. Once
connection is established, file transfers are then made through these client and server ports.

Passive mode FTP


In the passive mode, the client uses the control connection to send a PASV command to the server
and then receives a server IP address and server port number from the server, which the client then
uses to open a data connection to the server IP address and server port number received.

In passive mode, the client still initiates a command channel connection to the server. However,
instead of sending the PORT command, it sends the PASV command, which is basically a request
for a server port to connect to for data transmission. When the FTP server replies, it indicates what
port number it has opened for the ensuing data transfer.

Here's how passive mode works in a nutshell:

1. The client connects from a random port to port 21 on the server and issues the PASV
command. The server replies, indicating which (random) port it has opened for data
transfer.
2. The client connects from another random port to the random port specified in the server's
response. Once connection is established, data transfers are made through these client and
server ports.

FTP Commands
11 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD
FTP (File Transfer Protocol) is a standard network protocol used to exchange files between
computers on a private network or through the Internet. There are three ways in which FTP is
commonly accessed:
1. Command-line FTP client.
2. Web browser.
3. Graphical FTP clients.

The first two are straightforward methods that allow you to directly use a Web browser (such as
Google Chrome, Firefox, Internet Explorer) or an FTP client application to connect to the FTP
server to exchange files. Using the command-line interface, you need to enter a set of commands to
send or receive files from other computers.

Windows, Mac OS X, and Linux operating systems have built-in command-line clients that can be
used for establishing an FTP connection. To initiate an FTP connection from Windows, type ftp at
the command prompt, and press enter.Here is a list of the most commonly used FTP commands in
the Windows command-line prompt.

FTP commands

USER: User name


This command sends the user identification to the server. The user identification is that which is
required by the server for access to its file system. This command will normally be the first
command transmitted by the user after the control connections are made (some servers may
require this).

PASS: Password
This command sends the user password to the server. This command must be immediately preceded
by the user name command, and, for some sites, completes the user's identification for access
control. The password is case sensitive.

CWD (CD): change working directory


This command allows the user to work with a different directory or dataset for file storage or
retrieval without altering his login or accounting information.

SMNT: structure mount


This command allows the user to mount a different file system data structure without altering his
login or accounting information. Transfer parameters are similarly unchanged.

QUIT (BYE): logout


This command terminates a USER and if file transfer is not in progress, the server closes the control
connection. If file transfer is in progress, the connection will remain open for result response and
the server will then close it.

PORT: data port


The argument is a HOST-PORT specification for the data port to be used in data connection. There
are defaults for both the user and server data ports, and under normal circumstances this command
and its reply are not needed.
12 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD
PASV: passive
This command requests the server-DTP to "listen" on a data port (which is not its default data port)
and to wait for a connection rather than initiate one upon receipt of a transfer command. The
response to this command includes the host and port address this server is listening on.

MODE: transfer mode


The default transfer mode is S for Stream. It is possible to change to block or compressed mode.

ALLO: allocate
This command may be required by some servers to reserve sufficient storage to accommodate the
new file to be transferred.

RNTO: rename to
This command specifies the new pathname of the file specified in the immediately preceding
"rename from" command. Together the two commands cause a file to be renamed.

DELE: delete
This command causes the file specified in the pathname to be deleted at the server site.

RMD: remove directory


This command causes the directory specified in the pathname to be removed as a directory (if the
pathname is absolute) or as a subdirectory of the current working directory (if the pathname is
relative).

MKD: make directory


This command causes the directory specified in the pathname to be created as a directory (if the
pathname is absolute) or as a subdirectory of the current working directory (if the pathname is
relative).

PWD: print working directory


This command causes the name of the current working directory to be returned in the reply.

LIST: list
This command causes a list to be sent from the server to the passive DTP. If the pathname specifies
a directory or other group of files, the server should transfer a list of files in the specified directory.
If the pathname specifies a file then the server should send current information on the file

SYST: system
This command is used to find out the type of operating system at the server.

STAT: status
This command shall cause a status response to be sent over the control connection in the form of a
reply.

HELP: help
This command shall cause the server to send helpful information regarding its implementation
status over the control connection to the user. The command may take an argument (e.g. any
command name) and return more specific information as a response.

13 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


Advantages of FTP:
 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.
 Efficient: It is more efficient as we do not need to complete all the operations to get the
entire file.
 Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
 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:
 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 provide encryption.
 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.
 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.
 It is not compatible with every system.

Email: Email Basics, Email Structure, How Email Works?


Electronic mail, or email for short, is an online message delivery system. It delivers private
messages to individuals and groups. These messages are delivered to the recipient’s email inbox,
usually within seconds. You can attach files to email messages and even put images within the
message body.

E-Mail Address
Each user of email is assigned a unique name for his email account. This name is known as E-mail
address. Different users can send and receive messages according to the e-mail address.

E-mail is generally of the form username@domainname. For example,


webmaster@tutorialspoint.com is an e-mail address where webmaster is username and
tutorialspoint.com is domain name.

 The username and the domain name are separated by @ (at) symbol.
 E-mail addresses are not case sensitive.
 Spaces are not allowed in e-mail address.

Email Structure

14 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


There is a standard structure for emails. Email contents are primarily classified as two, the header
and the body. E-mail message comprises of different components: E-mail Header, Greeting, Text,
and Signature. These components are described in the following diagram:

The Header
The email header gives us common details about the message such as the unique identity of the
message. The details of the users of the ‘from’ and ‘to’ ends are also stored here. The email header
consists of the following parts. However, the exact contents of the header can vary according to the
email systems that generate the email message.

1) Subject

2) Sender (From:)

3) Date and time received (On)

4) Reply-to

5) Recipient (To:)

6) Recipient email address

7) Attachments

8) CC

15 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


9) BCC

Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point. The subject
part is the topic of the message. In most email systems, if the content view of the folders is set to
view each messages separately, the subject part also will be visible with the user’s name. These
subject fields are scanned by the spam scanners to evaluate the messages.

Sender (From:)
The from field indicates the sender’s address i.e. who sent the e-mail. This will specify the sender’s
email address.

Date and time received (On)


This is the date and time the message received. The Date field indicates the date when the e-mail
was sent.

Reply-to
This field describes the email address that will become the recipient of the reply to the particular
email. When you reply, it will go to this email address despite the sender email address.

Recipient (To:)
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.

Recipient email address


The email address of the recipient is specified here.

Attachments
Some emails could be attached with files such as text, image, audio, video etc. These files are
specified here.

CC: CC stands for Carbon copy. This is optional. The people who were mailed copies of the
message. The recipients of the message will know to whom all the copies have been sent.

BCC: Its stands for Black Carbon Copy. Itis used when we do not want one or more of the
recipients to know that someone else was copied on the message. This is optional.

Body
The actual content is stored in this part. This will be in the format of text. The email body is the
main part of anemail message. It contains the message’s text, images and other data (such as
attachments). The email’s body is distinct from its header, which contains control information and
data about the message (such as its sender, the recipient and the path an email took to reach its
destination).

Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.

16 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


Text
It represents the actual content of the message.

Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.

Advantages:
• Reliable: Because it notifies the senderif not delivered.

• Speed: E-mail is very fast delivered infraction of seconds.

• Inexpensive: Its very cheap.

• Waste Reduction: Helps in paperless communication thus eco-friendly.

Global: E-mail can be sent and received by a person sitting across the globe.

Generality: It is also possible to send graphics, programs and sounds with an e-mail.

Disadvantages:
• Forgery: Anyone who hacks thepassword of the sender can send a message to
anyone.

• Overload: Because it is cheap loadsand loads of messages keeps coming.

• Junk: Junk emails are not intendedmails and is inappropriate also. Junk emails are
sometimes referred to as spam.

Misdirection: It is possible that you may send e-mail to an unintended recipient.

No Response: It may be frustrating when the recipient does not read the e-mail and respond on a
regular basis.

How Email Works


The moment an email is sent, a message is routed from server to server via the Simple Mail
Transfer Protocol until it makes its way to from the client to the email recipients email server.

The diagram down below describes the path that email takes from your computer to the intended
recipient . This shows the path of the email from sending to receiving ends. There are also many
logical machines in the email delivery process. Please have a look at the diagram before proceeding.

17 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


 First the sender needs to enter the email address of the recipient along with the message
using an email application. This should be done at the local computers. Once it is finished
and the “Send” button is clicked, the email will be going to the MTA (The Mail Transfer
Agent). This communication is done via the SMTP protocol.
 The next step is DNS lookup. The system sends a request to find out the corresponding
MTA of the recipient. This will be done with the help of the MX record. In the DNS zone,
for the receiver address’ domain, there will be an MX record (stands for Mail Exchanger
record).
 The next step is transferring the message between the mail servers. The SMTP protocol is
used for this communication. Now our message is with the recipient mail server (MTA).
 Now, this message is transferred to the Mail Delivery Agent and then it is transferred to the
recipient’s local computer.As we have seen earlier, two protocols can be used here.
 If we use POP3, then the whole email will be downloaded to the local computer and the
copy at the server gets deleted.
 If the protocol used is IMAP, then the email message is stored in the mail server itself, but
the user can easily manipulate the emails on the mail server as in the local computer.
 This is the difference when using both the protocols and this is how your email gets
delivered. If some error occurred to send the email, the emails will be delayed.
 There is a mail queue in every mail server. These mails will be pending in the mail queue.
The mail server will keep trying to resend the email. Once the email sending fails
permanently, the mail server may send a bounce back email message to the sender’s email
address.

Email Protocol: SMTP, IMAP, MIME and POP


What Is Email Protocol?
Email protocol is a method by which a communication channel is established between two
computers and email is transferred between them. When an email is transferred, a mail server and
18 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD
two computers are involved. One computer sends the mail and the other one receives it. The mail
server stores the mail and lets the receiving device access it and download it if needed. There are
four different mail protocols. These protocols differ in the way by which they establish connections
and allow user access to emails.

POP3 (Post Office Protocol 3)


POP stands for Post Office Protocol. It is generally used to support a single client. There are several
versions of POP but the POP 3 is the current standard.

 Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive emails
from a remote server to a local email client.
 POP3 allows you to download email messages on your local computer and read them even
when you are offline.
 Note, that when you use POP3 to connect to your email account, messages are downloaded
locally and removed from the email server.
 This means that if you access your account from multiple locations that may not be the best
option for you.
 On the other hand, if you use POP3, your messages are stored on your local computer,
which reduces the space your email account uses on your web server.

By default, the POP3 protocol works on two ports:

Port 110 – this is the default POP3 non-encrypted port;

Port 995 – this is the port you need to use if you want to connect using POP3 securely.

Function of POP:

 Retrieve message from an ISP and whether to delete or not to delete it on the server,
depends on users’ decision.
 Detect whether new message has arrived but not retrieving it from the server, meaning the
messages will be stored at the server until the user choose to retrieve it from the server.

 To see whether the message is worth retrieving, POP will peek at the few sentences of the
message before retrieving it.

IMAP (Internet Message Access Protocol)


 This stands for Internet Message Access Protocol.This is a standard protocol used for email
transfer by users.
 Like POP3, it also supports both online and offline modes of email access.
 The email message is downloaded to the user's machine only when a specific request is
made to read it.
 Users can download mails to their computers while keeping a copy on the server.
 The mails on the server are the primary copy and anything changed on the local machine is
updated by what is on the server.
 IMAP provides powerful search capability for savvy email users to search for emails in
server. This is useful, as the mails need not be downloaded--saving time for users.

19 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


 Users can also create new mailboxes which are shown as folders on the server, and move
messages between folders. This feature allows access to shared and public folders.
 It is a pull protocol.

Gmail is an example of a mail server which uses IMAP protocol. Email clients like Microsoft
Outlook may be used to access these emails directly on the server and the local machine after
downloading. Again, users may use IE to access these emails.

By default, the IMAP protocol works on two ports:

 Port 143 – this is the default IMAP non-encrypted port;


 Port 993 – this is the port you need to use if you want to connect using IMAP securely.

SMTP (Simple Mail Transfer Protocol)


 SMTP is a set of communication guidelines that allow to transmit an e-mail over the
internet.
 It is a program used for sending messages to other computer users based on e-mail
addresses.
 The main purpose of SMTP is used to set up communication rules between servers.
 It is an application layer protocol.
 SMTP uses TCP at the transport layer.
 SMTP uses TCP port number 25 and port 465.
 SMTP is a connection oriented protocol.
 It is also known as a push protocol.


 As the name suggests, SMTP is a simple, text-based protocol that works best when devices
are interconnected to each other. However, SMTP protocol can only be used to send emails.
 Unlike POP3 and IMAP protocols, SMTP does not provide the functionality to the users to
retrieve emails from the server.

20 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


 This limits the use of SMTP to some extent. To overcome this problem, SMTP provides a
feature to queue mails on a server so that the messages bound for the receiving system could
be delivered.
 One of the main issues with SMTP is the lack of sender email authentication. SMTP lacks
security features too and thus users get spam emails.

UNIX systems and simple applications like "mailsend" make use of SMTP protocol. Commercial
applications don't use SMTP to a great extent.

The default ports for SMTP are:

 Port 25 – This is the default non-encrypted port.


 Port 465/ 587 – This is default port for secure connections.

Functions of SMTP:
To enable the client side to send email message to a receiver (an email address which already exist),
SMTP would perform the following functions:
1. User authentication
To verify the sender who is using SMTP server to send an email message has the right to do
so.
2. User notification
 After delivering the message to the destination, SMTP will check whether the message has
been successfully delivered.
 If the message does not delivered successfully, SMTP notifies sender by using an error
messages and the message that was not successfully delivered will be delivered back to the
sender.

Multi-purpose Internet Mail Extension (MIME)

21 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


MIME is an extension which allows users to use the protocol to send different kinds of data files on
the Internet, for example: audio file, image file (PNG, GIF, JPEG), video or even application
programs. SMTP protocol only handled ASCII text, which means, only ASCII texts can be send
through the protocol. Media type of content in email is described by MIME type, some of the
examples for MIME types are:
 Plain text: txt/plain
 Java applets: application/x-java-applet
 Adobe PDF documents: application/ pdf

Purpose and Functionality of MIME –

Growing demand for Email Message as people also want to express in terms of Multimedia. So,
MIME another email application is introduced as it is not restricted to textual data.

MIME transforms non-ASCII data at sender side to NVT 7-bit data and delivers it to the client
SMTP. The message at receiver side is transferred back to the original data. As well as we can send
video and audio data using MIME as it transfers them also in 7-bit ASCII data.

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.

HTTP Protocol & UDP Protocol


HTTP Protocol
HTTP stands for Hyper Text Transfer Protocol. It is introduce by Tim Berners Lee. HyperText
is the type of text which is specially coded with the help of some standard coding language called as
HyperText Markup Language (HTML). HTTP/2 is latest version of HTTP, which was published
on May 2015.

 The protocols that are used to transfer hypertext between two computers is known as
HyperText Transfer Protocol.
 It is an application layer protocol.
 HTTP provides standard between a web browser and web server to establish
communication.
 It is set of rules for transferring data from one computer to another. Data such as text,
images file,HTML files, query results, etc. and other multimedia files are shared on the
World Wide Web.
 Whenever a web user opens their web browser, user will indirectly uses HTTP. It is an
application protocol which is used for distributed, collaborative, hypermedia information
systems.

Purpose-

 It is mainly used for the retrieval of data from websites throughout the internet.

22 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


 It works on the top of TCP/IP suite of protocols.

History:
Tim Berners Lee and his team at CERN gets credit for inventing original HTTP and associated
technologies.

1. HTTP version 0.9 –

This was first version of HTTP which was introduced in 1991.

2. HTTP version 1.0 –

In 1996, RFC 1945 (Request For Comments) was introduced in HTTP version 1.0.

3. HTTP version 1.1 –

In January 1997, RFC 2068 was introduced in HTTP version 1.1. Improvements and
updates to HTTP version 1.1 standards were released under RFC 2616 in June 1999.

4. HTTP version 2.0 –

The HTTP version 2.0 specifications were published as RFC 7540 on May 14, 2015.

5. HTTP version 3.0 –

HTTP version 3.0 is based on previous RFC draft. It is renamed as HyperText Transfer
Protocol QUIC which is a transport layer network protocol developed by Google.

How it works?
First of all, whenever we want to open any website then first we open web browser after that we
will type URL of that website (e.g., www.facebook.com ). This URL is now sent to Domain Name
Server (DNS). Then DNS first check records for this URL in their database, then DNS will return
IP address to web browser corresponding to this URL. Now browser is able to sent request to actual
server.
After server sends data to client, connection will be closed. If we want something else from server
we should have to re-establish connection between client and server.

23 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


Whenever a client requests some information (say clicks on a hyperlink) to the website server, the
browser sends a request message to the HTTP server for the requested objects.Then-

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

Basic Architecture
The following diagram shows a very basic architecture of a web application and depicts where
HTTP sits:

The HTTP protocol is a request/response protocol based on the client/server based architecture
where web browsers, robots and search engines, etc. act like HTTP clients, and the Web server acts
as a server.

Client
The HTTP client sends a request to the server in the form of a request method, URI, and protocol
version, followed by a MIME-like message containing request modifiers, client information, and
possible body content over a TCP/IP connection.

Server
The HTTP server responds with a status line, including the message's protocol version and a
success or error code, followed by a MIME-like message containing server information, entity meta
information, and possible entity-body content.

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

24 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


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.

HTTP Connections-
HTTP connections can be of two types-
1. Non-persistent HTTP connection
2. Persistent HTTP connection

Non-persistent HTTP connection Persistent HTTP connection

Non-persistent HTTP connection is one that is


Persistent HTTP connection is one that can be
used for serving exactly one request and
used for serving multiple requests.
sending one response.

HTTP server closes the TCP connection only


HTTP server closes the TCP connection
when it is not used for a certain configurable
automatically after sending a HTTP response.
amount of time.

A new separate TCP connection is used for A single TCP connection is used for sending
each object. multiple objects one after the other.

HTTP 1.0 supports non-persistent connections HTTP 1.1 supports persistent connections by
by default. default.

25 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


Example-
Example-
Suppose a request has been made for a HTML
page that contains 10 images (called objects). Suppose a request has been made for a HTML
page that contains 10 images (called objects).
Then,
Then,
With non-persistent connection, all the 11
objects (1 page + 10 images) will be sent one With persistent connection, all the 11 objects
by one. (1 page + 10 images) will be sent one after the
other using a single TCP connection.
For getting each object, a new separate
connection will be opened and used.

Advantages:
 Memory usage and CPU usage are low because of less simultaneous connections.
 Since there are few TCP connections hence network congestion are less.
 Since handshaking is done at initial connection stage, then latency is reduced because there
is no further need of handshaking for subsequent requests.
 The error can be reports without closing connection.
 HTTP allows HTTP pipe-lining of request or response.

Disadvantages:
 HTTP requires high power to establish communication and transfer data.
 HTTP is less secure, because it does not uses any encryption method like https use TLS to
encrypt normal http requests and response.
 HTTP is not optimized for cellular phone and it is too gabby.
 HTTP does not offer genuine exchange of data because it is less secure.
 Client does not close connection until it receives complete data from server and hence server
needs to wait for data completion and cannot be available for other clients during this time.

UDP Protocol
In computer networking, the UDP stands for User Datagram Protocol. The David P. Reed
developed the UDP protocol in 1980.User Datagram Protocol (UDP) – a communications protocol
that facilitates the exchange of messages between computing devices in a network. It’s an
alternative to the transmission control protocol (TCP). In a network that uses the Internet Protocol
(IP), it is sometimes referred to as UDP/IP.

 UDP divides messages into packets, called datagram, which can then be forwarded by the
devices in the network – switches, routers, security gateways – to the destination
application/server.
 The User Datagram Protocol (UDP) is simplest Transport Layer communication protocol
available of the TCP/IP protocol suite.

26 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD


 It establishes connectionless service. UDP is said to be an unreliable transport protocol but
it uses IP services which provides best effort delivery mechanism.
 In UDP, the receiver does not generate an acknowledgement of packet received and in turn,
the sender does not wait for any acknowledgement of packet sent. This shortcoming makes
this protocol unreliable as well as easier on processing.
 The UDP is an alternative communication protocol to the TCP protocol (transmission
control protocol).
 Like TCP, UDP provides a set of rules that governs how the data should be exchanged over
the internet.
 The UDP works by encapsulating the data into the packet and providing its own header
information to the packet.
 Then, this UDP packet is encapsulated to the IP packet and sent off to its destination.
 Both the TCP and UDP protocols send the data over the internet protocol network, so it is
also known as TCP/IP and UDP/IP.
 The UDP is a connectionless protocol as it does not require any virtual circuit to transfer
the data.
 UDP also provides a different port number to distinguish different user requests and also
provides the checksum capability to verify whether the complete data has arrived or not; the
IP layer does not provide these two services.

UDP Header Format

In UDP, the header size is 8 bytes, and the packet size is upto 65,535 bytes. But this packet size is
not possible as the data needs to be encapsulated in the IP datagram, and an IP packet, the header
27 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD
size can be 20 bytes; therefore, the maximum of UDP would be 65,535 minus 20. The size of the
data that the UDP packet can carry would be 65,535 minus 28 as 8 bytes for the header of the UDP
packet and 20 bytes for IP header.

The UDP header contains four fields:

Source port number: It is 16-bit information that identifies which port is going t send the packet.

Destination port number: It identifies which port is going to accept the information. It is 16-bit
information which is used to identify application-level service on the destination machine.

Length: It is 16-bit field that specifies the entire length of the UDP packet that includes the header
also. The minimum value would be 8-byte as the size of the header is 8 bytes.

Checksum - This field stores the checksum value generated by the sender before sending. IPv4 has
this field as optional so when checksum field does not contain any value it is made 0 and all its bits
are set to zero.

Features of UDP protocol


The following are the features of the UDP protocol:
 UDP is used when acknowledgement of data does not hold any significance.
 UDP is good protocol for data flowing in one direction.
 UDP is simple and suitable for query based communications.
 UDP is not connection oriented.
 UDP does not provide congestion control mechanism.
 UDP does not guarantee ordered delivery of data.
 UDP is stateless.
 UDP is suitable protocol for streaming applications such as VoIP, multimedia streaming.

UDP application

Here are few applications where UDP is used to transmit data:

 Domain Name Services


 Simple Network Management Protocol
 Trivial File Transfer Protocol
 Routing Information Protocol

Advantages of UDP:
 Broadcast and multicast transmission are available with UDP which is not the case with
TCP.
 It doesn't restrict to a connection based communication model, so startup latency in
distributed applications is much lower, as is operating system overhead FAST.
 It does not require connection to be established and maintained.
 Also absence of acknowledgement field in UDP makes it faster as it need not have to wait
on ACK or need not have to hold data in memory until they are ACKed.
28 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD
 It uses checksum with all the packets for error detection.
 It can be used in events where a single packet of data needs to be exchanged between the
hosts.
 Much faster than TCP.

Disadvantages of UDP:
 Thee are no guarantees with UDP.
 It is connectionless and unreliable transport protocol. There is no windowing and no
function to ensure data is received in the same order as it was transmitted.
 It does not use any error control. Hence if UDP detects any error in the received packet, it
silently drops it.
 There is no congestion control. Hence large number of users transmitting lots of data via
UDP can cause congestion and no one can do anything about it.
 There is no flow control and no acknowledgement for received data.
 Only application layer deals with error recovery. Hence applications can simply turn to the
user to send the message again.
 Routers can be careless with UDP. They do not retransmit a UDP datagram after collision
and will often discard UDP packets before TCP packets.
 UDP suffers from worse packet loss than TCP.

29 | P a g e SHREE ADARSH BCA COLLEGE - BOTAD

You might also like