Implementation of Domain Name Server System using client-server model Aanchal Arora et. al.

Abstract This paper presents features of a DNS system designed to support maintenance of domain name records (i.e. add/delete/modify records), and queries of DNS records (i.e. domain name to IP address translation). It has been done through server client model where the records are kept in a database (binary files). A comprehensive approach to the model and the algorithm is delineated further.

1. Introduction Today is a world of high speed internet with millions of websites. Hence, in this era of complexity, where domain names vary just by a single character and may be too big in length, it is just impossible to request the website by its name. Hence, an IP address is assigned to each web address which can be mapped to the analogy of enrolment number to a student’s name in a college, and that is what our project all about is. It takes the web address and returns the IP address of the website from a database which in real world is spatially distributed. The Domain name server system is in true sense the backbone of the secure high speed internet [11]. As the data maintained by the server system is highly secure, the data on it should be modified only by some authenticated people, and here creeps in the concept of administrator, though at the same time accessible to everyone in order to get the domain name to IP address translation. Hence, in short, DNS system has been designed to support basic two features i.e. the maintenance of domain name records (i.e. add/delete/modify records), and secondly, queries of DNS records (i.e. domain name to IP address translation).

2. Analysis and modeling The DNS system is designed as client-server architecture. There is a server for maintaining the DNS records, as well as for handling the domain name queries [2]. There is a client process for the domain name queries, and administrative management of DNS records. The DNS system will comprise of the following entities:  Server Process  Client Process  Database The client can do query of domain name records, or modification (addition, modification or deletion) of domain name records [12]. If the client wants to do modification, she must login using Administrator account (for queries, the client need not login).

Aanchal Arora et. al.

Figure 1: Client Server model 1 for DNS At a given time, one Administrator user and multiple query users can be active. Two administrator users can not be active at same time, because the login request of the second user shall be denied. Below is a brief description of the entities involved in the architecture. The client process presents a command line interface to the human users, which could be admin user or query user. The menu shall allow the user various operations like query, login, add_record, delete_record, modify_records, display_all_records etc. [13] The maintenance operation shall be allowed only if the user has logged on as an admin.The Database stores the DNS records. It is a binary file. Each record shall have a domain name and corresponding IP address. The records will be variable sized, as the domain name’s length will vary quite significantly. The database shall also store a small password file, containing password of the Administrator. The username is always “Administrator”. Server [9] is a multithreaded process. The main thread keeps listening for new connections. On each new connection, another handler thread is spawned. The handler thread shall receive and process all the commands from clients. Different client threads will be using Reader/Writer locks.

Admin User Query User 1

CLI

Client 1 Process

CLI

Client 2 Process

TCP/IP

DB

Server Process File I/O

Query User 2

CLI

TCP/IP

Client3 Process

Figure 2: Figure 1: Client Server model 1 for DNS

2.1 Assumptions and constraints involved Assumptions :  

Linux / Unix like Operating System is available. Sufficient simultaneous file descriptors can be obtained by a single Linux process to meet requirement on number of concurrent domain name query clients.

[2]

Aanchal Arora et. al.  

Availability of single server to process the queries at any particular time. The server always replies to the client. Availability and correct functioning of binary files to hold the data.

Constraints:    

The user interface is constrained to be simple menu based or CLI based textual interface. Availability of GCC compiler Authentication is based on user’s input and password database data. Performance decreases as number of users increase.

Figure 3: Client – Server model 3 for DNS

3. Design Structural Design Approach is followed. A function oriented approach is used. This is just by dividing the given system into the modules and sub modules and further into functions. It helps in identifying, modeling and documenting the data requirements of the system being designed, and how data moves around a system, and the events that affect each entity and the sequence in which these events occur.

3.1 Partitioning The breakup of the implementation into modules is given below  client : Main (and only) module of client implementation.  server_main : Main Thread of Server process : Takes care of listening for new connections, and creates a handler thread for each new connection.

[3]

Aanchal Arora et. al.

 

 

server_handler : Handler thread of Server Process : Processes the message coming from (Administrator or Query) clients. server_db : Manages maintenance of DNS database. It hides the actual representation of DNS records in the binary file from other modules, and provides simple API functions to add/delete/modify records. It assumes that synchronization is already taken care of. It also provides utilities to manage the Administrator password, which is stored in a separate file. server_sync : Provides synchronization utilities to protect the shared database file and the shared cache. Reader Writer locks shall be used. It hides the details of how the locks are implemented from other modules. common : Shared module providing common implementation between client and server. It shall provide below functionalities.  Utility functions for read/write over socket (Delineation of messages is required as they are TCP sockets which are stream like)  Encode/Decode functions for different kind of messages: The functions shall take care of mapping between native C structs, and the platform independent Interface messages.

3.2 Internal Interfaces The format of the message structure being used between client and server is given in this section. Each message consists of a common header, followed by message specific parameters [14]. The header gives below information : Message ID : A 2 byte integer specifying the message identifier. Message Length : A 2 byte integer specifying the length of the message (Length includes length of the header) For different messages, there will be different parameters present in the message body. The value of message ID, shall dictate which parameters are present.

