UNIT – V
Application Layer
Principles of Networking Applications: Network Application Architectures,
Processes Communicating, Transport Services Available to Applications, Transport
Services Provided by the Internet, File Transfer: FTP - FTP Commands and
Replies, Electronic Mail in the Internet- SMTP, Comparison with HTTP, DNS-
The Internet’s Directory Service - Service Provided by DNS, Overview of How
DNS Works, DNS Records and messages.
Mr. D. Santhosh Gupta, Dept. of ECE 1
Network Application Architectures
• From the application developer’s perspective, the network architecture is fixed and provides a
specific set of services to applications.
• The application architecture is designed by the application developer and dictates how the
application is structured over the various end systems.
• In choosing the application architecture, an application developer will likely draw on one of the
two predominant architectural paradigms used in modern network applications: the client-server
architecture or the peer-to-peer (P2P) architecture.
• In a client-server architecture, there is an always-on host, called the server, which services
requests from many other hosts, called clients. Note that, clients do not directly communicate with
each other.
• Another characteristic is that the server has a fixed, well-known address, called an IP address.
Because the server has a fixed, well-known address, and because the server is always on, a client
can always contact the server by sending a packet to the server’s IP address.
• Some of the better-known applications with a client-server architecture include the Web, FTP,
Telnet, and e-mail. The client-server architecture is shown in Fig. (a)
Mr. D. Santhosh Gupta, Dept. of ECE 2
Network Application Architectures
Mr. D. Santhosh Gupta, Dept. of ECE 3
Network Application Architectures
• Often in a client-server application, a single-server host is incapable of keeping up with all the
requests from clients. For example, a popular social-networking site can quickly become
overwhelmed if it has only one server handling all of its requests. For this reason, a data center,
housing a large number of hosts, is often used to create a powerful virtual server.
• In a P2P architecture, there is minimal (or no) reliance on dedicated servers in data centers.
Instead. the application exploits direct communication between pairs of intermittently connected
hosts, called peers.
• The peers are not owned by the service provider, but are instead desktops and laptops controlled
by users, with most of the peers residing in homes, universities, and offices. Because the peers
communicate without passing through a dedicated server, the architecture is called peer-to-peer.
• Many of today’s most popular and traffic-intensive applications are based on P2P architectures.
The P2P architecture is illustrated in Fig.(b)
• One of the most compelling features of P2P architectures is their self-scalability. For example, in
a P2P file-sharing application, although each peer generates workload by requesting files, each
peer also adds service capacity to the system by distributing files to other peers.
Mr. D. Santhosh Gupta, Dept. of ECE 4
Network Application Architectures
• P2P architectures are also cost effective, since they normally don’t require significant server
infrastructure and server bandwidth.
• However, future P2P applications face three major challenges:
1. ISP Friendly. Most residential ISPs (including DSL and cable ISPs) have been dimensioned
for “asymmetrical” bandwidth usage, that is, for much more downstream than upstream
traffic. But P2P video streaming and file distribution applications shift upstream traffic from
servers to residential ISPs, thereby putting significant stress on the ISPs. Future P2P
applications need to be designed so that they are friendly to ISPs.
2. Security. Because of their highly distributed and open nature, P2P applications can be a
challenge to secure
3. Incentives. The success of future P2P applications also depends on convincing users to
volunteer bandwidth, storage, and computation resources to the applications, which is the
challenge of incentive design
Mr. D. Santhosh Gupta, Dept. of ECE 5
Processes Communicating
• Before building network application, also need a basic understanding of how the programs,
running in multiple end systems, communicate with each other.
• In the jargon of operating systems, it is not actually programs but processes that communicate.
• A process can be thought of as a program that is running within an end system. When processes
are running on the same end system, they can communicate with each other with interprocess
communication, using rules that are governed by the end system’s operating system.
• Processes on two different end systems communicate with each other by exchanging messages
across the computer network.
• A sending process creates and sends messages into the network; a receiving process receives these
messages and possibly responds by sending messages back.
Client and Server Processes
• A network application consists of pairs of processes that send messages to each other over a
network. For example, in the Web application a client browser process exchanges messages with a
Web server process.
Mr. D. Santhosh Gupta, Dept. of ECE 6
Processes Communicating
• In a P2P file-sharing system, a file is transferred from a process in one peer to a process in another peer.
• For each pair of communicating processes, typically label one of the two processes as the client and the
other process as the server.
• With the Web, a browser is a client process and a Web server is a server process. With P2P file sharing,
the peer that is downloading the file is labeled as the client, and the peer that is uploading the file is
labeled as the server.
• In P2P file sharing, a process can be both a client and a server. Indeed, a process in a P2P file-sharing
system can both upload and download files.
• In the context of a communication session between a pair of processes, the process that initiates the
communication is labeled as the client. The process that waits to be contacted to begin the session is the
server.
• In the Web, a browser process initializes contact with a Web server process; hence the browser process
is the client and the Web server process is the server. In P2P file sharing, when Peer A asks Peer B to
send a specific file, Peer A is the client and Peer B is the server in the context of this specific
communication session.
Mr. D. Santhosh Gupta, Dept. of ECE 7
Processes Communicating
The Interface Between the Process and the Computer Network
• Any message sent from one process to another must go through the underlying network. A process
sends messages into, and receives messages from, the network through a software interface called
a socket.
• A socket is the interface between the application layer and the transport layer within a host. It is
also referred to as the Application Programming Interface (API) between the application and
the network, since the socket is the programming interface with which network applications are
built.
• The application developer has control of everything on the application-layer side of the socket but
has little control of the transport-layer side of the socket.
• The only control that the application developer has on the transport-layer side is (1) the choice of
transport protocol and (2) perhaps the ability to fix a few transport-layer parameters such as
maximum buffer and maximum segment sizes.
• Once the application developer chooses a transport protocol, the application is built using the
transport-layer services provided by that protocol.
Mr. D. Santhosh Gupta, Dept. of ECE 8
Processes Communicating
Mr. D. Santhosh Gupta, Dept. of ECE 9
Processes Communicating
Addressing Processes
• In order for a process running on one host to send packets to a process running on
another host, the receiving process needs to have an address.
• To identify the receiving process, two pieces of information need to be specified: (1)
the address of the host and (2) an identifier that specifies the receiving process in the
destination host.
• In the Internet, the host is identified by its IP address.
• In addition to knowing the address of the host to which a message is destined, the
sending process must also identify the receiving process (more specifically, the
receiving socket) running in the host.
• This information is needed because in general a host could be running many network
applications. A destination port number serves this purpose.
Mr. D. Santhosh Gupta, Dept. of ECE 10
Transport Services Available to Applications
• The services that a transport-layer protocol can offer to applications invoking along four
dimensions: reliable data transfer, throughput, timing, and security.
Reliable Data Transfer
• Applications such as electronic mail, file transfer, remote host access, Web document transfers,
and financial applications data loss can have devastating consequences.
• Thus, to support these applications, something has to be done to guarantee that the data sent by
one end of the application is delivered correctly and completely to the other end of the application.
If a protocol provides such a guaranteed data delivery service, it is said to provide reliable data
transfer.
• One important service that a transport-layer protocol can potentially provide to an application is
process-to-process reliable data transfer.
• When a transport protocol provides this service, the sending process can just pass its data into the
socket and know with complete confidence that the data will arrive without errors at the receiving
process.
Mr. D. Santhosh Gupta, Dept. of ECE 11
Transport Services Available to Applications
Throughput
• Throughput is the rate at which the sending process can deliver bits to the receiving process, in the
context of a communication session between two processes along a network path.
• Because other sessions will be sharing the bandwidth along the network path, and because these
other sessions will be coming and going, the available throughput can fluctuate with time.
• These observations lead to another natural service that a transport-layer protocol could provide,
namely, guaranteed available throughput at some specified rate.
• Applications that have throughput requirements are said to be bandwidth-sensitive applications.
• While bandwidth-sensitive applications have specific throughput requirements, elastic
applications can make use of as much, or as little, throughput as happens to be available.
Timing
• A transport-layer protocol can also provide timing guarantees. As with throughput guarantees,
timing guarantees can come in many shapes and forms.
• For non-real-time applications, lower delay is always preferable to higher delay, but no tight
constraint is placed on the end-to-end delays.
Mr. D. Santhosh Gupta, Dept. of ECE 12
Transport Services Available to Applications
• In interactive real-time applications, such as Internet telephony, virtual environments,
teleconferencing, and multiplayer games, all of which require tight timing constraints on data
delivery in order to be effective.
• Long delays in Internet telephony tend to result in unnatural pauses in the conversation; in a
multiplayer game or virtual interactive environment, a long delay between taking an action and
seeing the response from the environment makes the application feel less realistic.
Security
• Finally, a transport protocol can provide an application with one or more security services.
• For example, in the sending host, a transport protocol can encrypt all data transmitted by the
sending process, and in the receiving host, the transport-layer protocol can decrypt the data before
delivering the data to the receiving process. Such a service would provide confidentiality between
the two processes, even if the data is somehow observed between sending and receiving processes.
• A transport protocol can also provide other security services in addition to confidentiality,
including data integrity and end-point authentication.
Mr. D. Santhosh Gupta, Dept. of ECE 13
Transport Services Provided by the Internet
• When you (as an application developer) create a new network application for the Internet, one of
the first decisions you have to make is whether to use UDP or TCP. Each of these protocols offers
a different set of services to the invoking applications.
• Table (in the next slide) shows the service requirements for some selected applications.
TCP Services
• The TCP service model includes a connection-oriented service and a reliable data transfer service.
When an application invokes TCP as its transport protocol, the application receives both of these
services from TCP.
• TCP also includes a congestion-control mechanism, a service for the general welfare of the
Internet rather than for the direct benefit of the communicating processes.
UDP Services
• UDP is a no-frills, lightweight transport protocol, providing minimal services. UDP is
connectionless and provides an unreliable data transfer service.
• UDP does not include a congestion-control mechanism, so the sending side of UDP can pump data
into the layer below (the network layer) at any rate it pleases.
Mr. D. Santhosh Gupta, Dept. of ECE 14
Transport Services Provided by the Internet
Mr. D. Santhosh Gupta, Dept. of ECE 15
Transport Services Provided by the Internet
• Services Not Provided by Internet Transport Protocols
• Today’s Internet can often provide satisfactory service to time-sensitive applications, but it cannot
provide any timing or throughput guarantees.
• Following table indicates the transport protocols used by some popular Internet applications.
Mr. D. Santhosh Gupta, Dept. of ECE 16
File Transfer: FTP
• In a typical FTP session, the user is sitting in front of one host (the local host) and wants to transfer
files to or from a remote host. In order for the user to access the remote account, the user must
provide a user identification and a password.
• After providing this authorization information, the user can transfer files from the local file system
to the remote file system and vice versa.
• The fig. explains the whole operation.
Mr. D. Santhosh Gupta, Dept. of ECE 17
File Transfer: FTP
• HTTP and FTP are both file transfer protocols and have many common characteristics; for
example, they both run on top of TCP.
• However, the two application-layer protocols have some important differences.
• The most striking difference is that FTP uses two parallel TCP connections to transfer a file, a
control connection and a data connection.
• The control connection is used for sending control information between the two hosts—information
such as user identification, password, commands to change remote directory, and commands to
“put” and “get” files.
• The data connection is used to actually send a file.
• Because FTP uses a separate control connection, FTP is said to send its control information out-of-
band. HTTP sends request and response header lines into the same TCP connection that carries the
transferred file itself. For this reason, HTTP is said to send its control information in-band.
• The FTP control and data connections are illustrated in Fig.
Mr. D. Santhosh Gupta, Dept. of ECE 18
File Transfer: FTP
• When a user starts an FTP session with a remote host, the client side of FTP (user) first initiates a
control TCP connection with the server side (remote host) on server port number 21.
• The client side of FTP sends the user identification and password over this control connection. The
client side of FTP also sends, over the control connection, commands to change the remote
directory.
• When the server side receives a command for a file transfer over the control connection (either to,
or from, the remote host), the server side initiates a TCP data connection to the client side. FTP
sends exactly one file over the data connection and then closes the data connection.
• If, during the same session, the user wants to transfer another file, FTP opens another data
connection. Thus, with FTP, the control connection remains open throughout the duration of the
user session, but a new data connection is created for each file transferred within a session (that is,
the data connections are non-persistent).
• Throughout a session, the FTP server must maintain state about the user. Keeping track of this
state information for each ongoing user session significantly constrains the total number of
sessions that FTP can maintain simultaneously. HTTP, on the other hand, is stateless.
Mr. D. Santhosh Gupta, Dept. of ECE 19
File Transfer: FTP Commands and Replies
• The commands, from client to server, and replies, from server to client, are sent across the control
connection in 7-bit ASCII format. Thus, like HTTP commands, FTP commands are readable by
people. In order to delineate successive commands, a carriage return and line feed end each
command. Each command consists of four uppercase ASCII characters, some with optional
arguments.
• Some of the more common commands are given below:
▪ USER username: Used to send the user identification to the server.
▪ PASS password: Used to send the user password to the server.
▪ LIST: Used to ask the server to send back a list of all the files in the current remote directory.
The list of files is sent over a (new and non-persistent) data connection rather than the control TCP
connection.
▪ RETR filename: Used to retrieve (that is, get) a file from the current directory of the remote
host. This command causes the remote host to initiate a data connection and to send the requested
file over the data connection.
▪ STOR filename: Used to store (that is, put) a file into the current directory of the remote host.
Mr. D. Santhosh Gupta, Dept. of ECE 20
File Transfer: FTP Commands and Replies
• There is typically a one-to-one correspondence between the command that the user issues and the
FTP command sent across the control connection.
• Each command is followed by a reply, sent from server to client.
• The replies are three-digit numbers, with an optional message following the number. This is
similar in structure to the status code and phrase in the status line of the HTTP response message.
• Some typical replies, along with their possible messages, are as follows:
▪ 331 Username OK, password required
▪ 125 Data connection already open; transfer starting
▪ 425 Can’t open data connection
▪ 452 Error writing file
Mr. D. Santhosh Gupta, Dept. of ECE 21
Electronic Mail in the Internet
• E-Mail is an asynchronous communication
medium—people send and read messages
when it is convenient for them, without
having to coordinate with other people’s
schedules.
• Electronic mail is fast, easy to distribute, and
inexpensive.
• Modern e-mail has many powerful features,
including messages with attachments,
hyperlinks, HTML-formatted text, and
embedded photos.
• Fig. presents a high-level view of the Internet
mail system that has three major components:
user agents, mail servers, and the Simple
Mail Transfer Protocol (SMTP).
Mr. D. Santhosh Gupta, Dept. of ECE 22
SNMP
• SMTP is the principal application-layer protocol for Internet electronic mail. It uses the reliable
data transfer service of TCP to transfer mail from the sender’s mail server to the recipient’s mail
server.
• SMTP is much older than HTTP and SMTP has two sides: a client side, which executes on the
sender’s mail server, and a server side, which executes on the recipient’s mail server. Both the
client and server sides of SMTP run on every mail server.
• SMTP transfers messages from senders’ mail servers to the recipients’ mail servers. When a mail
server sends mail to other mail servers, it acts as an SMTP client. When a mail server receives mail
from other mail servers, it acts as an SMTP server.
• To illustrate the basic operation of SMTP, let’s consider a common scenario. Suppose Alice wants
to send Bob a simple ASCII message.
• Alice invokes her user agent for e-mail, provides Bob’s e-mail address (for example,
bob@[Link]), composes a message, and instructs the user agent to send the
message.
• Alice’s user agent sends the message to her mail server, where it is placed in a message queue.
Mr. D. Santhosh Gupta, Dept. of ECE 23
SNMP
• The client side of SMTP, running on Alice’s mail server, sees the message in the message queue. It
opens a TCP connection to an SMTP server, running on Bob’s mail server.
• After some initial SMTP handshaking, the SMTP client sends Alice’s message into the TCP
connection.
• At Bob’s mail server, the server side of SMTP receives the message. Bob’s mail server then places
the message in Bob’s mailbox.
• Bob invokes his user agent to read the message at his convenience.
Mr. D. Santhosh Gupta, Dept. of ECE 24
SNMP
• It is important that SMTP does not normally use intermediate mail servers for sending mail, even
when the two mail servers are located at opposite ends of the world.
• In particular, if Bob’s mail server is down, the message remains in Alice’s mail server and waits
for a new attempt—the message does not get placed in some intermediate mail server.
• A closer look of the way SMTP transfers a message is:
• First, the client SMTP (running on the sending mail server host) has TCP establish a connection to
port 25 at the server SMTP (running on the receiving mail server host). If the server is down, the
client tries again later.
• Once this 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 (the person who generated the message) 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
messages to send to the server; otherwise, it instructs TCP to close the connection.
Mr. D. Santhosh Gupta, Dept. of ECE 25
Comparison with HTTP
• SMTP with HTTP, both protocols are used to transfer files from one host to another: HTTP transfers files (also
called objects) from a Web server to a Web client (typically a browser); SMTP transfers files (that is, e-mail
messages) from one mail server to another mail server.
• When transferring the files, both persistent HTTP and SMTP use persistent connections. Thus, the two protocols
have common characteristics. However, there are important differences.
• First, HTTP is mainly a pull protocol—someone loads information on a Web server and users use HTTP to pull the
information from the server at their convenience. In particular, the TCP connection is initiated by the machine that
wants to receive the file. On the other hand, SMTP is primarily a push protocol—the sending mail server pushes
the file to the receiving mail server. In particular, the TCP connection is initiated by the machine that wants to send
the file.
• A second difference, is that SMTP requires each message, including the body of each message, to be in 7-bit ASCII
format. If the message contains characters that are not 7-bit ASCII or contains binary data, then the message has to
be encoded into 7-bit ASCII. HTTP data does not impose this restriction.
• A third important difference concerns how a document consisting of text and images (along with possibly other
media types) is handled. HTTP encapsulates each object in its own HTTP response message. Internet mail places
all of the message’s objects into one message.
Mr. D. Santhosh Gupta, Dept. of ECE 26
DNS—The Internet’s Directory Service
• One identifier for a host is its hostname. Hostnames—such as [Link], [Link],
[Link], and [Link]—are mnemonic and are therefore appreciated by
humans.
• However, hostnames provide little, if any, information about the location within the Internet of the host.
• Furthermore, because hostnames can consist of variable length alphanumeric characters, they would be
difficult to process by routers. For these reasons, hosts are also identified by so-called IP addresses.
• An IP address consists of four bytes and has a rigid hierarchical structure.
• An IP address looks like [Link], where each period separates one of the bytes expressed in
decimal notation from 0 to 255.
• An IP address is hierarchical because when scan the address from left to right, obtain more and more
specific information about where the host is located in the Internet (that is, within which network, in the
network of networks).
• Similarly, when scan a postal address from bottom to top, obtain more and more specific information
about where the addressee is located.
Mr. D. Santhosh Gupta, Dept. of ECE 27
Services Provided by DNS
• There are two ways to identify a host—by a hostname and by an IP address.
• All prefer the more mnemonic hostname identifier, while routers prefer fixed-length, hierarchically
structured IP addresses.
• In order to reconcile these preferences, there is a need of directory service that translates hostnames to
IP addresses. This is the main task of the Internet’s domain name system (DNS).
• The DNS is (1) a distributed database implemented in a hierarchy of DNS servers, and (2) an
application-layer protocol that allows hosts to query the distributed database.
• The DNS servers are often UNIX machines running the Berkeley Internet Name Domain (BIND)
software. The DNS protocol runs over UDP and uses port 53.
• DNS is commonly employed by other application-layer protocols—including HTTP, SMTP, and FTP—
to translate user-supplied hostnames to IP addresses.
• As an example, consider what happens when a browser (that is, an HTTP client), running on some
user’s host, requests the URL [Link]/[Link]. In order for the user’s host to
be able to send an HTTP request message to the Web server [Link], the user’s host
must first obtain the IP address of [Link]. This is done as follows.
Mr. D. Santhosh Gupta, Dept. of ECE 28
Services Provided by DNS
1. The same user machine runs the client side of the DNS application.
2. The browser extracts the hostname, [Link], from the URL and passes the
hostname to the client side of the DNS application.
3. The DNS client sends a query containing the hostname to a DNS server.
4. The DNS client eventually receives a reply, which includes the IP address for the hostname.
5. Once the browser receives the IP address from DNS, it can initiate a TCP connection to the HTTP
server process located at port 80 at that IP address.
DNS provides a few other important services in addition to translating hostnames to IP addresses:
• Host aliasing. A host with a complicated hostname can have one or more alias names. For e.g., a
hostname such as [Link] could have, say, two aliases such as
[Link] and [Link]. In this case, the hostname
[Link] is said to be a canonical hostname. Alias hostnames,
when present, are typically more mnemonic than canonical hostnames. DNS can be invoked by an
application to obtain the canonical hostname for a supplied alias hostname as well as the IP address of
the host.
Mr. D. Santhosh Gupta, Dept. of ECE 29
Services Provided by DNS
• Mail server aliasing. For obvious reasons, it is highly desirable that e-mail addresses be mnemonic. For
example, if Bob has an account with Hotmail, Bob’s e-mail address might be as simple as
bob@[Link]. However, the hostname of the Hotmail mail server is more complicated and
much less mnemonic than simply [Link] (for example, the canonical hostname might be
something like [Link]). DNS can be invoked by a mail application
to obtain the canonical hostname for a supplied alias hostname as well as the IP address of the host. In
fact, the MX record permits a company’s mail server and Web server to have identical (aliased)
hostnames; for example, a company’s Web server and mail server can both be called
[Link].
• Load distribution. DNS is also used to perform load distribution among replicated servers, such as
replicated Web servers. Busy sites, such as [Link], are replicated over multiple servers, with each
server running on a different end system and each having a different IP address. The DNS database
contains this set of IP addresses. When clients make a DNS query for a name mapped to a set of
addresses, the server responds with the entire set of IP addresses, but rotates the ordering of the
addresses within each reply.
Mr. D. Santhosh Gupta, Dept. of ECE 30
Simplified Overview of How DNS Works
User enters a domain name:
• When a user enters a website address (e.g., [Link]) into a browser, the browser initiates a DNS lookup
Query to DNS resolver:
• The browser sends a request (a DNS query) to a DNS resolver, which is usually provided by the user's
internet service provider (ISP).
Root servers consulted:
• The DNS resolver first contacts the root DNS servers, which are the top-level servers that hold information
about the structure of the internet's domain name hierarchy.
Top-level domain (TLD) servers:
• The root server directs the resolver to the TLD server (like .com, .org, .net), which holds information for the
domain's top-level extension.
Authoritative name server:
• The TLD server then points the resolver to the authoritative name server, which holds the IP address for the
specific domain name.
IP address returned:
• The authoritative name server provides the IP address to the resolver, and the resolver sends it back to the
browser.
Website accessed:
• The browser uses the IP address to connect to the website.
Mr. D. Santhosh Gupta, Dept. of ECE 31
DNS Records and Messages
DNS Records
• The DNS servers that together implement the DNS distributed database store resource records.
• Each resource record contains 4 fields: (Name, Value, Type, TTL)
• TTL stands for the time to live of the resource record; it determines when a resource should be removed
from a cache
• The meaning of Name and Value depend on Type
• If Type = A, then Name is a hostname and Value is the IP address for the hostname; this record type
provides the standard hostname to IP address mapping
• If Type = NS, then Nane is a domain and Value is the hostname of an authoritative DNS server that
knows how to obtain the IP addresses for hosts in the domain; this record type is used to route DNS
queries further along in the query chain
• If Type = CNAME, then Value is the canonical hostname for the alias hostname Name
• If Type = MX, then Value is the canonical name of a mail server that has an alias hostname Name;
MX records allow the hostnames of mail servers to have simple aliases.
Mr. D. Santhosh Gupta, Dept. of ECE 32
DNS Records and Messages
DNS Messages
• There are only two
types: query and
reply.
• Furthermore, both
query and reply
messages have the
same format, as
shown in Figure.
• The semantics of the
various fields in a
DNS message are as
follows:
Mr. D. Santhosh Gupta, Dept. of ECE 33
DNS Records and Messages
• The first 12 bytes is the header section, which has a number of fields.
Parts of the header section
1. Identification Field
• 16-bit number that identifies the query
• Identifier is copied into the reply message to a query, allowing the client to match received replies with
sent queries
2. Flag field
• 1-bit query/reply flag indicates whether the message is a query (0) or a reply (1)
• 1-bit authoritative flag is set in a reply message when a DNS server is an authoritative server for a
queried name
• 1-bit recursion-desired flag is set when a client desires that the DNS server perform recursion when it
doesn't have the record
• 1-bit recursion-available flag is set in a reply if the DNS server supports recursion
3. 4 number-of fields
• Indicate the number of occurrences of the four types of data sections that follow the header.
Mr. D. Santhosh Gupta, Dept. of ECE 34
DNS Records and Messages
• The question section contains information about the query that is being made
Parts of the question section
• A name field that contains the name that is being queried
• A type field that indicates the type of question being asked about the name
• The answer section contains the resource records for the name that was originally queried
• A reply can return multiple RRs in the answer, since a hostname can have multiple IP addresses
• The authority section contains records of other authoritative servers
• The additional section contains other helpful records.
• Nslookup program allows you to send a DNS query message directly from the local host to any DNS
server (root, TLD, or authoritative)
• After receiving the reply message from the DNS server, nslookup will display the records included
in the reply (in human readable format)
• This can also be accomplished from web sites that allow you to remotely employ mslookup.
Mr. D. Santhosh Gupta, Dept. of ECE 35
DNS Records and Messages
Inserting Records into the DNS Database
• Register your domain name with a registrar
o Registrar - a commercial entity that verifies the uniqueness of the domain name, enters the domain
name into the DNS database, and collects a small fee from you for its services
o There are many registrars competing for customers, and the Internet Corporation for Assigned
Names and Numbers (ICANN) accredits the various registrars
• Provide the registrar with the names and IP addresses or your primary and secondary authoritative
DNS servers
• Then registrar ensures that a type NS and a type A record are entered into the TLD com servers
• You will have to make sure that the type A resource record for your Web server and the type MX
resource record for your mail server are entered into your authoritative DNS servers.
• Once these steps are completed, people can visit your site and send email to your domain name.
Mr. D. Santhosh Gupta, Dept. of ECE 36