[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Resolving hostnames using DHCP



Running bind9 on sarge here and cant get it to work either. could the issue be from the below?

===============
= http://www.isc.org/products/BIND/bind9.html
===============
BIND 9.2 includes a new lightweight stub resolver library and associated resolver daemon that fully support forward and reverse lookups of both IPv4 and IPv6 addresses. This library is still considered experimental and is not a complete replacement for the BIND 8 resolver library. Applications that use the BIND 8 res_* functions to perform DNS lookups or dynamic updates still need to be linked against the BIND 8 libraries. For DNS lookups, they can also use the new "getrrsetbyname()" API.

Michael Wardle wrote:
On Sun, 2003-04-06 at 11:39, Clive Menzies wrote:

However, is there a way in which the server can resolve hostnames to local IP addresses automatically or do I really have to list them manually in /etc/hosts?


If you want to do this automatically with DHCP, you can use a feature
called dynamic DNS.

To do this, ensure that you're using at least DHCP server version 3 and
BIND server version 8.

Add the following lines to /etc/dhcp3/dhcpd.conf:
ddns-update-style interim;
option domain-name-servers <your server's IP address>;

Add the folling lines to /etc/bind/named.conf:
zone "<your network address backwards>.in-addr.arpa" IN {
	type master;
	file "db.<your network address>";
	allow-update { localhost; };
};
zone "<your local domain name>" IN {
	type master;
	file "db.<your domain name>";
	allow-update { localhost; };
};

And restart your DHCP and DNS servers:
/etc/init.d/bind restart
/etc/init.d/dhcp3-server restart

This is really neat, but I've been unable to get it working on my Debian
box (whilst it works very nicely on my Red Hat box).

For more information, do a Web search for dynamic DNS.

Hope this helps


--
=================================================================
= Management is doing things right; leadership is doing the     =
=       right things.    - Peter Drucker                        =
=_______________________________________________________________=
=     http://www.sun.com/service/sunps/jdc/javacenter.pdf       =
=  www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone  =
=================================================================



Reply to: