#1
  1. No Profile Picture
    YaBN (Yet another BSD Newbie)
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Posts
    74
    Rep Power
    14

    DJBDNS ns1 and ns2


    Hi, right now I'm setting up ns1 and ns2 for a server to run dns. To setup tinydns i'm using the line 'tinydns-conf tinydns dnslog /etc/tinydns ip.is.he.re'

    I'm not sure if this ip setup is the 'right' way, but if you have any suggestions, I'd love to hear them. As of right now, there is one ip for the server. There is another ip for ns1, and another for ns2. (I'm not sure if it's right to make ns1 and the server the same) I guess I could probably use the ns1 ip as the server ip, but is it good to have the servers hostname as ns1? Is that right?

    The main question is how to setup tinydns. I'm not sure of what ip I should put there. Should it be ns1? Shoudl I put the ns1 ip there and then add the ns2 ip to /etc/tinydns/env/IP so that there is the ns1 and ns2 ips in there? Thanks!
    -MattWil
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    >> To setup tinydns i'm using the line 'tinydns-conf tinydns dnslog /etc/tinydns ip.is.he.re'

    I don't remember what's your server OS. If it's any BSDs, mkdir a /var/djb directory and use /var/djb/tinydns instead (my standard), just don't use djb's hier standard (/etc/tinydns) because it's highly non-standard.

    >> I'm not sure if it's right to make ns1 and the server the same

    I'm confused. How many box do you have? How many IP?

    >> is it good to have the servers hostname as ns1?

    Very common.

    >> and then add the ns2 ip to /etc/tinydns/env/IP

    You can't do that. You need to run multiple tinydns and bind each of them to different IP using the tinydns-conf script. Anyhow, running both ns1 and ns2 on the same box defeats the purpose of having a slave nameserver in the first place.
  4. #3
  5. No Profile Picture
    YaBN (Yet another BSD Newbie)
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Posts
    74
    Rep Power
    14
    >> To setup tinydns i'm using the line 'tinydns-conf tinydns dnslog /etc/tinydns ip.is.he.re'

    I don't remember what's your server OS. If it's any BSDs, mkdir a /var/djb directory and use /var/djb/tinydns instead (my standard), just don't use djb's hier standard (/etc/tinydns) because it's highly non-standard.
    I would like to use FreeBSD personally , but the person who I am helping bought a Sun server. It's Solaris 8.

    >> I'm not sure if it's right to make ns1 and the server the same

    I'm confused. How many box do you have? How many IP?
    There is 1 box, and we have about 20 ips as of now that are ready for use. I'm just wondering if the ns1 ip should be the ip to the server. Which would make the hostname of the server ns1.domain.com.

    >> is it good to have the servers hostname as ns1?

    Very common.
    Would it just be wasting an ip if we made the server and ns1 different ips?

    >> and then add the ns2 ip to /etc/tinydns/env/IP

    You can't do that. You need to run multiple tinydns and bind each of them to different IP using the tinydns-conf script. Anyhow, running both ns1 and ns2 on the same box defeats the purpose of having a slave nameserver in the first place.
    I've never setup djbdns with nameservers like this, so I'm not totally clear on how to. I know that when you run the tinydns-conf program, you are telling it to use the ip which dns will listen on. We haven't found someone to swap dns servers with yet, so for now I want to run ns1 and ns2 on the same server. I just don't know if I need to have it listen on both of the ips or not. For instance, if we were to switch secondary dns servers with someone else, would we have to run two instances of tinydns for their ns2 ip? That just still seems odd to me because wouldnt' that make two data files?

    Thanks for the help!
    -MattWil
  6. #4
  7. No Profile Picture
    YaBN (Yet another BSD Newbie)
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Posts
    74
    Rep Power
    14
    I was just thinking and I'm still confused on this. For ns1 and ns2, wouldn't I just do something like this in the data file?

    Code:
    +ns1.domain.com:1.2.3.101
    +ns2.domain.com:1.2.3.102
    I guess the main things that I don't get are, is it correct to set the hostname to ns1. And second, what ip should tinydns listen on?

    Thanks!
    -MattWil
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    >> There is 1 box, and we have about 20 ips as of now that are ready for use

    Tjen choose two IPs and set your NIC to 1.2.3.101 and create alias on the NIC and assign 1.2.3.102 to it. Note, this is the very first step you must do before configuring tinydns.

    I'm just wondering if the ns1 ip should be the ip to the server. Which would make the hostname of the server ns1.domain.com
    Yes.

    >> Would it just be wasting an ip if we made the server and ns1 different ips?

    I don't see there's a problem with a hostname like "mail.domain.com", "ns1.domain.com" or the like. Since he has plenty of IPs, why can't he set his system hostname to ns1.domain.com?

    >> you are telling it to use the ip which dns will listen on

    Make sure your NICs are setup accordingly before doing this.

    >> I just don't know if I need to have it listen on both of the ips or not

    Yes you do. You need to run tinydns-conf twice, with different IP and path (i.e. /var/djb/tinydns-master and /var/djb/tinydns-slave respectively or whatever name you like).

    >> wouldn't I just do something like this in the data

    That'd be A record only, and you definitely need more than that. Here's an example of /var/djb/tinydns/root/data (/service/tinydns/data):
    Code:
    Zdomain.com:ns1.domain.com:hostmaster.domain.com
    &domain.com::ns1.domain.com
    &domain.com::ns2.domain.com
    +ns1.domain.com:44.33.22.11
    +ns2.domain.com:44.33.22.12
    +ftp.domain.com:44.33.22.11
    +www.domain.com:44.33.22.11
    +domain.com:44.33.22.11
    @domain.com::ns1.domain.com.:0
  10. #6
  11. No Profile Picture
    YaBN (Yet another BSD Newbie)
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Posts
    74
    Rep Power
    14
    Sorry, I know this is a little old but I had one more queston...

    I setup /var/djb/tinydns-master and /var/djb/tinydns-slave.

    For the data file in /var/djb/tinydns-master/root I've set it up like you show. For the data file under slave, would it be like this?

    Code:
    Zdomain.com:ns1.domain.com:hostmaster.domain.com
    &domain.com::ns1.domain.com
    &domain.com::ns2.domain.com
    +ns1.domain.com:44.33.22.11
    +ns2.domain.com:44.33.22.12
    +ftp.domain.com:44.33.22.11
    +www.domain.com:44.33.22.11
    +domain.com:44.33.22.11
    @domain.com::ns1.domain.com.:0
    Or would I change it to have:

    Zdomain.com:ns2.domain.com:hostmaster.domain.com

    and

    @domain.com::ns2.domain.com.:0

    Thanks!
    -MattWil
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    For the data file under slave that should only be:
    Code:
    # Do not edit this file
    # data.cdb is to be copied from ns1
    9
    >> Or would I change it to have:
    >> Zdomain.com:ns2.domain.com:hostmaster.domain.com

    You can't. That Z line, the 2nd one followed by the colon (ns2.domain.com) is known as SOA record's MNAME. One domain can only have ONE SOA record, usually the MASTER nameserver of that domain.

    Just so you know, only tinydns-master has the authority to modify data, rebuild it to data.cdb. tinydns-slave just can't do that because its data.cdb is supposed to by sync'ed from tinydns-master. Have a look at http://www.lifewithdjbdns.org/

IMN logo majestic logo threadwatch logo seochat tools logo