Hi, I have a DHCP + DNS server running suse 9.1, and couple of linux dekstop with windows desktop. can ping all of my desktop (linux & windows) using their name + domain (eg. comp1.domain.info). Right now, I just add another ethernet card in my linux desktop. When I boot it, I notice it changes the IP address, from 192.127.0.202 to 192.127.0.241. But when I try to ping the machine, it names is comp3.domain.info, it still pointing to older IP. I have restart dhcpd and named but still no luck. So I have to change manually in /var/lib/named/dyn/domain.info and /var/lib/named/dyn/0.127.192-domain so comp3 is pointed to 192.127.0.241. Is there any easier way, so I dont have to changes manually ? I notice the TTL is 12 hours, how can I change so it can recognice any changes faster ? regards, -- Arie Reynaldi Zanahar reymanx at gmail.com http://www.reynaldi.or.id
Arie Reynaldi Z wrote:
When I boot it, I notice it changes the IP address, from 192.127.0.202 to 192.127.0.241. But when I try to ping the machine, it names is comp3.domain.info, it still pointing to older IP.
Do you have dynamic DNS updates running? You seem to be assuming you have DDNS, but it's not obvious from your explanation.
I have restart dhcpd and named but still no luck. So I have to change manually in /var/lib/named/dyn/domain.info and /var/lib/named/dyn/0.127.192-domain so comp3 is pointed to 192.127.0.241.
Check the various logs - /var/log/messages, turn on logging in named etc. - that'll give you a better idea of what is that's broken. /Per Jessen, Zürich -- http://www.spamchek.com/freetrial - managed anti-spam and anti-virus solution. Sign up for your free 30-day trial now!
On Wed, Jun 22, 2005 at 12:00:19PM +0700, Arie Reynaldi Z wrote:
Hi,
I have a DHCP + DNS server running suse 9.1, and couple of linux dekstop with windows desktop. can ping all of my desktop (linux & windows) using their name + domain (eg. comp1.domain.info). Right now, I just add another ethernet card in my linux desktop. When I boot it, I notice it changes the IP address, from 192.127.0.202 to 192.127.0.241. But when I try to ping the machine, it names is comp3.domain.info, it still pointing to older IP. I have restart dhcpd and named but still no luck. So I have to change manually in /var/lib/named/dyn/domain.info and /var/lib/named/dyn/0.127.192-domain so comp3 is pointed to 192.127.0.241.
If you edit the files directly, they will no longer match what BIND has in memory, so it is advisable to stop it before editing, and remove any journal files (because it would only complain and refrain from loading the zone). It is better to talk to the running BIND and let it do the change internally, you could use the 'nsupdate' tool for that, which is a rather crude thing but it works. echo -e "update delete host.domain. \n" \ | nsupdate -k /etc/KDHCP_UPDATER.+157+59963.private echo -e "update add otherhost.domain. 86400 CNAME mydns.domain. \n" \ | nsupdate -k /etc/KDHCP_UPDATER.+157+59963.private
Is there any easier way, so I dont have to changes manually ? I notice the TTL is 12 hours, how can I change so it can recognice any changes faster ?
Well the DHCP server can't know that the machine with the new NIC is the same as a previously seen NIC (unless you use client identifiers, but you won't do that). Otherwise you may use "one-lease-per-client true;" so the old leases and DNS names are cleaned up when a new one is requested by a known host. Peter -- the little machine that goes "ping" got the big can of spam
It is better to talk to the running BIND and let it do the change internally, you could use the 'nsupdate' tool for that, which is a rather crude thing but it works. I know, it might gave me any trouble, but luckily there's no trouble (as I seen) at all.
echo -e "update delete host.domain. \n" \ | nsupdate -k /etc/KDHCP_UPDATER.+157+59963.private echo -e "update add otherhost.domain. 86400 CNAME mydns.domain. \n" \ | nsupdate -k /etc/KDHCP_UPDATER.+157+59963.private Well the DHCP server can't know that the machine with the new NIC is the same as a previously seen NIC (unless you use client identifiers, but you won't do that). Otherwise you may use "one-lease-per-client true;" so the old leases and DNS names are cleaned up when a new one is requested by a known host.
I think I'm gonna use one-lease-per-client in my dhcpd.conf. Is there any problem if I use it ? maximum machine, etc ? BTW, here's my dhcp.conf ddns-update-style interim; ddns-updates on; one-lease-per-client true; ignore client-updates; include "/etc/named.keys"; include "/etc/rndc.key"; subnet 192.127.0.0 netmask 255.255.255.0 { option routers 192.127.0.1; option broadcast-address 192.127.0.255; option domain-name "fsi.info"; option domain-name-servers 192.127.0.18; option netbios-name-servers 192.127.0.1; ddns-domainname "fsi.info"; ddns-rev-domainname "0.127.192.in-addr.arpa"; range dynamic-bootp 192.127.0.180 192.127.0.254; default-lease-time 21600; max-lease-time 86400; zone fsi.info. {primary 127.0.0.1; key DHCP_UPDATER;} zone 0.127.192.in-addr.arpa. {primary 127.0.0.1; key DHCP_UPDATER;} And here's my named.conf zone "fsi.info" in { type master; file "dyn/fsi.info"; allow-update { key DHCP_UPDATER; }; }; zone "0.127.192.in-addr.arpa" in { type master; file "dyn/0.127.192.in-addr.arpa"; allow-update { key DHCP_UPDATER; }; regards, -- Arie Reynaldi Zanahar reymanx at gmail.com http://www.reynaldi.or.id
On Fri, Jun 24, 2005 at 09:05:32AM +0700, Arie Reynaldi Z wrote:
Well the DHCP server can't know that the machine with the new NIC is the same as a previously seen NIC (unless you use client identifiers, but you won't do that). Otherwise you may use "one-lease-per-client true;" so the old leases and DNS names are cleaned up when a new one is requested by a known host.
I think I'm gonna use one-lease-per-client in my dhcpd.conf. Is there any problem if I use it ? maximum machine, etc ?
I suggest to read the note in the man page about it. Peter -- the big machine that goes "ping" imitated the tasty cardinal
participants (3)
-
Arie Reynaldi Z
-
Per Jessen
-
poeml@cmdline.net