MSG ID (MSB) MSG ID (LSB) LENGTH(MSB) LENGTH(LSB)

Some of the message structures which are used are as below : 1) Login_req This message is sent by the client to log-on to the server. Username is not required to be sent as it is always “Administrator”. Password length (1 byte) : gives length of string Password. Password is null terminated. 2) QUERY_DNS_REQ This message is sent by the client for DNS Query Domain Name length (1 byte) : gives length of domain name. Domain name is null terminated. 3) QUERY_DNS_RES This message is sent by the server to indicate the IP Address found or indicate error.

[4]

Aanchal Arora et. al.

3.3 Implementation Pseudocode for main function of client_main module

Pseudocode for main() function in the module server_main { Create a socket Bind the socket to the address structure do { Listen to connections Accept connection Create a handler thread for each new connection } while server runs }

{ Create a socket Connect to the created server socket Accept user type (admin or normal user) DO { Switch (user_type) { Case Admin: CALLS login() Accept message from user(Admin) and perform desired operation Case normal user: Accept message from user(normal user) CALLS user_query() Default: OUTPUT wrong choice } } WHILE user wants to continue Close Socket Descriptor }

Table 1: Pseudocode for client_main and server_main module

Database (Server_db): Pseudo code for add_dns(add_dns_request_t *ptr ,error_t *perr) Search for dns domain name in database file If (duplicate dns domain name exists) { Set error reason Return (DNS_FAILURE) } Else { Search for empty record. If (found ) add record in that position. Else . add record to end of the file Return(DNS_SUCCESS) }

[5]

Aanchal Arora et. al.

Pseudocode for handler() function in server_handler module {

Pseudocode for Add_dns_handler() function in server_handler module {

CALLS read_message(socket_des,buf) CALLS msg_decode(buf,(void *) msg) CHECK msg_id {

call functions Switch(msgid) { typecast msg to structure based on msg_id for each case; CASE QUERY_DNS_REQ: Query_dns_handler (Connect_des,query_dns_request_t); CASE LOGIN_REQ: Login_handler (connect_des,login_request_t); CASE ADD_DNS_REQ: Add_dns_handler (connect_des,add_dns_request_t); CASE MODIFY_DNS_REQ: Modify_dns_handler (connect_des,modify_dns_request_t); CASE DELETE_DNS_REQ: Delete_dns_handler (connect_des,delete_dns_request_t); CASE DISPLAY_DNS_REQ: Display_dns_handler (connect_des,display_dns_request_t); } } }

ENABLE WRITER_LOCK CALLS add_dns(add,&erid) and saves return value in FLAG If flag is false Set COMMON_RESP_ID to DNS_FAILURE Assign COMMON_RESP_ID to msg_id CALLS msg_encode(Comman_res_t,buf); CALLS socket_write(connect_des, buf); else Set common response to DNS_SUCCESS Assign COMMON_RESP_ID to msg_id msg_encode(Comman_res_t,buf); socket_write(connect_des, buf);

}

RELEASE WRITER_UNLOCK Return COMMON_RESP_ID

Table 2: Pseudocode for handler function and add_dns_handler function in server_handler Similar pseudo code has been designed for modify_dns and delete_dns

Results DNS system is implemented with its design that is platform independent. The client and server processes can potentially run on different platforms [9]. The design presented is a simple and elegant one. The number of active servers have not been considered important so that they can be added later as an enhancement.

Figure 4: Image displaying running server and client requesting a record display

[6]

Aanchal Arora et. al.

Figure 4: Image displaying running client requesting to add a DNS record

Future scope There can be different proposals for further advancement of this basic implementation. Recursive search can be a beneficial modification [10] wherein a server forwards the request to another server if it fails to process the request. The binary file which has been used for maintaining of databases can have internally used data structures like hashing, binary search tree, and linked list. Linked list is ruled out, as it adds very little speed efficiency. Binary search tree is also ruled out due to complex implementation. The binary file could have been designed so that no “holes” or vacant data structure are there. That approach is here rejected because it would involve shifting of large file contents.

References [1] Brett Helsel (2000), Adding intelligence to standard DNS, Volume 18 , Issue 2, Pages: 19 - 21 . [2] Jeffrey Pang, James Hendricks, Aditya Akella, Roberto De Prisco, Bruce Maggs. Srinivasan Seshan (2004), Availability, usage, and deployment characteristics of the domain name system, Pages: 1 – 14, University of Salerno, Carnegie Mellon University, Pittsburgh, PA. [3] Zhuoqing Morley Mao, Charles D. Cranor, Fred Douglisy, Michael Rabinovich, Oliver Spatscheck, and Jia Wang, A Precise and Efficient Evaluation of the Proximity between Web Clients and their Local DNS Servers, AT&T Labs–Research. [4] Azer Bestavros and Sumit Mehrotra (2001), DNS-based internet client clustering and characterization, Technical Report, BUCS-TR-2001-012, Boston University. [5] M. Colajanni, P. S. Yu, and D. M. Dias (1998), Analysis of task assignment policies in scalable distributed Webserver systems, IEEE Transactions on Parallel and Distributed Systems, 9(6):585–600. [6] B. Krishnamurthy, C. Wills, and Y. Zhang (2001), On the use and performance of content distribution networks. In Proceedings of ACM SIGCOMM Internet Measurement Workshop (IMW’2001). [7] Balachander Krishnamurthy and JiaWang (2000), On Network- Aware Clustering of Web Clients. In Proceedings of ACM SIGCOMM’2000. [8] Venkata N. Padmanabhan and Lakshminarayanan Subramanian (2001), An investigation of geographic mapping techniques for internet hosts. In Proceedings of the ACM SIGCOMM 2001.

