Can you run DNS Server with IP assigned by DHCP?

Scot Thompson scthom at uswest.net
Wed Jan 5 19:45:53 UTC 2000


I just use a script (executed by dhcpcd automatically (dhcpc-eth0.exe))
to prepend my nameserver onto the resolv.conf file.  The problem is that
resolv.conf is overwritten by the dhcp info recieved and so resolv.conf
must be updated with your locale DNS server address every time your IP
address changes or new information is received by dhcp.  The execution
of this file is a documented feature of dhcpcd.

Kevin Darcy wrote:
> 
> 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

-- 
/ Scot Thompson
/ scot.thompson at asu.edu
/ scthom at uswest.net
/ http://www.users.uswest.net/~scthom



More information about the bind-users mailing list