+ All Categories
Home > Documents > IPv6 Enable DNS Server

IPv6 Enable DNS Server

Date post: 01-Jan-2016
Category:
Upload: phelan-vaughn
View: 52 times
Download: 1 times
Share this document with a friend
Description:
TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY SOFTLAB. IPv6 Enable DNS Server. Rosenfeld Asaf & Timor Lior. Advisor: Uritzky Max. TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY SOFTLAB. Some Background. The Project deals with several major protocols - PowerPoint PPT Presentation
21
1 IPv6 Enable DNS Server Rosenfeld Asaf & Timor Lior Advisor: Uritzky Max TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY SOFTLAB
Transcript
Page 1: IPv6 Enable     DNS Server

1

IPv6 Enable DNS Server

Rosenfeld Asaf & Timor Lior

Advisor: Uritzky Max

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 2: IPv6 Enable     DNS Server

2

Some Background

• The Project deals with several major protocols

• DNS Servers play a very important role in the Internet

• New IP Protocol is quicky spreading worldwide

• Internet servers must be stable and usable

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 3: IPv6 Enable     DNS Server

3

Domain Name Service

• Use names instead of numbers

• Servers are suffixes divided

• Servers arranged in tree like hierarchy

• Ever notice the dot ???

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 4: IPv6 Enable     DNS Server

4

DNS (cont.)

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

DNS Server

ROOT Server

.il. Server

.ac.il. Server

DNS Server Database

CLIENT

1. www.te

chnion.ac.il ?2. www.technion.ac.il ?

3. .il. Server

4. www.te

chnion.ac.il ?5. .ac.il.

Server6. w

ww

.tech

nion

.ac.

il ?

7. 1

32.6

8.1.

1

8. 132.68.1.1

9. store 132.68.1.1

for www.te

chnion.ac.il

Page 5: IPv6 Enable     DNS Server

5

Internet Protocol V6• IPv4 supports poorly distirbuted

and not enough addresses. (4G)

• Modular Packet structure

• New features

• Different handling

• No backward compatibility

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 6: IPv6 Enable     DNS Server

6

Project Goals

• Learn the DNS protocol

• Learn the IPv6 protocol

• Learn C# with MS .NET

• Implement a deployable DNS Server for IPv4 and IPv6 addresses, accoding to Industry standatds and RFCs

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 7: IPv6 Enable     DNS Server

7

Challanges• Server needs to have dual stack. Support

for both platform and service

• Usable – handle large amount of requsets in short time. Parse, Find, Build and Send while Avoiding timeouts.

• Stable – withstand bursts and DoS attacks

• Testing (DoS, multiple environments, test app.)

• Native and Joined IP environments

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 8: IPv6 Enable     DNS Server

8

Solution Concept

• Multiple Network-interface threads

• Single synchronized joined Database

• Database capable of learning

• Run-time protocol chooser

• Use .Net Socket, Threading and collections mechanisms

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 9: IPv6 Enable     DNS Server

9

Class Diagram

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

+Record_type()+Record_class()+Record_ttl()+Record_rdata()

-RR_type : object = { A, AAAA, CNAME, HINFO, MX, NS, SOA }-RR_class : object = { IN, CH }-RR_ttl : int-RR_rdata : string

ResourceRecord

+node_get_rr_array()()+add_resource_record()()+Node_owner()

-node_owner : string-node_rr_array : object-MAX_RR_AMOUNT : int

Node

1 -Domain Name0..*

11..*

«uses»

«uses»

«uses»

+Query()()+produceResponse() : object

-SourceAddress-SourceAddressFamily-QueryID-OpCode-AA-TC-RD-RA-UserEndPoint-Node_name-Record_type-Record_class

Query

+startSocket()+endSocket()+startSocketV6()+endSocketV6()+listenerStartReceive()+listenerOnReceive()

-ipv4_socket_enabled-ipv6_socket_enabled-shared_ipv4_socket-shared_ipv6_socket-DNSDB

DNSListener

+add_node() : void+remove_node()+add_rr()+get_node() : object+get_ext_node() : object+load_db()-reader_start()-reader_finish()-writer_start()-writer_finish()

-readers_count : int-write_lock : object-db_nodes_array[] : object

NodesDB

DNSMain

*

-DNSDB

1

1

*

GUI

11

Page 10: IPv6 Enable     DNS Server

10

DatabaseDemands:• Support multiple read and write

transactions• Fast !

#Domain NameDomain Address

1www.a.com132.68.1.1

2www.a.com132.69.1.2

3www.bb.com192.168.1.1

4www.a.com132.68.1.3

