Discussion:
TTL when updating via DDNS
Marc Muehlfeld
2008-07-09 09:31:41 UTC
Permalink
Hello,

I'm using dhcpd 3.0.6 that came with openSUE 10.3. I setup DDNS for my
clients, but I saw, that the entries created in named have a short TTL. After
some searching on the web, I found out that the entries are allways created
with half "default-lease-time", which I can confirm.

But I have the problem, that clients that run 24x7 disapper from DNS after TTL
and are not accessible through the FQDN any more. I found an option "ddns-ttl"
on different pages of the internet. When I set this parameter, it doesn't
make dhcpd complain. But it doesn't work, either.

How can I ensure, that the entries stay in the zone files until the client
release or renew it's lease?

Regards
Marc
Glenn Satchell
2008-07-09 13:14:40 UTC
Permalink
Date: Wed, 09 Jul 2008 11:31:41 +0200
Subject: TTL when updating via DDNS
Hello,
I'm using dhcpd 3.0.6 that came with openSUE 10.3. I setup DDNS for my
clients, but I saw, that the entries created in named have a short TTL. After
some searching on the web, I found out that the entries are allways created
with half "default-lease-time", which I can confirm.
But I have the problem, that clients that run 24x7 disapper from DNS after TTL
and are not accessible through the FQDN any more. I found an option "ddns-ttl"
on different pages of the internet. When I set this parameter, it doesn't
make dhcpd complain. But it doesn't work, either.
How can I ensure, that the entries stay in the zone files until the client
release or renew it's lease?
Regards
Marc
The TTL has nothing todo with deleting an entry from a zone file. TTL
is how long a dns server will *cache* that hostname/IP pair after it
has done a lookup. If you think about it, most clients renew at half
the default lease time, so making this the TTL makes sense.

If you have hosts being deleted from the zone file then you have a
different problem. Are your clients successfully renewing their leases?
Are there any log messages indicating that dhcpd asked for the zone
entry to be deleted? Is there anything related to this inthe (I assume)
bind logs?

Can you please post your dhcpd config file (or a reasonable example if
it is huge).

regards,
-glenn
Marc Muehlfeld
2008-07-09 13:55:44 UTC
Permalink
Post by Glenn Satchell
If you have hosts being deleted from the zone file then you have a
different problem. Are your clients successfully renewing their leases?
Are there any log messages indicating that dhcpd asked for the zone
entry to be deleted? Is there anything related to this inthe (I assume)
bind logs?
dhcpd.log (without any other messages of this computer before and after):
Jul 9 13:19:21 nucleus dhcpd: delete 179.0.1.10.in-addr.arpa. IN PTR: success.
Jul 9 13:19:21 nucleus dhcpd: delete proben-05.clt.mr.lfmg.de IN A
10.1.0.179: success.


This are the named log entries that appear at the same time:
09-Jul-2008 13:19:21.000 update: info: client 192.168.29.2#33018: updating
zone '0.1.10.in-addr.arpa/IN': deleting rrset at '179.0.1.10.in-addr.arpa' PTR
09-Jul-2008 13:19:21.049 update: info: client 192.168.29.2#33018: updating
zone 'clt.mr.lfmg.de/IN': deleting an RR
Post by Glenn Satchell
Can you please post your dhcpd config file (or a reasonable example if
it is huge).
This are just the global options and one subnet declaration of my dhcpd.conf:



ignore client-updates;
ddns-update-style ad-hoc;
update-static-leases true;
ddns-domainname "mydomain.tld";

key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret ............; };

zone mydomain.tld . { primary 192.168.29.2; key DHCP_UPDATER; }
zone 0.1.10.in-addr.arpa. { primary 192.168.29.2; key DHCP_UPDATER; }

authoritative;

one-lease-per-client true;

log-facility local7;

# Default lease time is 5 days
default-lease-time 432000;

# Maximum lease time is 6 days
max-lease-time 518400;

option domain-name-servers 192.168.29.2, 192.168.29.4;
option netbios-name-servers 192.168.29.4;


