Web Hosting Talk







View Full Version : DNS&Bind 9.2.1 examples & Questions:


pickles
10-11-2002, 11:25 AM
I'm implenting bind 9.2.1 and following along in O'Reilly's DNS&Bind 4th edition book. I'm having a problem making the jump from their examples to what I should be implementing.
Could anyone compentent in this area review the questions below and offer answers or suggestions. I don't mind a "RTFM" answer, unles I have, and am still stumped.

Thanks in advance:

Q1) DNS&Bind stated that the first field after the SOA in the SOA record is the "primary master name server" for the zone/domain. Given this (and their example) I would expect the following, given a zone of myhost.com and a ns of ns1.myns.com:

myhost.com. IN SOA ns1.myns.com. hostmaster.myhost.com. ( ....)

What causes me confusion is I've seen files that look like this:

myhost.com. IN SOA myhost.com. hostmaster.myhost.com. (.....)


Q2) Reverse Mapping (address to name) files: Given a multi-homed enviroment, where many domains use the same IP, how/why/when would you implement a db.111.222.333.444 file?
Which domains would you do this for in a typical hosting environment where most of the domains are multi-homed and use the same ip?


Q3) I'v read and re-read the section on Negative TTL (last field in the SOA record). I simply can't understand how this is used, or a proper value to set it to. Does it behave differently in a secondary NS vs a primary NS? What is a good rule of thumb for this?

Q4) In DNS&Bind, they provide an example of movie.edu. After studing the example, I don't see any A records that actually offer an address for movie.edu. See abrievated example below and PLEASE comment.

movie.edu. IN SOA terminator.movie.edu. hostmaster@movie.edu. (....)

movie.edu. IN NS terminator.movie.edu.
movie.edu. IN NS wormhole.movie.edu.

localhost IN A 127.0.0.1
carrie IN A 111.222.333.444
home IN A 111.222.333.441

big IN CNAME carrie

Where/how does movie.edu get its address assigned?
I would expect an "A" record for movie.edu.



Template Example:
Not withstanding my obvious struggle and ignorance here, what follows is a template I "think" I'll use for my domains. Please offer any comments that
apply:

<Start File>
$TTL 1d
myhost.com. in SOA ns1.myns.com. hostmaster@myhost.com. (
yyyymmddhhmmss ; serial
1d ; Refresh
1h ; Retry (secondary NS?)
1w ; Expire
1d) ; Neg TTL cache

myhost.com. IN NS ns1.myns.com.
myhost.com. IN NS ns2.myns.com.

myhost.com IN A 111.222.333.441
www IN A 111.222.333.441
ftp IN A 111.222.333.441

IN MX 10 myhost.com ; <= Why is the first field blank?

<End File>


Bob

Joey
10-11-2002, 12:00 PM
> Q1) DNS&Bind stated that the first field after the SOA in the SOA
> record is the "primary master name server" for the zone/domain. Given
> this (and their example) I would expect the following, given a zone of
> myhost.com and a ns of ns1.myns.com:

That's true, some people do it like that. As you can see in mine, I do
it the proper way:

@ SOA noc.kccomps.com. joey.mlbscores.com. (

> Q2) Reverse Mapping (address to name) files: Given a multi-homed
> enviroment, where many domains use the same IP, how/why/when would you
> implement a db.111.222.333.444 file?

Most people use reverse for websites that have their own ip or for
vhosts on IRC. If you've got multiple sites using the same ip, I
wouldn't bother setting up reverse.

> Q3) I'v read and re-read the section on Negative TTL (last field in
> the SOA record). I simply can't understand how this is used, or a
> proper value to set it to. Does it behave differently in a secondary
> NS vs a primary NS? What is a good rule of thumb for this?

Negative Time To Live? You got me their. I just go with the default:

86400 ; minimum (1 day)

Anyone else have ideas on this one?

> Q4) In DNS&Bind, they provide an example of movie.edu. After studing
> the example, I don't see any A records that actually offer an address
> for movie.edu. See abrievated example below and PLEASE comment.

You're right, they don't have movie.edu in there with an A record.

> movie.edu. IN SOA terminator.movie.edu. hostmaster@movie.edu.
> movie.edu. IN NS terminator.movie.edu.
> movie.edu. IN NS wormhole.movie.edu.
movie.edu. IN A 0.0.0.0
> localhost IN A 127.0.0.1
> carrie IN A 111.222.333.444
> home IN A 111.222.333.441

My template:
/var/named/master/the-cubs.com.zone
$TTL 7200
@ SOA noc.kccomps.com. joey.mlbscores.com. (
2002071701 ; serial
7200 ; refresh (1 hour)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS bind.kccomps.com.
NS sugar.makintosh.com.
MX 10 mail.gngsta.com.
@ A 209.15.206.149
www A 209.15.206.149

/var/named/named.conf
zone "the-cubs.com" IN {
type master;
file "master/the-cubs.com.zone";
allow-transfer { 209.15.204.209; };
};

taz0
10-11-2002, 01:15 PM
Originally posted by Joey


> Q3) I'v read and re-read the section on Negative TTL (last field in
> the SOA record). I simply can't understand how this is used, or a
> proper value to set it to. Does it behave differently in a secondary
> NS vs a primary NS? What is a good rule of thumb for this?

Negative Time To Live? You got me their. I just go with the default:

86400 ; minimum (1 day)

Anyone else have ideas on this one?



For example,
Say TTL is 12 hrs and minimum is 1 hr for domain.com and you query test.domain.com.

If test.domain.com exists, the nameserver will cache the answer for 12 hrs and will not query the primary/secondary ns for that amount of time.

If it does not exist, it will cache the negative answer for 1 hr and will not query the primary/secondary ns for that amount of time.

bitserve
10-12-2002, 04:50 AM
1. You sure they didn't mean that the first RR after the SOA (the SOA RR, not the text "SOA") should be an NS RR?

2. Don't know why you would call it "db.111.222.333.444", but it is common to set up reverse DNS even if all the domains resolve to the same IP address. You can have more than one PTR for the same IP address.

3. The last value in an SOA RR (minimum) has nothing to do with negative cacheing. It's "the minimum number of seconds to be used for TTL values in RRs".

4. It is common not to assign the domain (zone) an IP address. It's the name of a zone, and not the name of a host.