5www.bb.com192.168.1.2

6www.a.com132.68.1.4

7www.bb.com192.168.1.3

8www.bb.com192.168.1.4

9www.a.com132.68.1.5

10www.ccc.com2001::1

11www.bb.com192.168.1.5

12www.a.com132.69.34.6

13www.dddd.com3055:1234:5678::1

14www.a.com2003:A::ABC5

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

#Domain NameDomain Address

1www.a.com132.68.1.1132.69.1.2132.68.1.3132.68.1.4132.68.1.5

132.69.34.62003:A::ABC5

2 www.bb.com192.168.1.1192.168.1.2192.168.1.3192.168.1.4192.168.1.5

3www.ccc.com2001::1

4www.dddd.com3055:1234:5678::1

Hash container

Page 11: IPv6 Enable     DNS Server

11

Database (cont.)

• .Net Interlocked methods

• Each function is either Writer or Reader

• Wrapped in try finally

• Learns using .Net resolver

Reader

+ 1

FOO()

- 1

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Writer

BAR()

!= 0

Page 12: IPv6 Enable     DNS Server

12

Network Interface• Setting .Net framework to use IPv6• Use .Net Socket class with address families

IPv4 and IPv6• Ability handle large amout of requests

simultaneously Threads

• Starting a new thread is costy• Starting all needed threads at the beginning,

is a waste, and has a management overhead

THREADPOOL

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 13: IPv6 Enable     DNS Server

13

.NET Threadpool

• Provides a pool of threads that can be used to post work items, process asynchronous I/O, wait on behalf of other threads, and process timers

• System managed

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 14: IPv6 Enable     DNS Server

14

Network Interface (cont.)• Use StartReceiveFrom which uses threadpool• Each task re-assigns itself• v4 tasks and v6 tasks

DATABASE

MAIN THREAD

THREADPOOL

Uses single time

uses

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Try get query in Non-Blocking manner

Re-assign the task in threadpool

Handle Query

Try get query in Non-Blocking manner

Re-assign the task in threadpool

Handle Query

Try get query in Non-Blocking manner

Re-assign the task in threadpool

Handle Query

Try get query in Non-Blocking manner

Re-assign the task in threadpool

Handle Query

Page 15: IPv6 Enable     DNS Server

15

Use case

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

DNSListener Datbase

www.host.com ?

don't konw

external www.host.com?

.NET DNS resolver

www.host.com is 2001::2

User

www.host.com ?

User

www.host.com is 2001::2

www.host.com is 2001::2

www.host.com ?

Page 16: IPv6 Enable     DNS Server

16

User Interface

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

On /Off button

Changes it’s text to indicate its functionality

Server Load Indicator

Visualizes the amount of thread pool threads

that are used, from the total amount

allowed (by the user)

Protocols Chooser

Enables the user to choose which of the IP protocols are used as medium to receive requests. If a

queried host has an IPv6 address, although the IPv6 button is not marked, the

IPv6 will return, as long as the query arrived piggy backed on IPv4 packet

Database source file

Here the user inserts the file containing the names to addresses data. Since the server is capable to learn new translations, it is possible to start it with an empty file and let it

learn alone

IPv6 ready logo

This is the IPv6 ready logo which is assigned by

the IPv6 forum. A commercial server would

have need to apply for such a logo, and was

granted one after it was proved as complied with

the IPv6 standard

Page 17: IPv6 Enable     DNS Server

17

Unit Testing

• real-life scenario. Remote applications use the DNS server

• Linux tools (nslookup, dig, etc..)

• Proprietary test application

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 18: IPv6 Enable     DNS Server

18

Technology• C#• MS .NET Framwork

SocketThreadpoolContainerText.Encoding

• IPv6• DNS• Various Linux DNS test tools

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 19: IPv6 Enable     DNS Server

19

Conclusions

• Although database strucure is optimized and hash table was used, it is still the bottleneck

• Commercial DNS products do not fully implement standard

• IPv6 support is far from being friendly. MS .Net support not fully works

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 20: IPv6 Enable     DNS Server

20

Future Work

• IPSEC

• DNS-SEC

• Optimized Caching, threaded $ ?

• Mutual DNS Servers updates

• Server implemented as semi-cluster

• Threadpool fiddling - setMinThreads

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB

Page 21: IPv6 Enable     DNS Server

21

Acknowledgment

We would like to thank Max Uritzky for all the support. Always fast, regardless the day or the time !

And of course, the software lab, for answering our technical needs

TECHNION - ISRAEL INSTITUTE OF TECHNOLOGY

SOFTLAB


Recommended