Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP and DDNS

Status
Not open for further replies.

unixrocks

Technical User
Sep 11, 2003
65
GB
HI all,
Have a bit of a problem configuring DHCP and DDNS on a RedHat LINUX machine (Sun RaQ550 ) Using dhcpd v3.0 and BIND 9.0.


The problem is that when the DHCP server, same as the DNS one, allocates a IP address only the db.mydomain.com file is updated while the 27.44.88.in-addr.arpa file is not. Turned on loggin in /etc/named.conf and the error it reports is denied. All files have the same permissions and everything. Has anyone got any ideas?

Regards

Slighty Frustrated.
 
What is the subnet that you are trying to pull addresses from in DHCP? The name of that pointer record that you are talking about should be just 88.in-addr.arpa since that is a class A network. Therefore I would think that when a client registers it's address that it puts it in the forward lookup zone but then it is looking for the zone called 88.in-addr.arpa to update it's pointer record. This is something to try, I have never set up a DDNS server on linux but have set up many using BIND and have had problems if I didn't have the pointer records broken down in to it's correct IP class.
 
Its actually a Class C network. The network address is

88.44.27.0/24 think thats right (netmask 255.255.255.0)

When I had

allow-update {88.44.27.1;}

in the named.conf file it updated both sets of records. I have now changed this to the following config

[root /etc]# cat dhcpd.conf
authoritative;
server-identifier WHOCARES.XXX.co.uk;
ddns-update-style interim;
subnet 88.44.27.0 netmask 255.255.255.0 {
range 88.44.27.121 88.44.27.253;
default-lease-time 18000; max-lease-time 36000;
one-lease-per-client true;
ddns-updates on;
ddns-domainname "XXX.co.uk";
ddns-rev-domainname "27.44.88.in-addr.arpa";
option subnet-mask 255.255.255.0;
option broadcast-address 88.44.27.255;
option routers 88.44.27.254;
option domain-name-servers 88.44.27.1;
option domain-name "XXX.co.uk";
key "HOST" {
algorithm hmac-md5;
secret "IfYouThinkThisisakeyforgetit";
};
zone XXX.co.uk {
key HOST;
}
zone 27.44.88.in-addr.arpa {
Key HOST;
}
}


#####Named.conf
options {
directory "/etc/named";
forwarders { 4.2.2.1; 4.2.2.2; };
allow-transfer { none; };
};


key "HOST" {
algorithm hmac-md5;
secret "IfYouthinkthisisakeyforgetit";
};

controls {

inet 127.0.0.1

allow { any; } keys { HOST; };

};


zone "." {
type hint;
file "root.hint";
};


zone "0.0.127.in-addr.arpa" {
type master;
file "pri.0.0.127.in-addr.arpa";
notify no;
allow-update {Key HOST;};
};

zone "XXX.co.uk" {
type master;
file "db.XXX.co.uk";
allow-update {Key HOST;};
};

zone "27.44.88.in-addr.arpa" {
type master;
file "db.27.44.88.in-addr.arpa";
allow-update {Key HOST;};
};



logging {
channel update-debug {
file "log/update-debug.log";
severity debug 3;
print-category yes;
print-severity yes;
print-time yes;
};
channel security-info {
file "log/named-auth.info";
severity info;
print-category yes;
print-severity yes;
print-time yes;
};

category update { update-debug; };
category security { security-info; };
};



// end of file.


##### /etc/rndc.conf
options {
default-server localhost;
default-key "rndc-key";
};

server localhost {
key "HOST";
};

key "rndckey" {
algorithm hmac-md5;
secret "HaNotGivingThisKeyAway";
};

key "HOST" {
algorithm hmac-md5;
secret "IfYOuThinkThisisaKeyforgetit"
};
 
It looks like all of your configuration is correct. The thing that I was trying to point out is that I have had problems with the reverse map of nodes if the name of the zone did not reflect the actual class of the IP address that you own. In this case your IP range starts with 88 which, as you probably know, falls under the class A range. You may want to try to set the name of that zone to 88.in-addr.arpa in the db.* file and in the named.conf, then the DNS server may find it. Even though you have specified that your network is a class C by putting in the correct netmask in the config that you posted, the named executable may still be looking for the name of the zone to be a class A.
 
Tired it but alas it still doesn't work. When I do a nslookup now on a IP it returns SRVFAIL error and it still never updated the revers lookup zone file.

Just to add that there are 2 .jnl files in the directory one for the A,CNAME records and one for the PTR stuff. Strange!


Wonder if its a bug in dhcpd v3.0

 
Did you change all references to the 27.44.88.in-addr.arpa to 88.in-addr.arpa in the DHCP config as well as in named.conf and in the db.27.44.88.in-addr.arpa file? You prob want to change the filename as well to db.88.in-addr.arpa.
 
I tried these scripts and they also didnt work until i changed the dhcpd.conf script zone parts to

zone XXX.co.uk {
primary 127.0.0.1;
key HOST;
}
zone 27.44.88.in-addr.arpa {
primary 127.0.0.1;
Key HOST;
}
as i am running dns on the same machine. I assume you could change the localhost address to a machine name that is mapped in dns to a specific ip.

:)
 
Didn't work on my LINUX box. It doesn't like the primary bit.


Never mind. Who needs reverse lookup anyway :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top