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

Application Layer

The document provides an overview of the Domain Name System (DNS) and its components, including the DNS name space, resource records, and name servers, explaining how domain names are translated into IP addresses. It also covers the architecture and services of electronic mail (e-mail), detailing the roles of user agents and message transfer agents, as well as the message formats and protocols involved in e-mail delivery. Additionally, it discusses the evolution of e-mail protocols, including SMTP and IMAP, and the rise of webmail services.

Uploaded by

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

Application Layer

The document provides an overview of the Domain Name System (DNS) and its components, including the DNS name space, resource records, and name servers, explaining how domain names are translated into IP addresses. It also covers the architecture and services of electronic mail (e-mail), detailing the roles of user agents and message transfer agents, as well as the message formats and protocols involved in e-mail delivery. Additionally, it discusses the evolution of e-mail protocols, including SMTP and IMAP, and the rise of webmail services.

Uploaded by

Ganesh Karthik
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/ 32

DNS – The Domain Name System

➢ DNS is an acronym for Domain Name Server, and is the system used to
translate word-based addresses of systems (such as
WWW.EXAMPLE.COM) to the numerical IP (Internet Protocol) address
of the computer or system that should be located at that address.
➢ It is primarily used for mapping host names and e-mail destinations to IP
addresses but can also be used for other purposes.
➢ To map a name onto an IP address, an application program calls a library
procedure called the resolver, passing it the name as a parameter. The
resolver sends a UDP packet to a local DNS server, which then looks up
the name and returns the IP address to the resolver, which then returns it to
the caller.

• The DNS Name Space


• Resource Records
• Name Servers
The DNS Name Space
✓ For the Internet, the top of the naming hierarchy is
managed by an organization called ICANN (Internet
Corporation for Assigned Names and Numbers). ICANN
was created for this purpose in 1998, as part of the
maturing of the Internet to a worldwide, economic
concern.
✓ The Internet is divided into over 250 top-level domains,
where each domain covers many hosts. Each domain is
partitioned into subdomains, and these are further
partitioned, and so on. All these domains can be
represented by a tree.
✓ The top-level domains come in two flavors: generic and
countries.
The DNS Name Space
A portion of the Internet domain name space.

 The original generic domains were com (commercial), edu (educational


institutions), gov (the U.S. Federal Government), int (certain international
organizations), mil (the U.S. armed forces), net (network providers), and org
(nonprofit organizations). The country domains include one entry for every
country, as defined in ISO 3166.
 Other new generic domains added later include biz (businesses), info
(information), name (people's names) pro (professions), aero (aerospace
industry), coop (co-operatives), and museum (museums).
 The top-level domains are run by registrars appointed by ICANN. Getting
a name merely requires going to a corresponding registrar (for com in this
case) to check if the desired name is available and not somebody else’s
trademark. If there are no problems, the requester pays the registrar a small
annual fee and gets the name.
 Each domain is named by the path upward from it to the (unnamed) root.
 Domain names can be either absolute or relative. An absolute domain name
always ends with a period (e.g., eng.sun.com.), whereas a relative one does
not.
 Domain names are case insensitive, so edu, Edu, and EDU mean the same
thing. Component names can be up to 63 characters long, and full path
names must not exceed 255 characters.
 The practice of registering a domain only to turn around and sell it off to an
interested party at a much higher price even has a name. It is called
cybersquatting.
Resource Records
• Every domain, whether it is a single host or a top-level
domain, can have a set of resource records associated with it.
These records are the DNS database.
• When a resolver gives a domain name to DNS, what it gets
back are the resource records associated with that name.
Thus, the primary function of DNS is to map domain names
onto resource records.
• A resource record is a five-tuple. Although they are encoded
in binary for efficiency, in most expositions, resource records
are presented as ASCII text, one line per resource record. The
format we will use is as follows:
Domain_name Time_to_live Class Type Value
Resource Records
• The Domain_name tells the domain to which this record
applies. This field is thus the primary search key used to
satisfy queries.
• The Time_to_live field gives an indication of how stable the
record is. Information that is highly stable is assigned a large
value, such as 86400. Information that is highly volatile is
assigned a small value, such as 60 (1 minute).
• The third field of every resource record is the Class. For
Internet information, it is always IN. For non-Internet
information, other codes can be used.
• The Type field tells what kind of record this is. There are
many kinds of DNS records.
❖ An SOA record provides the
name of the primary source of
information about the name
server's zone, the e-mail
address of its administrator, a
unique serial number, and
various flags and timeouts.
❖ The most important record type
is the A (Address) record. It
holds a 32-bit IP address for
some host.

