LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcp not updating dns.... (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-not-updating-dns-654624/)

rwazar 07-09-2008 04:16 PM

ya, I cleaned that up.....I'm learning as I go ;)
Actually I think at this point my named.conf is good....I'm questioning the dhcpd.conf

ARC1450 07-09-2008 04:24 PM

Any changes?

Code:

ddns-update-style interim;
ddns-updates on;
authoritative;
allow unknown-clients;
default-lease-time 60;
max-lease-time 60;
zone 0.10.10.in-addr.arpa. {
    primary 10.10.0.1;
    }
zone test.com. {
    primary 10.10.0.1;
    }
subnet 10.10.0.0 netmask 255.255.255.0 {
    option domain-name "test.com";
        ddns-rev-domainname "0.10.10.in-addr.arpa.";
        option doman-name-servers 10.10.0.1;
        option broadcast-address 10.10.0.255;
        option subnet-mask 255.255.255.0;
        allow unknown-clients;
    range 10.10.0.20 10.10.0.30;
    }

Try using that. I cleaned it up a little for you and changed some stuff around. Basically, anything that will affect your range of DHCP addresses, I wouldn't put in the "global" config area. Just for in case you ever end up with multiple subnets you're serving addresses to. For example, your ddns-rev-domainname, since it uses the 10.10.0.0/24 net is really only pertinent in the 10.10.0.0 range. Ya know?

rwazar 07-09-2008 04:37 PM

ARC, I appreciate all your help. I did something and updates are now going through but incorrectly..... LOL
so then I made your changes and it's not even trying to perform updates anymore.....somewhere in the middle is the winner....I'm almost there :)

ARC1450 07-09-2008 04:42 PM

It was updating incorrectly? How so?

Code:

ddns-update-style interim;
ddns-updates on;
authoritative;
default-lease-time 60;
max-lease-time 60;

subnet 10.10.0.0 netmask 255.255.255.0 {
        option domain-name "test.com";
        ddns-rev-domainname "0.10.10.in-addr.arpa.";
        option domain-name-servers 10.10.0.1;
        option broadcast-address 10.10.0.255;
        option subnet-mask 255.255.255.0;
        range 10.10.0.20 10.10.0.30;
    }

zone 0.10.10.in-addr.arpa. {
    primary 10.10.0.1;
    }
zone test.com. {
    primary 10.10.0.1;
    }

Give that a shot. . .there was a misspelling in there, and I took out allowing unknown clients.

rwazar 07-09-2008 05:00 PM

Ok more info.....with that config it wont try to do any updates....
The subnet definition has to have ddns-update on and the ddns-domainname for any updates to happen.

We're off the hook for the rest of today though...it's quitin time ;)
I'll post an update tomorrow as to why it's not updating correctly.

thanks again.

ARC1450 07-09-2008 06:27 PM

Hrm, things have changed then since I last set up DHCPd then, as that wasn't necessary. :O

I'm at a loss then, my friend. :-\

rwazar 07-10-2008 08:46 AM

Ok so....updating incorrectly..... What the dhcp server is doing is updating the DNS record with host1.test.com.test.com The other half of the problem (reverse lookup updates) is similar. it's adding 29.0.10.10.0.10.10.in-addr.arpa....hehehe a few too many

Not sure whats causing that yet....workin on it.

Oh and when I have this all working I'm going to setup additional servers for failover dns&dhcp...FUN.
I should be an expert on Bind/dhcpd again by the time I'm done lol

ARC1450 07-10-2008 09:20 AM

remove option domain-name "test.com"; and ddns-rev-domainname "0.10.10.in-addr.arpa.";

That might fix it.

rwazar 07-10-2008 10:17 AM

Interesting...
I removed the ddns-rev first and tested....The proper IP was updated correctly but the host was still host1.test.com.test.com
then I removed option domain-name and the result was the same as above.
so then I removed ddns-domain (I put that in for testing) and put option domain-name back in and the result was the same as above.
then I removed both ddns/option domain-name and The records all get deleted...

I saw some people using some scripting in their dhcpd.conf's to alter the hostnames sent to DNS. I wonder If I'll need to do that to strip off test.com. Sounds kinda hokey though, shouldn't need to do that.

ARC1450 07-10-2008 10:34 AM

Well, I had this problem before, and I think it might have been because I statically set the dns extension on my Linux boxes. The main thing is, you now have DHCP updating DNS. So you have to make sure that the hosts aren't sending DHCP back the improper name. I believe you have to run dhcpcd on the client with the -H option or something.

Either way, check your client now to make sure you don't have a dns extension set somewhere. http://www.phystech.com/download/dhcpcd_man.html
-D -h might do what you need to do.

rwazar 07-10-2008 10:52 AM

Ya, I'm looking into that....Both hosts were initially setup with a hostname that contained the FQDN.
I figured that could have been the problem so I changed them to just the hostname.
Now that you mention it though, no dhcpcd on these dhclient instead....I checked the dhclient-eth0.conf file and it lists
send host-name "host1.test.com"; #temporary RHL ifup addition
editing the file is a no-go, it gets recreated by ifup everytime, I need to find out where ifup is getting it from.
.
.
5mins later
I looked through ifup-eth0 to see how it was getting the hostname....Duh from ifcfg-eth0....DHCP_HOSTNAME=host1.test.com
I took out the domain name and voila...It's updating properly now. Another trivial fix lol

Thanks for all your help man, your inputs kept pushing me in the right directions :)


by the way....that config you posted works just fine with the ddns-rev.....ddns update doesn't need to be in the subnet, don't know what I was thinking earlier.

ARC1450 07-10-2008 10:59 AM

No problem.

I've been out of doing DDNS with Linux DHCP for a while now. I just use MS DHCP and have it update BIND (I set up AD). I'll probably go back to doing with Linux at some point, but for now, who knows. :)

rwazar 07-10-2008 11:20 AM

Funny you should say that...I wonder if linux dhcp can update a MS DNS server. I know someone is going to ask me that sooner or later. We have a single MS dns server and a single MS dhcp server here for almost 3,000 nodes total including a 2,000 node redhat cluster, and active directory. One day last week the dhcp server died and it wasn't pretty lol. So me being one of the linux/unix dudes here was tasked to setup a test env for dns/dhcp failover for an internal subnet to service just the linux cluster/servers/desktops so we wouldn't at least lose our side of the house. lol

ARC1450 07-10-2008 11:34 AM

That depends. MS DNS, when in active directory, requires authentication keys to be updated. That's why I set my primary DNS machine to Linux, but secondaries to MS. The MS DNS servers will happily update Linux all day long no problem, and MS DHCP will update Linux DNS all day with no problem.

Now, an MS DNS outside of AD, I think can be updated by Linux. As I stated though, BIND for primary, MS for secondary for me. BIND runs views, MS's DNS doesn't, so you can seclude off parts of BIND if you need to and make it run double duty. :)

rwazar 07-10-2008 11:47 AM

Good info...thanks again :)
Hopefully someday I can return the favor.


All times are GMT -5. The time now is 10:15 AM.