Application Layer
Application Layer
➢ 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 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
❖ 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.