DHCP or fixed IPs for servers ????

jdow jdow at earthlink.net
Mon Sep 19 18:55:20 UTC 2011


On 2011/09/19 11:15, Dave Ihnat wrote:
> On Mon, Sep 19, 2011 at 12:07:01PM -0600, linux guy wrote:
>> Something I should interject here is that it isn't just setting the IP
>> address of the server.   I find the biggest problem is keeping the
>> /etc/hosts lists current on all the clients.
>
> Ouch.  That's why you use DNS (of course...you knew that from later comments)
>
>> Is there a way to statically assign the IP address to the servers and not
>> have to update the /etc/hosts file on all the machines ?  I know this is
>> what DNS is supposed to do, but I've never used it that way.
>
> If you statically assign the IP addresses, then it wouldn't have to be
> updated except when a server is changed/added/removed.  I've done this in
> the past with scripts that can be scheduled to run on each machine that
> pull a master hosts file from a designated main server, but it's far less
> reliable and desirable than running DNS.
>
>> Furthermore, my DNS server would be the local router, not a dedicated PC,
>> unless we changed that too.
>
> You would normally set up a DNS server to provide local name resolution and
> set it to go to your external DNS servers for addresses outside your local
> domain.  (It gets a lot trickier with "split DNS" if you're running your
> own outward-facing DNS server, but you're not doing that now, so don't
> start.)

When configuring DHCPD clauses like this one will create fixed assignments
that the computer picks up from DHCPD.

                 host poohbear {
                         hardware ethernet 00:0e:f7:a8:41:14;
                         fixed-address 192.168.7.125;
                 }

Otherwise simply tell Network Config on each machine that the machine's
address is a specific static address.

Either way you have to setup the hosts files on all the other machines.
Once you get more than three or four machines this can become a hassle.
I simply run a caching name server with a local zone and the DHCP server
setup to update the DNS server. It's a one time hassle getting it setup.
Then new machines on the net get an address, everybody can find it by
name, and Bob's my uncle.

{^_^}


More information about the users mailing list