DHCPD is updating BIND with <host>.<domain>.<domain>.
Can anyone explain why my dhcp server is updating my dns (using ddns) with the hostname.domain.domain instead of just hostname.domain. The problem only seems to occur on RH4 EL systems. Windows and Suse among others appear to update fine. The system I would assume is sending the FQDN to the dhcp server but how do I tell the dhcp server to ignore the domain portion and force it to my domain.
This is what I see in the dns 83 PTR clayface.mydomain.com.mydomain.com. and this is what is see in dhcp lease 147.145.93.83 { starts 2 2006/03/07 16:58:39; ends 2 2006/03/07 20:58:39; tstp 2 2006/03/07 20:58:39; binding state active; next binding state free; hardware ethernet 00:0f:1f:6e:4f:e2; set ddns-fwd-name = "clayface.mydomain.com.mydomain.com"; set ddns-txt = "00eca4213fd36bca7424f2685ea3d51eff"; set ddns-rev-name = "83.93.145.147.in-addr.arpa."; client-hostname "clayface.mydomain.com"; } If you need /etc/dhcpd.conf let me know. |
dhcpd.conf:
Code:
ddns-domainname "mydomain.com."; |
Nope, same thing happens. Also noticed, with some laptops from different networks, they place their domain in instead of the mydomain.com. IE one pc is on seconddomain.com and when they get an ip on mydomain.com network, the dns places computer2.seconddomain.com into the dns files.
Here's my current dhcpd.conf file. See any problems? --------------------------------------------------------- authoritative; option routers 123.456.789.1; option ntp-servers 123.456.789.131; option lpr-servers 123.456.789.131; option domain-name "mydomain.com"; option domain-name-servers 123.456.789.131, 123.456.787.232, 123.456.788.11; option netbios-name-servers 123.456.787.133, 123.456.788.248; allow unknown-clients; allow client-updates; ddns-domainname "mydomain.com."; ddns-update-style interim; ddns-updates on; update-static-leases on; include "/etc/named.tsig"; default-lease-time 14400; subnet 123.456.789.0 netmask 255.255.255.0 { range 147.145.93.10 123.456.789.200; default-lease-time 14400; max-lease-time 18000; allow client-updates; allow unknown-clients; ddns-domainname "mydomain.com."; ddns-updates on; zone mydomain.com. { primary 127.0.0.1; key pyro; } zone 789.456.123.in-addr.arpa. { primary 127.0.0.1; key pyro; } option subnet-mask 255.255.255.0; } |
guess i could post this info as well....
here is what my dns server sees ------------------------------------------------------------------------------------- .... $ORIGIN 789.456.123.in-addr.arpa. $TTL 7200 ; 2 hours 106 PTR Doctor-Doom.mydomain.com.mydomain.com. 131 PTR pyro.mydomain.com. 197 PTR ITCJUNREIN.otherdomain.com 75 PTR cobalt-blue.mydomain.com.mydomain.com. ..... ------------------------------------------------------------------------------------- 131 is the way things should look. 106, 197, 75 are all wrong. Here is my dhcp lease file. ------------------------------------------------------------------------------------- lease 123.456.789.88 { starts 1 2006/03/13 16:25:01; ends 1 2006/03/13 20:25:01; binding state active; next binding state free; hardware ethernet 00:10:c6:e2:14:97; uid "\001\000\020\306\342\024\227"; set ddns-rev-name = "88.789.456.123.in-addr.arpa."; set ddns-client-fqdn = "ICTDFRAZIER.otherdomain.com"; client-hostname "ICTDFRAZIER"; } lease 123.456.789.106 { starts 1 2006/03/13 16:11:09; ends 1 2006/03/13 20:11:09; binding state active; next binding state free; hardware ethernet 00:04:23:a6:92:7c; set ddns-fwd-name = "Doctor-Doom.mydomain.com.mydomain.com."; set ddns-txt = "0078af0d1f3cbb9cc664aea72a838fc443"; set ddns-rev-name = "106.789.456.123.in-addr.arpa."; client-hostname "Doctor-Doom.mydomain.com"; } lease 123.456.789.26 { starts 1 2006/03/13 15:20:35; ends 1 2006/03/13 19:20:35; binding state active; next binding state free; hardware ethernet 00:11:43:ef:0a:f2; uid "\001\000\021C\357\012\362"; set ddns-fwd-name = "cable.mydomain.com"; set ddns-txt = "316a829509a211296436f6b3b2bd3822d8"; set ddns-rev-name = "26.789.456.123.in-addr.arpa."; client-hostname "cable"; } ------------------------------------------------------------------------------------- |
Comment
Code:
ddns-domainname "mydomain.com."; |
Nope, same thing. I apparently have two lines with "ddns-domainname" . I tried commenting out the top one, and then I tried having both commented out. Either way I have the same issue as before.
|
I just noticed something I hadn't seen before; take out
Code:
allow client-updates; Check your dhcpd.leases file; if you notice the host is giving it's FQDN to the dhcp server for whatever reason. If it's a Windows box, have fun with that. :( If you'd like, I can post my dhcpd.conf file for you to check, along with my named.conf file. |
If you could I would appreciate it. I'm running through some combinations of what people have suggested to me to see if they do anything but so far no luck. I appreciate all the help though. This is just being one stubborn server.
|
Code:
#Set how to update DNS Code:
options { By the by, something I just realized; if you're using this in a Winders environment at all, don't let the clients update their DNS records. No one knows what will happen (you'll invariably have dead DNS records because of this), and having DHCP update DNS is a tad more secure, IMHO. |
OK, just for giggles i pretty much copied yours but I still get the same results. I restart the dns & dhcp server every time and when the servers are shut down, I also go in and delete a few of the problem dhcp names and dns names to see what they will come back as. I'm really beginning to hate ddns.
Here's another question that might help me figure this out. Is there a way to force dhcpd to do any kind of verbose logging. The only thing I can find is the -tf option for tracing if/when it core dumps. Here's my NEW dhcpd.conf based off of yours Code:
#Set how to update DNS Code:
options { |
Try blowing out the DHCP lease file(s) and all the dynamic zone files that bind has created.
One of my DHCP leases: Code:
lease 192.168.x.x { Code:
$ORIGIN . |
The ones that are being the real pain by having the extended FQDN are linux machines. Specifically they seem to be Redhat systems. Suse seems to update it just fine. Windows machines are the ones that come from another domain so they are using their domain in my zone file instead of my domain name (which I want).
I'll try just flat out deleting the lease file and clearing all of the dynamic updates in my zone files and see what havoc that causes. :) |
OH!!!
I'm an idiot for not asking that sooner. Check that your hosts file, hostname file, and domainname file are correct. Meaning, your hostname file, for example should only have the computer name in it, not the FQDN. I had that issue a while back, and that seemed the be the cause for me, because when you tell your Linux machine to give it's hostname to DHCP (with -H option), it kicks back what is in the hostname file. I'm an idiot for not asking that sooner. [edit]The files, I believe, are /etc/conf.d/hostname, /etc/conf.d/domainname, and /etc/hosts. If you don't have a /etc/conf.d/ directory, then check /etc for those files. I feel like such a moron for not suggesting that earlier since I had the same problem. You may even be able to do 'hostname -f' on the machines and see what they return. [edit2]As for the machines that you want to resolve to your domain, depending on how they are set up, you may not have control of that. Generally when that happens, they've been manually configured for a single domain for whatever reason, and I don't think there's a way to get DHCPD/BIND to tell the machine to override that. I don't think. But I could be wrong. |
Thanks.
Doing that hostname thing works. I thought there was a way to force it from reading documents. Guess not. Just have to make sure everyone types stuff in right instead. Plus I can modify the domains to search so they search ones that are technically wrong. Thanks for all the help. If you ever come up with a way to force the domain name, please post it. |
There is a way to force it, but it's only if the clients aren't set to override the DNS suffix that the DHCP server hands out. If you go to your domainname file on Linux, you'll see that you can override the DNS suffix or accept what the DHCP server gives; in Windows, when you grab a DHCP address, if no one has configured a "Primary DNS Suffix" or "Connection-specific DNS suffix" (one's in option in the System/Computer Name applet, and one is an option within TCP/IP configuration I believe), Windows should tack on what the DHCP server gives it. The issue is that sometimes people put the DNS suffix in there for whatever reason (which is a bad, bad idea IMHO).
You can try searching http://www.google.com/linux or http://www.google.com/microsoft and see if there's any better answer than that. http://support.microsoft.com may have something useful, too. And you're very welcome. |
All times are GMT -5. The time now is 09:41 PM. |