Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Where are the TTL of dynamically added records configured in bind?

I have a DNS-zone with standart $TTL set to 10 minutes. When the zone is updated, the hosts added get their own TTLs that differ from the zone standart. The DHCP lease is configured to 24h.

$ORIGIN .
$TTL 600        ; 10 minutes
example                 IN SOA  firefly.example. postmaster.example. (
                                2013102334 ; serial
                                28800      ; refresh (8 hours)
                                7200       ; retry (2 hours)
                                2419200    ; expire (4 weeks)
                                86400      ; minimum (1 day)
                                )
                        NS      firefly.example.
$ORIGIN mqmedia.
$TTL 18000      ; 5 hours
Andreass-MBP            A       192.168.1.79
                        TXT     "31fdf53482504a9965e4e7a210ebfe6080"
$TTL 600        ; 10 minutes
atom-builder            A       192.168.1.13
$TTL 86400      ; 1 day
axis-00031c200982       A       192.168.1.47
                        TXT     "311b67a2c49ae34eb511fa989cb22c9e65"
axis-00031c205143       A       192.168.1.208
                        TXT     "319dfebd7e94f89fa7ebda8e87d6702499"
axis-00031c2d0067       A       192.168.1.45
                        TXT     "31f70f97c582af3ace2ec4773a19edd451"
$TTL 18000      ; 5 hours
axis-00408c99d062       A       192.168.1.168
                        TXT     "3141073fe7f825c3c3a9daa1b864ab6afd"
axis-00408cac034d       A       192.168.1.209
                        TXT     "317e6bffaf74e74855f944b1e18ba6aac8"
axis-00408cd5b244       A       192.168.1.69
                        TXT     "31d7bebe14245b2f42f8d601554eb284d5"
axis-00408cdb9d15       A       192.168.1.213
                        TXT     "31aaa279559559302bf51db4cb8e2b69f8"
share|improve this question

1 Answer 1

up vote 1 down vote accepted

The TTL is always configured at the zone file. It may be set as default, using $TTL on the beginning of the file; as individual $TTL statements spread through the file, and influencing the records below it; or even on the record itself.

When the server does a nsupdate to add the record for your host, bind will check to see if there is any TTL already present, marking $TTL 86400, and add the record below it, if not, it will add the $TTL for the specified time and the record below it.

share|improve this answer
    
But the entries that were added dynamically seem to have totally random TTL which differs from default TTL of 10 minutes. Does it mean that TTL has to be set up on the nodes too? –  Pavel Potatis Oct 28 '13 at 7:40
    
Have you changed your DHCP configuration recently? –  fboaventura Oct 28 '13 at 11:51
    
Oh, I see, so they are added according to the current DHCP-lease of the entry. Still, if the DNS allows updates from the network, any node can set up its own TTL. –  Pavel Potatis Oct 31 '13 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.