❖ The next most important record type is the MX record. It specifies the name of
the host prepared to accept e-mail for the specified domain.
❖ The NS record specifies a name server for the domain or subdomain. It is used as
part of the process to look up names.
❖ CNAME records allow aliases to be created.
❖ Like CNAME, PTR points to another name.In practice, it is nearly always used to
associate a name with an IP address to allow lookups of the IP address and return
the name of the corresponding machine. These are called reverse lookups.
❖ SRV is a newer type of record that allows a host to be identified for a given service
in a domain.
Resource Records

A portion of a possible DNS database for cs.vu.nl.


Name Servers
Part of the DNS name
space showing the
division into
zones.

✓ To avoid the problems associated with having only a single source of


information, the DNS name space is divided into non-overlapping zones.
✓ A zone will have one primary name server, which gets its information from a
file on its disk, and one or more secondary name servers, which get their
information from the primary name server.
✓ An authoritative record is one that comes from the authority that manages
the record and is thus always correct. Authoritative records are in contrast to
cached records, which may be out of date.
Name Servers
Electronic Mail
E-mail is short for electronic mail and is used to send & receive
messages over the internet

• Architecture and Services


• The User Agent
• Message Formats
• Message Transfer
• Final Delivery
Architecture and Services

Basic functions Email architecture consists of two


• Composition kinds of subsystems: the user
agents, which allow people to read
• Transfer and send email, and the message
• Reporting transfer agents (mail servers),
• Displaying which move the messages from the
• Disposition source to the destination.
➢ Composition refers to the process of creating messages
and answers.
➢ Transfer refers to moving messages from the originator to
the recipient
➢ Reporting has to do with telling the originator what
happened to the message
➢ Displaying incoming messages is needed so people can
read their e-mail.
➢ Disposition is the final step and concerns what the
recipient does with the message after receiving it.
• The user agent is a program that provides a graphical interface,
or sometimes a text- and command-based interface that lets
users interact with the email system. It includes a means to
compose messages and replies to messages, display incoming
messages, and organize messages by filing, searching, and
discarding them.
• The act of sending new messages into the mail system for
delivery is called mail submission.
• The message transfer agents are typically system processes. They
run in the background on mail server machines and are intended
to be always available. Their job is to automatically move email
through the system from the originator to the recipient with
SMTP (Simple Mail Transfer Protocol). This is the message
transfer step.
✓ Message transfer agents also implement mailing lists, in
which an identical copy of a message is delivered to
everyone on a list of email addresses.

✓ Mailboxes store the email that is received for a user. They


are maintained by mail servers. User agents simply present
users with a view of the contents of their mailboxes.

✓ A key idea in the message format is the distinction between


the envelope and its contents. The envelope encapsulates
the message.

✓ The message inside the envelope consists of two separate


parts: the header and the body. The header contains
control information for the user agents. The body is entirely
for the human recipient.
Format of an email
The User Agent
• A user agent is normally a program (sometimes called a mail reader)
that accepts a variety of commands for composing, receiving, and
replying to messages, as well as for manipulating mailboxes.

• When a user agent is started, it will usually present a summary of the


messages in the user’s mailbox. The summary lines use the From, Subject,
and Received fields, in that order, to display who sent the message, what it is
about, and when it was received.
• Many other fields or indications are possible. Many sorting orders are also
possible
After a message has been read, the user can decide what
to do with it. This is called message disposition. Options
include deleting the message, sending a reply, forwarding
the message to another user, and keeping the message for
later reference.
Many useful features have been included in email such as,
automatic filing by user agents, auto responders, vacation
agents, signature block etc.
Messages that are sent into the mail system have a
standard format that must be created from the information
supplied to the user agent. The most important
information is the destination address present in the
envelope.
Message Formats – RFC 822
• Messages of RFC 822 consist of a primitive envelope, some number
of header fields, a blank line, and then the message body.
• Each header field consists of a single line of ASCII text containing the
field name, a colon and for most fields, a value.
• RFC 822 was revised to RFC 5322.

RFC 822 header fields related to message transport.


Message Formats – RFC 822
RFC 5322 messages may also contain a variety of header fields used by
the user agents or human recipients.

▪ The Reply-To: field is sometimes used when neither the person


