DHCPD is updating BIND with <host>.<domain>.<domain>.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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";
}
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;
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;
From your dhcpd.conf file.
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.
#Set how to update DNS
ddns-update-style interim;
#Key that we're using to update DNS
key DHCP_UPDATER {
algorithm supersecretsquirrel;
secret supersecretsquirrelskey;
};
#Set FQDN and DNS servers
option domain-name "cruea.net";
option domain-name-servers dns1, dns2;
option netbios-name-servers dns2;
#Set default lease time and the max allowed
default-lease-time 3600;
max-lease-time 3600;
#Is this an authoritative DHCP server?
authoritative;
#THe addressing pool
subnet 192.168.x.x netmask 255.255.255.240 {
range 192.168.x.x 192.168.x.x;
option routers 192.168.x.x;
option broadcast-address 192.168.x.x;
}
#The zones to update
zone cruea.net. {
primary dns1;
key DHCP_UPDATER;
}
zone 0.168.192.in.addr.arpa. {
primary dns1;
key DHCP_UPDATER;
}
THat's my dhcpd.conf. Questions, please ask.
Code:
options {
directory "/var/bind";
pid-file "/var/run/named/named.pid";
statistics-file "named.stats";
cleaning-interval 240;
interface-interval 0;
max-ncache-ttl 3600;
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};
key DHCP_UPDATER {
algorithm supersecretsquirrel;
secret supersecretsquirrelskey;
};
zone "cruea.net" IN {
type master;
file "data/cruea.net";
allow-update {dns1;};
allow-transfer {dns2;};
allow-query {192.168.0/28; 127.0.0.1;};
notify yes;
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "data/0.168.192";
allow-update {dns1;};
allow-transfer {dns2;};
allow-query {192.168.0/28; 127.0.0.1;};
notify yes;
};
named.conf. As with dhcpd.conf, if you have a question, just ask.
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
ddns-update-style interim;
#Key that we're using to update DNS
include "/etc/named.tsig";
#Set FQDN and DNS servers
option domain-name "mydomain.com";
option domain-name-servers x.x.x.131, x.x.92.232, x.x.1.11;
option netbios-name-servers x.x.120.133, x.21.35.248;
option ntp-servers x.x.x.131;
option lpr-servers x.x.x.131;
#Set Default lease time and the max allowed
default-lease-time 14400;
max-lease-time 18000;
#Is this an authoritative DHCP server?
authoritative;
subnet x.x.x.0 netmask 255.255.255.0 {
range x.x.x.10 x.x.x.38;
range x.x.x.46 x.x.x.62;
range x.x.x.66 x.x.x.81;
range x.x.x.83 x.x.x.85;
range x.x.x.87 x.x.x.106;
range x.x.x.114 x.x.x.120;
range x.x.x.132 x.x.x.149;
range x.x.x.152 x.x.x.168;
range x.x.x.170 x.x.x.190;
range x.x.x.192 x.x.x.200;
option routers x.x.x.1;
option broadcast-address x.x.x.255;
}
zone mydomain.com. {
primary 127.0.0.1;
key pyro;
}
zone x.x.x.in-addr.arpa. {
primary 127.0.0.1;
key pyro;
}
And my NEW named.conf based off of yours as well
Code:
options {
directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
cleaning-interval 240;
listen-on-v6 { any; };
notify no;
forwarders { x.x.92.232; x.x.92.1; };
};
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
allow-update { none; };
};
include "/etc/named.conf.include";
zone "mydomain.com" in {
type master;
file "dyn/mydomain.com";
allow-update { key pyro; };
};
zone "93.x.x.in-addr.arpa" in {
file "dyn/93.x.x.in-addr.arpa";
type master;
allow-update { key pyro; };
};
logging {
category default { default_syslog; };
};
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.
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.