LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-07-2006, 12:12 PM   #1
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Rep: Reputation: 0
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.
 
Old 03-07-2006, 03:14 PM   #2
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
dhcpd.conf:
Code:
ddns-domainname "mydomain.com.";
The important part being the trailing period after com.
 
Old 03-12-2006, 08:35 PM   #3
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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;
}
 
Old 03-13-2006, 10:43 AM   #4
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 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";
}
-------------------------------------------------------------------------------------
 
Old 03-13-2006, 02:15 PM   #5
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Comment
Code:
ddns-domainname "mydomain.com.";
out and restart your dhcp server then see what happens.
 
Old 03-13-2006, 05:31 PM   #6
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 03-13-2006, 06:19 PM   #7
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
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.
 
Old 03-14-2006, 05:19 PM   #8
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 03-14-2006, 10:31 PM   #9
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Code:
#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.

Last edited by ARC1450; 03-14-2006 at 10:33 PM.
 
Old 03-15-2006, 06:20 PM   #10
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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; };
};
 
Old 03-15-2006, 07:13 PM   #11
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
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 {
  starts 4 2006/03/16 00:42:41;
  ends 4 2006/03/16 01:42:41;
  binding state active;
  next binding state free;
  hardware ethernet 00:04:75:e6:a0:4d;
  uid "\001\000\004u\346\240M";
  set ddns-rev-name = "x.x.168.192.in-addr.arpa.";
  set ddns-txt = "31ad9a2b8dd83d790e08a9e376d0f05310";
  set ddns-fwd-name = "Hera.cruea.net";
  client-hostname "Hera";
}
My zone file:
Code:
$ORIGIN .
$TTL 3600       ; 1 hour
cruea.net               IN SOA  Apollo.cruea.net. webmaster.cruea.net. (
                                2002085545 ; serial
                                3600       ; refresh (1 hour)
                                450        ; retry (7 minutes 30 seconds)
                                14400      ; expire (4 hours)
                                1800       ; minimum (30 minutes)
                                )
                        NS      Hades.cruea.net.
                        NS      Apollo.cruea.net.
$ORIGIN cruea.net.
_http._tcp              SRV     0 0 80 www
Apollo                  A       192.168.x.x
Hades                   A       192.168.x.x
$TTL 1800       ; 30 minutes
Hera                    A       192.168.x.x
                        TXT     "31ad9a2b8dd83d790e08a9e376d0f05310"
Router                  A       192.168.x.x
$TTL 3600       ; 1 hour
WAP54G                  A       192.168.x.x
$TTL 1800       ; 30 minutes
www                     A       192.168.x.x
Just curious, is it Windows clients doing this, or Linux/Windows kicking back an extended FQDN?
 
Old 03-16-2006, 05:34 PM   #12
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 03-16-2006, 06:42 PM   #13
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
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.

Last edited by ARC1450; 03-16-2006 at 06:50 PM.
 
Old 03-17-2006, 04:49 PM   #14
diabelek
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 03-17-2006, 07:06 PM   #15
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant get entry in bind to work with domain.com instead of www.domain.com pxes351 Linux - Networking 12 05-09-2005 06:20 AM
Configuring BIND to work with a domain name Immolo Linux - Networking 4 04-20-2005 06:32 AM
Sendmail sending as host.domain.com, i want it to be from just domain.com. PlatinumRik Linux - Software 5 10-07-2004 04:32 PM
Change user@host.domain to user@domain Wynand1 Linux - Networking 7 09-13-2004 11:56 PM
Setting up a domain host with bind. fur Linux - Networking 2 04-08-2004 07:45 PM


All times are GMT -5. The time now is 06:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration