Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Magik6k

DNS System

Recommended Posts

DOMAIN NAME SYSTEM

 

 

Yep. This one works much like real one - but it's a little simpler.

 

 

Basic system setup/configuration/howto/whatever

The most important part of every global DNS system are root-server. In real life there are 13 of these, but for Minecraft one server should be enough(ofc. you can have more root-servers). To be able to use DNS system the client must know at least one root server. Now let's say we want few domains in our system:

  • example.org.
  • sub.example.org.
  • populardomain.org.

Now we create example network of 3 servers, with addresses addr1, addr2, addr3

 

The first server will be root server, the second will operate .org. zone and last one .example.org.

 

Now you may wonder what are these dots after addresses - They are 'zones'. So for example address 'sub.example.org.' requires asking 3 zones to get address. Going from back, the first zone is the 'root zone' and is stored on root server. Root zone knows .org. zone and asks it about sub.example, then .org. asks .example.org. about sub.example.org.

 

In my implementation there are 2 types of fields:

a - address

ns - name server - address of other DNS server that may know more about zone it is contained in.

 

If requested record could not be found on server, the user will be directed to 'nearest' name server that may know something more.

 

This way we can configure our servers to contain following fields:

server 1(addr1) - root server
ZONE org.
    NS -> addr2
ZONE net.
    NS -> otheraddr

server 2(addr2)
ZONE org.
    ZONE populardomain.com.
        A -> addresstohost1
    ZONE example.org
        NS -> addr3

server 3(addr3)
ZONE org.
    ZONE example.org.
        A  -> exampleaddr1
        ZONE sub.example.org.
            A  -> exampleaddr2

Do the thing in real minecraft life

 

All steps require servers with OSes on HDD!!

 

Server 3:

Put some floppy to server(or small hdd)

[Install dnsserver]
# fddid

 chose drive and set label 'example'

 

Do same thing with Server 2 and 1(root server), but set labels like 'org' and 'root', then

Root server(Server 1):

Put floppy/hdd labeled with 'org' or whatever

# nsctl setfdd ns orgDriveLabel org

Then on the .org server(Server 2) put example.org fdd/hdd

# nsctl setfdd ns exampleOrgDriveLabel example.org
# nsctl set a addresstohost1 populardomain.com

And finally on the third server do:

# nsctl set a exampleaddr1 example.org
# nsctl set a exampleaddr2 sub.example.org

After doing all that stuff on the client set the root dns using the fdd/hdd created earlier:

# resvctl setroot fdd rootFddOrHddLabel

Finally on the client you should be able to do:

# resolv sub.example.org

and see 'exampleaddr2' as a result

 

(Of course you can design the network in any way you want, you may create any TLD's you want, you may use TLS's as any other domain, and you can store the whole system on one server)

 

INSTALLATION(through MPT)

 

Both:

# pastebin run KaATrNkb
# mpt ppa add m6koc

Then, for servers:

# mpt install dnsserver
# reboot

reboot is required to get server running

Or clients:

# mpt install dns

API

The 'dns' package provides super-simple API for resolving, in fact only one function, returning requested computer card address

dns.resolv(hostname: string):string

TODO's

  • Check this post for mistakes
  • Create cache'ing servers to speed-up things
  • find better way of carrying addresses than fdd/hdds(Ideas?)

Code?

 

http://cc.nativehttp.org/web.html?ppa=m6koc

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.