First off, I'm asking mostly out of laziness. I fully anticipate reactions along the lines of "Not only no, but H*ll No!"
For background and context, I'm actually doing infrastructure for a small set of dev and test subdomains and subnets. I ~absolutely~ would not be doing this for a production network!
But, this being dev and test, projects come and go, hosts get swapped around, different PMs want different naming conventions, and I'm lazy enough to wonder if I can keep my subdomains in a single zone file. Something like this:
Code:
$TTL 1d
$ORIGIN dom.ain.
@ IN SOA ns.dom.ain. root.ns.dom.ain. (
201107291 ; Serial yyyymmddn
3600 ; Refresh 1h
1800 ; Retry 30m
86400 ; Expire 1d
1800 ) ; Minimum 30m
;
host1.sub1 IN A 123.456.1.1
host2.sub1 IN A 123.456.1.2
;
host1.sub2 IN A 123.456.1.11
host2.sub2 IN A 123.456.1.12
host3.sub2 IN A 123.456.2.11
host4.sub2 IN A 123.456.2.12
For the ~really~ odd idea, how about doing something similar with subnets? Given 123.456.1.0 and 123.456.2.0 are right next to each other, a 23-bit netmask makes them the same subnet. How might I do ~that~ in a single zone file?
Code:
$ORIGIN 1.456.123.in-addr.arpa.
$TTL 86400
@ IN SOA ns.dom.ain. root.ns.dom.ain. (
201107291 ; Serial yyyymmddn
3600 ; Refresh 1h
1800 ; Retry 30m
86400 ; Expire 1d
1800 ) ; Minimum 30m
;
1.1 IN PTR host1.sub1
1.1 IN PTR host2.sub1
;
1.11 IN PTR host1.sub2
1.12 IN PTR host2.sub2
2.11 IN PTR host3.sub2
2.12 IN PTR host4.sub2
I have my doubts about the forward zone file. If this reverse zone file actually worked, I'd fall over.
Sadly, my job is not to play, but to provide the playground for the other girls and boys. How about you all? Anyone tried it? ;D
Cheers!
dafydd
PS. On further thought: I wouldn't actually do this because it would confuse the daylights out of whoever had to take over for me if I got hit by a bus. Still fun to wonder about, though...