UNIT-5
UNIT-5
Application Layer
The application layer in the OSI model is the closest layer to the end user which means that the application
layer and end user can interact directly with the software application. The application layer programs are
based on client and servers.
o Determining resource availability: The application layer determines whether sufficient network
resources are available for the requested communication.
o Synchronizing communication: All the communications occur between the applications requires
cooperation which is managed by an application layer.
o Addressing: To obtain communication between client and server, there is a need for addressing.
When a client made a request to the server, the request contains the server address and its own
address. The server response to the client request, the request contains the destination address, i.e.,
client address. To achieve this kind of addressing, DNS is used.
E-mail :
E-mail system consists of two subsystems
- the user agent, and
- the message transfer agents
- User Agents :
They allow people to read and send e-mail they are local programs that provide a
Second level
Domains united Arab JNTU
Emirates
In-addr control
rgm
ece cse
45 vax rgm
Vax.ugc.control.edu ece.rmg.jntu.in
61
Generic Domain: The generic domain is also called the organization domain, divides registered
hosts according to their generic behaviour. Generic domain names, read left to the right , start
with the most specific information about the host(e.g. the name of the workstation) and become
more and more general with each label until they reach the rightmost label, which describes the
broadcast affiliation of the normal host i.e., the nature of the organization.
Each domain name corresponds to a particular IP address. To find the address, the resolution
application begins searching with the first level. As a much is found, a pointer leads to the next
level and finally to the associated IP address.
Country Domain: The country domain convention follows the same format as generic domain,
but uses two character country abbreviation in place of three character organizational
abbreviations at the first level shown in table. Second level labels can be organizational or they
can be more specific national designations.
Reverse Domain: If we have the IP address and need the domain name, you can reverse
domain the functions of DNS.
The domain can be inserted onto the tree in two ways. For example ugc.control.edu could equally
be listed under the country domain as cs.yale.ct.us.
RESOURCE RECORDS
Every domain in the DNS tree maintains a set of Resource Records, which are connected to it.
For a leaf node i.e., single host, the most common resource record is its IP address. When a
resolver gives a name to DNS, it gets back called as resource records associated with that name.
The original function of a DNS is to map domain names on to the resource records.
A resource record is a five tuple, in ASCII text they are represented as
The domain-name tells the domain to which this record belongs. This is the primary
search key used to satisfy queries.
The time-to live field gives information regarding the stability of the record. A large value
such as 86-400(number of seconds in one day) indicates that the information is highly
stable. The small value such as 60(1 minute) indicates that the information is highly
volatile.
The type of field tells what kind of record it is, some of the type records are listed in table
5.3.
1. The SOA record provides name of the primary source of information about (a) name
servers zone (b) e-mail address of its administration (c) various flags and (d) various time
outs.
2. The record A, holds a 32 bit IP address of the host. If a host connects two or more
networks, each case it has one type of a resource record per network connection.
3. The MX record specifies the name of domain prepared to accept e-mail for the specified
domain. It allows the host that is not on the internet to receive e-mail from internet sites.
4. NS record specifies Name server.
The fourth field in the general structure of resource record is the class. It may be
Internet information, used IN and for non-internet information, other codes are
used.
The value field can be number, domain name or an ASCII string.
NAME SERVERS
The Inter network Information center (Inter NIC) manages the top level domain names. The Inter
NIC delegates responsibility for assigning names to different organizations. Each organization is
responsible for a specific portion of the DNS tree structure. Internet professionals refer to these
areas of responsibilities as zones.
Alternatively, the Inter NIC delegates responsibility for assigning names with in a specific zone to
specific organizations. Each zone contains some part of the tree and also contains name servers
holding the authoritative information about the zone. Each zone contains one primary name
server and one or more secondary name servers. Primary name server and one or more
secondary name servers. Primary name server gets its information from a file on its disk, the
secondary name server and get their information from the primary name server. One or more
servers are located outside the zone, for each zone, for reliability. The number of name servers
needed in a zone depends on the zone boundaries.
Let us consider an example shown in fig connected with another domain. here a resolver on
“ece.rgm.jntu.in” wants to know the IP address of the host “rgm.aicte.control.edu” can be
explained in 8 steps.
Step 1: It sends a query to the local name server rgm.jntu.in.This query asks a record of type A
and the class IN.
Step 2: If the local name server had no such domain and knows nothing about it, it may ask a few
other near by name servers if none of them know, it sends a UDP packet to the server for “edu”
given in its database (see fig) edu.server.net.
Step 3: It forwards the request to the name server control.edu.
Computer Networks UNIT -V
Step 4: And in turn this forwards the request aicte.control.edu, which has authoritative resource
records.
This is the request from client to a server, the resource record requested will work its way
back in step 5 to step 8.Once these records get back to rgm.jntu.in name server, they will be
entered into a cache/memory. However this information is not authoritative, since changes made
at aicte.control.edu will not be propagated to all the memories in the world. For this reason cache
should not live too long, so time-to-live field is used in each resource record. It tells the name
server how long to cache records.
Resource record
ELECTRONIC MAIL
Electronic mail or E-mail as it is popularly called, is a system that allows a person or a group to
electronically communicate with each other through a netork. Presently people can now receive
and send e-mail to:
nearly any country in the world.
one of millions of computer users.
many users at once.
computer programs.
The first e-map systems consisted of file transfer protocols, with the convention that the first line
of each message contained the recipient address. Some of the complaints at that time were
After a decade of competition, email systems based on RFC822 are widely used, where all the
above problems are solved.
BASIC FUNCTIONS
Email systems support five basic functions, which are: Composition, Transfer, Reporting,
Displaying and Disposition.
1. Composition is a process for creating the messages and answers. This can be done by
text editor, outside the mailer, the system will provide assistance in addressing and
numerous header fields attached to each message. For eample:when answering a
message, the e mail system can extract the originator’s address from the incoming e-mail
and automatically insert it into the address space in reply.
2. Transfer refers to moving of messages from the source to the recipent. In some cases,
connection establishment is needed with the destination, outputting the message and
releasing the connection. The e-mail system should do automatically this.
3. Reporting is used to indicate the originator what happened to the message i.e.,
confirmation of the message delivery. Was it delivers successfully? Was it rejected? Was
it lost? Did errors occur?
4. Displaying It refers to read the incoming e-mail by the person. Sometimes conversion is
required or a special viewer must be invoked.
5. Disposition It concerns what the recipient does with the message after receiving it. The
possibilities are
(a) Throwing it away before reading
(b) Throwing it away after reading.
(c) Saving it and so on. It is also possible to forward them or process them in other
ways.
In addition to these basic services, most of e-mail systems provide a large variety of advanced
features such as
(a) It allows to create a mailbox to store incoming e-mail.
(b) It allows to have a mailing list, to which the e-mail messages have to send.
(c) Carbon copies, high priority email, secret email, registered email etc.
Message can be produced with a free standing text editor, a word processing
program or by using a text editor built into the user agents. The format of an e-mail
message is similar to that of a conventional letter.
There are two main parts: Header and body.
The header contains out name and address, the name and address of the person it’s
being sent to, the name and address of the person who is being sent a copy, the date of the
message and the subject when we receive an e-mail from someone, the header tells us where it
came from, what it is about, how it was sent and when.
The body is the place where we write the contents of what we want to communicate. The
message sent should be simple and direct. Body is entirely for human recipient.
The designation address must be in a format that the user agent can deal with. The basic
form of e-mail address is
User name @host name.subdomain.domain.
The text before the sign @(pronounced “at”) specifies the user name of the individual, the text
after the @ sign indicates how the computer system can locate that individual’s mailboxes.
For example
mvs@cs.colorado.edu
Here cs is a sub domain of Colorado is a sub domain of edu.the edu specifies the top-level
domain name.
The number of periods (pronounced as dots) varies from e-mail address.
Reading e-mail: On connecting to the net, the first thing a user usually does is check his mail, it’s
like checking the mailbox when we go home. The display like fig 5.28 appears on the screen.
Computer Networks UNIT -V
Each line refers to one message. In the fig, the mailbox contains 4 (four) messages. The display
line contains several fields, which provides user profile.
This is the solution defined in 1341 and updated in 1521 for the following problems.
1. Messages in languages with accents.
2. Messages in non Latin alphabets.
3. Messages in languages with out alphabets.
4. Messages not containing text at all.
The basic idea of MIME is to continue the use of RFC 822 format, but to add structure to the
message body defined encoding rules for non ASCII formats. The MIME messages can be sent
using the existing mail programs, and protocols.
The MIME defines five new message header
MIME-Version: It tells the use agent receiving the message that it is dealing with a MIME
message, and which version of MIME it uses.
Content-Description: It tells what is there in the message, this header helps the recipient
whether it is worth decoding and reading the message.
Let us now take closer look at how SMTP transfers a message from a sending mail server to a
receiving mail server.
We will see that the SMTP protocol has many similarities with protocols that are used for face-to-
face human interaction.
The client SMTP has TCP to establish a connection on port 25 to server SMTP.If server is
down, the clients tries again later. Once the connection is established, the server and
client perform some application layer handshaking. During this SMTP handshaking phase,
the SMTP client indicates the e-mail address of the sender and the e-mail address of the
recipient. Once the SMTP client and server have introduced themselves to each other, the
client sends the message, SMTP can count on the reliable data transfer service of TCP to
get the message to the server without errors. The client then repeats this process over the
same TCP connection if it has other message to send to the server; otherwise it instructs
TCP to close the connection.
Even though the SMTP protocol is well defined, a few problems can still arise. These are.
1. Related to the Message Length : Some older implementations cannot handle messages
exceeding 64kB.
2. Related to Time Outs : If the client and server have different time-outs, one of them may
give up while the other is still busy, unexpectedly terminating the connection.
3. Infinite mail storms can be triggered .
To get around some of these problems, extended SMTP (ESMTP) has been defined in
RFC1425.
E-mail Gateways: E-mail using SMTP works best when both the sender and receiver on the
internet and can support TCP connections between sender and receiver.However many
* * * * *