subnet 10.1.0.0 netmask 255.255.255.0 {

option domain-name "mydomain.tld";
option broadcast-address 10.1.0.255;
option routers 10.1.0.5;

# IT-Hosts with fix IPs via DHCP (10.1.0.240/28)
pool {
range 10.1.0.241
deny unknown-clients;
host it-01 { hardware ethernet 00:18:F3:08:B0:42;
fixed-address 10.1.0.254; }
}

# Printer with fix IPs via DHCP (10.1.0.16/28)
pool {
range 10.1.0.17;
deny unknown-clients;
host ZETLP2844-9 { hardware ethernet 00:17:9A:AE:38:F0;
fixed-address 10.1.0.25; }
}

# All other DHCP clients
pool {
range 10.1.0.100 10.1.0.200;
}

}
Glenn Satchell
2008-07-10 06:12:22 UTC
Permalink
Date: Wed, 09 Jul 2008 15:55:44 +0200
Subject: Re: TTL when updating via DDNS
Post by Glenn Satchell
If you have hosts being deleted from the zone file then you have a
different problem. Are your clients successfully renewing their leases?
Are there any log messages indicating that dhcpd asked for the zone
entry to be deleted? Is there anything related to this inthe (I assume)
bind logs?
Jul 9 13:19:21 nucleus dhcpd: delete 179.0.1.10.in-addr.arpa. IN PTR: success.
Jul 9 13:19:21 nucleus dhcpd: delete proben-05.clt.mr.lfmg.de IN A
10.1.0.179: success.
09-Jul-2008 13:19:21.000 update: info: client 192.168.29.2#33018: updating
zone '0.1.10.in-addr.arpa/IN': deleting rrset at '179.0.1.10.in-addr.arpa' PTR
09-Jul-2008 13:19:21.049 update: info: client 192.168.29.2#33018: updating
zone 'clt.mr.lfmg.de/IN': deleting an RR
Are these clients mentioned above able to ping the dhcp server? This is
required as the dhcp renewal messages are sent directly to the dhcp
server rather than using the dhcp relays.

Can you post the 192.168.29.0 subnet definition? Does the same
behaviour apply for hosts with static and dynamic addresses?

regards,
-glenn
Post by Glenn Satchell
Can you please post your dhcpd config file (or a reasonable example if
it is huge).
ignore client-updates;
ddns-update-style ad-hoc;
update-static-leases true;
ddns-domainname "mydomain.tld";
key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret ............; };
zone mydomain.tld . { primary 192.168.29.2; key DHCP_UPDATER; }
zone 0.1.10.in-addr.arpa. { primary 192.168.29.2; key DHCP_UPDATER; }
authoritative;
one-lease-per-client true;
log-facility local7;
# Default lease time is 5 days
default-lease-time 432000;
# Maximum lease time is 6 days
max-lease-time 518400;
option domain-name-servers 192.168.29.2, 192.168.29.4;
option netbios-name-servers 192.168.29.4;
subnet 10.1.0.0 netmask 255.255.255.0 {
option domain-name "mydomain.tld";
option broadcast-address 10.1.0.255;
option routers 10.1.0.5;
# IT-Hosts with fix IPs via DHCP (10.1.0.240/28)
pool {
range 10.1.0.241
deny unknown-clients;
host it-01 { hardware ethernet 00:18:F3:08:B0:42;
fixed-address 10.1.0.254; }
}
# Printer with fix IPs via DHCP (10.1.0.16/28)
pool {
range 10.1.0.17;
deny unknown-clients;
host ZETLP2844-9 { hardware ethernet 00:17:9A:AE:38:F0;
fixed-address 10.1.0.25; }
}
# All other DHCP clients
pool {
range 10.1.0.100 10.1.0.200;
}
}
Marc Muehlfeld
2008-07-10 06:57:04 UTC
Permalink
Post by Glenn Satchell
Are these clients mentioned above able to ping the dhcp server? This is
required as the dhcp renewal messages are sent directly to the dhcp
server rather than using the dhcp relays.
Yes. All clients can reach the dhcp server via tcp/udp/icmp.
Post by Glenn Satchell
Can you post the 192.168.29.0 subnet definition?
subnet 192.168.29.0 netmask 255.255.255.0 {
option domain-name "ctl.mr.lfmg.de";
option broadcast-address 192.168.29.255;
option routers 192.168.29.5;

pool {
range 192.168.29.100;
}
}

The 29er network is only for servers. There are no dhcp clients. But I had to
define at least one IP in a range statement, otherwise dhcpd complained.
Post by Glenn Satchell
Does the same behaviour apply for hosts with static and
dynamic addresses?
Hosts with static or static-via-dhcp addresses stay allways in the zonefiles.
Dhcpd don't touch them. But they were not added automatically. This ones I had
to add by hand.



Regards
Marc

Continue reading on narkive:
Loading...