4

How do I deal with the case where a domain has addresses in more than one subnet?

EG: (bob.com)

joe.bob.com    A  14400  10.20.0.10  
jim.bob.com    A  14400  10.20.0.11  
mary.bob.com   A  14400  10.20.1.10  
susan.bob.com  A  14400  10.20.1.11 

(0.20.10.in-addr.arpa)

0.20.10.in-addr.arpa    14400   NS    bob.com  
0.20.10.in-addr.arpa    14400   PTR   blahblahblah   
10                      14400   PTR   joe  
11                      14400   PTR   jim

(1.20.10.in-addr.arpa)

1.20.10.in-addr.arpa    14400   NS    bob.com  
1.20.10.in-addr.arpa    14400   PTR   blahblahblah   
10                      14400   PTR   mary  
11                      14400   PTR   susan

I have my 'forward' zone file setup - seems like I need multiple 'reverse' files though.

zone "bob.com" {
    type: master;
    etcetc
};

zone "0.20.10.in-addr.arpa" {
    type: master;
    etcetc
};

zone "1.20.10.in-addr.arpa" {
    type: master;
    etcetc
};

Can I put both of these entries in named.conf on the same machine or do I have to break it up somehow between multiple files / machines?

3 Answers 3

7

You do not need to worry about subnets when it comes to the reverse domain lookup. You should setup your files in a way that makes sense for you. Are you going to have many machines? Can you put them all in one file? If that is the case, simply let the reverse lookup 10.20.. addresses and then list the addresses in this file.

[named.conf.local]

zone "20.10.in-addr.arpa" {
    type master;
    file "/etc/bind/db.10.20";
    allow-query { internal; };
};

[db.10.20]

$ORIGIN 20.10.in-addr.arpa.
$TTL 1W
@                       1D IN SOA       bob.com. root.bob.com. (
                                        2011020501      ; serial
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                        1D IN NS        ns.bob.com.
10.0                     PTR     joe.bob.com.
10.1                     PTR     mary.bob.com.
2
  • 1
    This is also a good option if your subnets are logically broken out in some way other than by Class C blocks -- e.g. my company uses 10.site.section.x addresses, so we have a site.10.in-addr.arpa reverse zone for each site and only have to edit one spot when IP assignments at a given site change
    – voretaq7
    Apr 15, 2011 at 14:14
  • For same machine, how does it ?
    – richardaum
    Jul 7, 2015 at 15:13
2

You will need multiple files for your reverse lookup tables, one per subnet, but there is no need to do any machine based splitting. It looks like you are already on track for that.

1
  • 1
    To add - The traditional solution is to create one reverse zone per class C network (/24).
    – voretaq7
    Apr 15, 2011 at 14:12
0

It will ultimately depend on how those subnets are delegated for reverse DNS. If they're in private IP space you and slice and dice however you want as long as the authoritative server is configured to answer them. If you're talking about public IP space, then the upstream IP provider may have to delegate them as individual subnets and in that case it would be prudent to configure your DNS server the same way they're delegating them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .