#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    2
    Rep Power
    0

    BIND subdomain growing pains


    Hi,
    I'm trying to create a subdomain in the same zone as its parent but am having a little trouble. The following is a representative version of my zone (the names have been changed to protect the innocent).

    Code:
    $TTL 300
    @ IN SOA ns1.domain.com. support.domain.com. (
            2013030602;     serial
            28800;          refresh, seconds
            7200;           retry, seconds
            3600;           expire, seconds
            300 );          minimum, seconds
    
    
    ; Nameservers
    ; Name            TTL     Class   Type    Value
    domain.com.       300     IN      NS      ns1.domain.com.;
    domain.com.       300     IN      NS      ns2.domain.com.;
    domain.com.       300     IN      NS      ns3.domain.com.;
    ns1               300     IN      A       1.1.1.1
    ns2               300     IN      A       1.1.1.2
    ns3               300     IN      A       1.1.1.3
    
    ;
    ; Start of domain.com hosts.
    ;
    ; Name            TTL     Class   Type    Value
    host1             300     IN      A       1.1.1.4
    host2             300     IN      A       1.1.1.5
    ;
    ; End of domain.com hosts.
    ;
    To add the subdomain, I have added the following lines to the end of the zone file for domain.com:

    Code:
    ;
    ; Start of subdomain
    ;
    ; Set the origin.
    $ORIGIN subdomain.domain.com.
    ; Name            TTL     Class   Type    Value
    @				  300     IN      NS      ns1.domain.com.
    @				  300     IN      NS      ns2.domain.com.
    @				  300     IN      NS      ns3.domain.com.
    host3                   300     IN      A       1.1.2.1
    host3             300     IN      A       1.1.2.2
    ;
    ; End of subdomain
    ;
    As far as I can tell, this is a valid configuration and everything seems to work well with the exception: that querying the name servers for subdomain.domain.com times out.

    Code:
    $ nslookup -query=ns subdomain.domain.com ns1.domain.com
    ;; connection timed out; no servers could be reached
    Anyone have any ideas?

    Thanks,

    Matt
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    873
    Rep Power
    275
    to my knowledge, you should only need to add the 2 host3 statements after your host1 and host2 statements.
    as a subdomain == hostname, meaning host3 is considered a subdomain just as your host1 and host2 are also considered a subdomain.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    2
    Rep Power
    0
    DonR,

    I think you're right - placing additional NS statements in the subdomain section of zone file is not requred.

    I was being confused by the lack of NS results from nslookup.

    A 'dig @ns1.domain.com dubdomain.domain.com NS' seems to give e better result and dnsstuff.com give me a green light for the subdomain.

    Thanks,

IMN logo majestic logo threadwatch logo seochat tools logo