Dns Final Report Complete
Dns Final Report Complete
1
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
Index
INDEX .................................................................................................................................................1
ABSTRACT ........................................................................................................................................4
1. INTRODUCTION ..........................................................................................................................5
1.1 PROJECT GOAL ............................................................................................................................5
1.2 DOMAIN NAME SYSTEM ..............................................................................................................5
1.3 OPNET PLATFORM......................................................................................................................5
1.6.1 Preparations ........................................................................................................................6
1.6.2 Operating the dns_app project ............................................................................................6
1.7 USING THE DNS CLIENT-SERVER MODEL ....................................................................................6
2. THEORETICAL BACKGROUND - THE DOMAIN NAME SYSTEM ..................................8
2.1 GENERAL .....................................................................................................................................8
2.2 DESCRIPTION ...............................................................................................................................8
2.3 DNS STRUCTURE ........................................................................................................................8
2.4 DNS DATABASE ITEMS ..............................................................................................................11
2.5 DNS PACKET FORMAT ...............................................................................................................11
2.6 DNS RESOLUTION ALGORITHMS ................................................................................................12
2.6.1 The recursive algorithm.....................................................................................................12
2.6.2 The iterative algorithm ......................................................................................................13
3. THEORETICAL BACKGROUND - OPNET MODELER BACKGROUND........................16
3.1 GENERAL ...................................................................................................................................16
3.2 SIMULATION STRUCTURE...........................................................................................................16
3.3 MODELING DOMAINS..................................................................................................................16
3.3.1 Network Domain................................................................................................................17
3.3.2 Node Domain.....................................................................................................................17
3.3.3 Process Domain.................................................................................................................18
3.4 DERIVED MODEL .......................................................................................................................21
4. THE SERVER DATABASE........................................................................................................22
4.1 CLASS RESOURCE_RECORD ......................................................................................................23
4.2 CLASS ZONE ..............................................................................................................................23
4.3 CLASS DB .................................................................................................................................24
5. THE CLIENT / SERVER MODULES .......................................................................................26
5.1 ETHERNET BASE MODEL ............................................................................................................26
5.2 GENERAL OVERVIEW OF OPNET DNS SENARIO .......................................................................27
5.3 DNS PACKET...............................................................................................................................28
5.4 CLIENT NODE MODEL.................................................................................................................32
5.4.1 General background ..........................................................................................................32
5.4.2 Application node – process hierarchy ...............................................................................33
5.4.3 Dns node – process hierarchy ...........................................................................................35
5.4.4 Tpal node – process hierarchy ..........................................................................................37
5.5 SERVER NODE MODEL ................................................................................................................39
5.5.1 General background ..........................................................................................................39
5.5.2 Application node – process hierarchy ...............................................................................40
5.5.3 Tpal node – process hierarchy ..........................................................................................43
5.5.4 UDP node – process hierarchy..........................................................................................43
6. SUMMARY AND CONCLUSIONS ...........................................................................................44
6.1 SUMMARY .................................................................................................................................44
6.2 COMPARISON OF GOALS WITH RESULTS .....................................................................................44
6.3 REMARKS ON PROJECT PROBLEMS .............................................................................................45
2
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
3
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
Abstract
Throughout the World Wide Web the DNS protocol fills a main role in allowing
people use the network and find their way around. Enabling the transparent
translation from human language to computer’s, the DNS lets us know where we
want to go in the net without knowing the 32-bit IP-address of our destination but
by knowing a meaningful name representing it.
In this project we designed DNS compliant client and server models. The DNS
server model is a Name Server and it is programmed to resolve DNS queries using
the two protocol based algorithms. Using these basic objects the simulation was
configured.
The models and simulation of the DNS protocol was designed using the OPNET
modeler platform, written in C++.
The project, through its independent models, allows for future projects the use of
the designed model for creating more simulations or other enhancements.
One such enhancement will be done in part B of this project in which we will add
real delays taken from experimental measurements. The system allows for easy
adding of different delay times to be used by the simulation, in order to allow for
analysis of reality based timing.
4
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
1. Introduction
5
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
•
(In edit-preferances)
Mod_dirs – dns op_model location (in first line in the directory list).
• The resource-record file location & name – the file should be located in the
same directory as the OPNET modeler executable file. It's name should be
<model_name>.txt (e.g. yahoo_com.txt where the server's name is edited to
be yahoo_com).
1.6.2 Operating the dns_app project
• Start the OPNET modeler.
• Open the dns_app project.
• Run simulation.
•
(for future use - new scenarios)
Start the OPNET modeler.
• Open a new project.
6
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
7
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
This next chapter will give you better understanding of the DNS protocol, its
structure and algorithms.
This is the foundation on which the "DNS client-server model" project leans
upon.
2.1 General
Almost every one knows some Internet sites address, such as www.cnn.com.
What would it be like if we needed to remember this instead- 192.10.155.23?
The DNS – Domain Name System gives us the comfort of “knowing” Internet
addresses, by knowing an understandable and easy to remember name, which on the
system will be translated to an actual 32 bit Internet address.
The DNS protocol provides the mechanism to make the translation possible,
dynamic, fast, and available on many locations.
This system is used for different web sites (e.g. http, ftp, and telnet) and for other
net-based application mainly – e-mail. The protocol is implemented over UDP
transport protocol.
2.2 Description
The Domain Name System is a distributed database. This allows local control of the
segments of the overall database, yet data in each segment are available across the
entire network through a client-server scheme.
Name Servers constitute the server half of the DNS's client-server mechanism.
Name Servers contain information about some segments of the database and make
it available to clients.
8
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
The domain names are divided starting at the root. The second level in the tree is
consisted of three groups: generic domains; country domains; inverse domain.
In figure 2.1 we can see the top division of the domain tree.
The relative identifier, along with its chain of parent nodes' labels separated by dots,
creates a unique name.
For example – the name of the node "comnet" in the figure 2.2 is:
comnet.technion.ac.il (the root does not add an extra ".") as seen by the arrows.
il uk
ac co edu
technion biu
comnet
9
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
il uk
technion.ac.il domain
ac co edu
technion.ac.il zone
technion biu
comnet
comnet.technion.ac.il zone
10
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
Query Response
Header Header
identical
Answer section
Authoritative section
Additional section
11
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
12
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
Root server
if cached if cached
10 9
4
3
if cached
8
com il
if cached
11 5
2 ac.il 7
if cached
12
6
walla.com
technion.ac.il
1
Query= comnet.technion.ac.il
1.Name server accesses another name server with an iterative mapping request.
2.1 Server has Authority –
2.1.1 Server has IP (lowest authority-zone/cached) – sends response with requested
IP.2.1.2 Server doesn’t have IP – sends back IP to another name server lower in the
hierarchy that is closer to the requested address.
2.2 Server doesn’t have authority –
2.2.1 Server has IP (cached) - sends response with requested IP.
2.2.2 Server doesn’t have IP - sends back IP closest name server to requested
address (parent/cached name server).
ac.il
com (has ac.il NS IP)
Q:comnet.technion.ac.il
if cached
3 4
if cached
Q:comnet.technion.ac.il 5
2
technion.ac.il
if cached 7
8
6
1 Q:comnet.technion.ac.il
Q:Comnet.technion.ac.il
walla.com
14
Project site: http://www.comnet.technion.ac.il/~cn10w02
Computer Networks Lab Winter 2002
15
Project site: http://www.comnet.technion.ac.il/~cn10w02