composing the message nor the person sending the message
wants to see the reply.
▪ The Message-Id: is an automatically generated number that is used
to link messages together (e.g., when used in the In-Reply-To: field)
and to prevent duplicate delivery.
MIME – Multipurpose Internet Mail
Extensions
RFC 822 supported messages written in English and expressed in ASCII
Problems with international languages:
• Languages with accents
(French, German).
• Languages in non-Latin alphabets
(Hebrew, Russian).
• Languages without alphabets
(Chinese, Japanese).
• Messages not containing text at all
(audio or images).
A solution was proposed in RFC 1341 and updated in RFCs 2045–2049.
This solution, called MIME (Multipurpose Internet Mail Extensions) is now
widely used.
• The basic idea of MIME is to continue to use the RFC 822 but to
add structure to the message body and define encoding rules for
the transfer of non-ASCII messages.

❖ MIME defines five new message headers. The first of these simply
tells the user agent receiving the message that it is dealing with a
MIME message, and which version of MIME it uses.
❖ The Content-Description: header is an ASCII string telling what is in
the message.
❖ The Content-Id: header identifies the content. It uses the same format
as the standard Message-Id: header.
❖ The Content-Transfer-Encoding: tells how the body is wrapped for
transmission through the network.
▪ MIME provides five transfer encoding schemes, plus an escape to
new schemes.
▪ The ASCII encoding of binary data is called . In
this scheme, groups of 24 bits are broken up into four 6-bit units,
with each unit being sent as a legal ASCII character.
▪ For messages that are almost entirely ASCII but with a few non-
ASCII characters, an encoding known as encoding
is used. This is just 7-bit ASCII, with all the characters above 127
encoded as an equals sign followed by the character’s value as two
hexadecimal digits.
▪ When there are valid reasons not to use one of these schemes, it is
possible to specify a user-defined encoding in the Content-Transfer-
Encoding: header.
The Content-Type specifies the nature of the message body.
Initially, seven MIME types were defined in RFC 1521.
• Each type has one or more available subtypes. The type and
subtype are separated by a slash such as ‘‘Content-Type:
video/mpeg’’.

The model type was added after the other content types. It is
intended for describing 3D model data.
Message Transfer - SMTP
⁂ Within the Internet, e-mail is delivered by having the source
machine establish a TCP connection to port 25 of the
destination machine. Listening to this port is an e-mail daemon
that speaks SMTP (Simple Mail Transfer Protocol).
⁂ This daemon accepts incoming connections and copies
messages from them into the appropriate mailboxes. If a
message cannot be delivered, an error report containing the
first part of the undeliverable message is returned to the sender.
⁂ SMTP is a simple ASCII protocol. Using ASCII text makes
protocols easy to develop, test, and debug. After establishing
the TCP connection to port 25, the sending machine, operating
as the client, waits for the receiving machine, operating as the
server, to talk first.
Message Transfer

Transferring a
message from
[email protected]
to
[email protected].
ESMTP
• SMTP has the problems with authentication,
encryption, inefficient usage of bandwidth incase of
non-ASCII transmissions, message sizes etc.
• SMTP is allowed to have an extended mechanism,
which is mandatory in RFC 5321 standard called
Extended SMTP.
Final Delivery
• Both the communicating parties may not be online all the
time. One solution is to have a message transfer agent on an
ISP machine accept e-mail for its customers and store it in
their mailboxes on an ISP machine. Since this agent can be
on-line all the time, e-mail can be sent to it 24 hours a day.
• POP3 (Post Office Protocol Version 3) is a protocol that
allows user transfer agents (on client PCs) to contact the
message transfer agent (on the ISP's machine) and allow e-
mail to be copied from the ISP to the user.
• POP3 begins when the user starts the mail reader. The mail
reader calls up the ISP (unless there is already a connection)
and establishes a TCP connection with the message transfer
agent at port 110.
IMAP (Internet Message Access Protocol)
• IMAP is an improvement over an earlier final delivery
protocol, POP3 (Post Office Protocol, version 3),
which is specified in RFC 1939. POP3 is a simpler
protocol but supports fewer features and is less
secure in typical usage.

• Mail is usually downloaded to the user agent


computer, instead of remaining on the mail server.
This makes life easier on the server, but harder on
the user. It is not easy to read mail on multiple
computers, plus if the user agent computer breaks,
all email may be lost permanently.
Webmail
• Webmail is an increasingly popular alternative
to IMAP and SMTP for providing email service.
It uses the Web as an interface for sending
and receiving mail.

• Widely used Webmail systems include Google


Gmail, Microsoft Hotmail and Yahoo! mail.
Webmail is one example of software (in this
case, a mail user agent) that is provided as a
service using the Web.

You might also like