Question about DHCP

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
Subject: Question about DHCP
On Mon, 2004-01-05 at 23:49, Kevin Brown wrote:
> > Something that's puzzling me about DHCP and DNS. On the individual
> > hosts, be they Linux, Windows, whatever, you have to specify a hostname.
> > If this system uses DHCP to get it's IP address, the DNS may or may not
> > resolve to the hostname that that specific system identifies itself
> > with. Is there a way to make sure that no matter what IP address the
> > DHCP server gives a computer, it's name will always be consistent?
> >
> > Ex: let's say I want to FTP from one system to another. The server side
> > just got a new IP lease and I don't know what it is. Can I just FTP to
> > <systemname> and access the system I want? Or is this just not possible?
> > Should I instead just give permanent IP addresses to those systems that
> > will run servers?
> >
> > I'm also wondering because in the Windows world, the box name is
> > consistent, and you can always access it through \\name\share. Granted,
> > this is SMB and not DNS, but still...
>
> Windows does this with DDNS (dynamic DNS) under Active Directory. You could
> probably get all the systems to do this by setting up a DDNS server and have all
> the machines register their hostname with it via scripts.

---
ISC's dhcpd and bind (versions 3.0x and 9.2.x are current I think) are
more than capable of ddns. This isn't all that easy to set up - though
ddns on Active Directory is easier, it's also more costly. Other dhcp
servers (i.e. Linksys dsl/cable modem routers) can be configured to
entice the client to register ddns with dns server if you run a caching
dns server on your lan.

SOME dhcp servers are very consistent about leases and most modern
computer OS's will try to re-lease the same ip address to prevent drift.
Also, a typical dhcp server will let you make 'reservations' which fix
the ip address 'issued' to a server based upon the MAC address of the
network card. This is cool...your ip address is certain not to change
but if you make a change in the dhcp configuration (i.e. dns server
address changes, netbios server changes, ntp server changes, etc. -
these changes are absorbed by the computer which gets its ip address
from the unchanging reservation).

BUT in answer to your question - when I set up a lan...
typically a class C - 254 ip addresses / say 192.168.0.0
I will reserve 192.168.0.1 through 192.168.0.99 for fixed ip addresses
I will have the dhcp server issue addresses 192.168.0.100 through
192.168.0.199
I will have the default gateway at 192.168.0.254 (internet access)
192.168.0.0 is network address and no host is given that address
192.168.0.1 is primary network server
192.168.0.2 through 192.168.0.49 is for other servers
192.168.0.50 through 192.168.0.999 is for printers

and yes, it's a good idea to 'fix' server addresses so that they never
move and make entries into dns server for those servers.

I also tend to use A records for the host names...
192.168.0.1 linserv1.domain.com linserv1
192.168.0.2 virtualip.domain.com virtualip #another ip from server

and then create CNAME records for common services...
www.domain.com         linserv1.domain.com
ftp.domain.com         linserv1.domain.com
mail.domain.com        linserv2.domain.com
so that I can change the server without going around to each machine.
For example, if everyone points their MUA (mail client program) to use
mail.domain.com and I decide to bring in a new server to handle the
mail, I only need to change the CNAME record and everyone finds the new
mail server.


As for your analogy with windows, \\SERVER\SHARE - it's no different
with nfs - consider only the above information. With DNS it's actually
simpler when you have a plan.

YMMV

Craig