[7]

Aanchal Arora et. al.

[9] Anees Shaikh, Renu Tewari, and Mukesh Agrawal (2001), On the effectiveness of DNS-based server selection. In Proceedings of IEEE Infocom 2001. [10] Jaeyeon Jung, Emil Sit, Hari Balakrishnan, Member, IEEE, and Robert Morris. DNS Performance and the Effectiveness of Caching. [11] Web Link - http://www.howstuffworks.com/dns.htm [12] P. Mockapetris (Nov. 1987), Domain Names—Concepts and Facilities, RFC 1034. [13] P. Mockapetris (Nov. 1987), Domain names—Implementation and Specification, RFC 1035. [14] Web Link - http://www.bind9.net/dns-parameters. [15] P. Danzig, K. Obraczka and A. Kumar (Aug. 1992), An analysis of wide-area name server traffic: A study of the Internet domain name system, in Proceedings of the ACM SIGCOMM, pp. 281–292.

[8]

Implementation of Domain Name Server System using ...

Today is a world of high speed internet with millions of websites. Hence, in ... system is in true sense the backbone of the secure high speed internet [11]. As the ...

171KB Sizes 13 Downloads 283 Views

Recommend Documents

pdf domain name system
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. pdf domain ...

Securing the Domain Name System with BIND By ...
May 8, 2013 - Besides, if you likewise have no time at all to search guide DNSSEC Mastery: Securing The Domain Name. System With BIND By Michael W ...

white-hat hacking across the domain name system
Domain Name System (DNS) was created to cope with the growing lists of domain ... the configuration problem with the File Transfer Pro- tocol (FTP). ..... ing a security vulnerability (see en.wikipedia.org/wiki/Pwned for more information).

Implementation of Portable ECG Data Acquisition System using ... - IJRIT
can receive the updates through media like mobile phones and cautioned whenever an emergency service is required. Keywords: ARM7TDMI, LPC2148, SPI ... dumped into the LPC2148 through the serial UART port using Flash Magic software. During this proces

Implementation of Portable ECG Data Acquisition System using ... - IJRIT
The objective of ECG signal analysis is to improve the measurement accuracy ... The project thesis consists of a customized ARM7 development board that uses ...

Domain modelling using domain ontology - CiteSeerX
regarded in the research community as effective teaching tools, developing an ITS is a labour ..... International Journal of Artificial Intelligence in Education,.

Domain modelling using domain ontology
automate the acquisition of domain models for constraint-based tutors for both ... building a domain ontology, acquiring syntactic constraints directly from the.

Design and Implementation of a Fast Inter Domain ...
Jul 6, 2006 - proximity of virtual machines sharing data and events can .... that share file systems is already being investigated [14] [15]. [16]. It is not ...

SERVER MONITORING SYSTEM
Department of Computer Science and Information Technology ... SYSTEM” in partial fulfillment of the requirements for the degree of ... the period of last three and half years. .... CHAPTER 2: REQUIREMENT AND FEASIBILITY ANALYSIS .

Implementation of SQL Server Based on SQLite Engine on Android ...
Keywords: Embedded Database, android, android platform, SQLite database ..... 10. Motivation. The application under consideration, The SQL database server, ...

Implementation of SQL Server Based on SQLite ... - IJRIT
solution can be used independent of the platform that is used to develop mobile applications. It can be a native app(. iOS, Android), a mobile web app( HTML5, ...

Implementation and Empirical Evaluation of Server ...
IBM, SAP and NTT) geographically distributed over three continents (Microsoft .... ACM Symposium on Applied Computing (ACM SAC 2005), Special Track on.

eBook Télécharger DNS Security: Defending the Domain Name ...
1 I celebrate myself and sing myself And what I assume you shall assume For every atom belonging to me as good belongs to you I loafe and invite my soul.

Server-side recycle bin system
Aug 25, 2005 - data residing on the local computer's hard disk drive only. The Windows® operating systems do not protect the data residing on any of the other ...

Server-side recycle bin system
Aug 25, 2005 - via a wide area computer network, a local area network, the. Internet, of any other ... Local Computer System J. /. File Manager. Application. Server. 3. 6. 9. File Serving Application l "l. 12. 2. 5. 8. \ 'Uger's recycle bin. Mass Fil