[NTLUG:Discuss] Hosts using DHCP

Greg Edwards greg at nas-inet.com
Thu Feb 27 10:45:50 CST 2003


Wayne Dahl wrote:
> I've found at least part of the Samba issue.  There were no entries in
> my /etc/hosts or /etc/hosts.allow files.  All the documentation I've
> found so far about putting entries in there deal with static IP's
> because you assign an IP to a specific host in the file.  What I have
> not found is how this works when the hosts get their IP's via DHCP from
> the router.  Since the IP's are subject to change every time the
> machines are rebooted, the entries in the file could be invalid.  I have
> not found any documentation anywhere so far explaining how to get around
> this, short of assigning static IP's.  So, the question is, how does the
> hosts file work on a network where DHCP is running?
> 
> Wayne
> 


Wayne,

Are you getting each IP from an internal DHCP server or an external server?

Don't bother with the /etc/hosts file if your using DHCP.  The .allow 
and .deny files are security issues, not routing.

You'll want to make very sure that you can resolve your host names 
through a DNS server.  Make sure your /etc/resolv.conf points to a 
nameserver that knows the addresses for these machines.

You can override the use of a nameserver for these boxes by using the 
Windows way and netbios names.  Look at setting up a wins server and 
lmhosts files for this.

-- 
Greg Edwards
New Age Software, Inc. - http://www.nas-inet.com
======================================================
Galactic Outlaw        - http://goutlaw.nas-inet.com
   The ultimate cyberspace adventure!




More information about the Discuss mailing list