Can you run DNS Server with IP assigned by DHCP?

Kevin Darcy kcd at daimlerchrysler.com
Tue Jan 4 22:56:10 UTC 2000


David Cost wrote:

> Since getting ADSL service a few months back I noticed that the IP,
> although dynamic, in fact has not changed for months. So I thought,
> "instead of using the Public DNS, why not set up my server as a DNS
> server. My IP changes so infrequently, if and when it does, I can go and
> reset the IP address in the nameserver entry to my domain record on
> Internic, and in the meantime use the Public DNS as my Secondary to fall
> back on."
>
> However, after setting up the DNS server and creating a zone, if I do an
> nslookup query, instead of getting my nameserver, I see that of the ISP.
> So I'm unsure, have I not set up my ZOne files correctly, or am I
> barking up the wrong tree because no matter what I do, I cannot use an
> IP address that is assigned to me by the ISP's DHCP server and expect it
> to function in the same manner as a true static IP assigned to me by an
> ISP?

As Barry pointed out, your resolver configuration really has little to do
with your nameserver configuration, so the fact that you set up a
nameserver only means that you are prepared to answer queries for
*other* machines, not necessarily your own.

Most likely, you just need to configure your resolver to use yourself for
name service. This would be done in /etc/resolv.conf for a Unix box, or in
the registry (configurable via Control Panel>Networking) on a Win95/Win98
box, or whatever the equivalent is on WinNT.

One possible complication, however, is that since you're getting your
address via DHCP, your ISP may be telling you what nameservers to use via
DHCP also, and this may be overriding your static resolver configuration.
If this is the case, then unless you can convince your ISP to tell your
machine to use itself as a nameserver, you may have to figure out a way to
make your machine ignore the nameserver information in DHCP and use the
statically-configured information instead. How you would do this, frankly
I don't have a clue, other than to speculate that it would be very
dependent on your DHCP client implementation.


- Kevin




More information about the bind-users mailing list