When to Run a DHCP Server


In some sense, the answer to the question of when you should run a DHCP server is easy: You should run one whenever your network contains clients that are configured via DHCP. When configuring an individual computer, though, you select DHCP only when a DHCP server is available. You can break out of this circular logic by considering the network as a whole: Is it easier to configure individual computers with static IP addresses, or to set up a DHCP server on one computer and use it to configure individual computers?

You can get some idea of how difficult it is to configure individual computers for static IP addresses by reviewing the "Configuring a Static IP Address" section of Chapter 2 ”but be aware that different OSs may impose different configuration needs. Your Linux DHCP server can deliver IP addresses not just to Linux systems, but to systems that run other UNIX variants, Windows, MacOS, OS/2, BeOS, or just about anything else for which a TCP/IP stack is available. All of these OSs require more-or-less the same information to be configured with static IP addresses, though, so the differences between them relate to user interface details. It's almost always true that a DHCP configuration on the client will be simpler than a static IP address configuration.

NOTE

graphics/note.gif

A DHCP client can be a server for other protocols. Sometimes this is inadvisable, because the server should remain accessible at all times and it's usually important that a server's IP address not change. You can assign a server an unchanging IP address via DHCP, though, as described in the upcoming section "Assigning Fixed Addresses." Even so, you may prefer to assign static IP addresses directly to servers to avoid the possibility of problems should the DHCP server become inaccessible at an awkward time.


Configuring a DHCP server is usually more work than is configuring a single computer to use a static IP address. It's therefore seldom worthwhile to configure a DHCP server for the benefit of just one or two DHCP clients. The total effort of DHCP server configuration begins to become worthwhile at perhaps half a dozen clients. (If a computer dual-boots between multiple OSs, its configuration effort rises as if it were multiple computers, which in some sense it is.)

In addition to the total configuration effort on DHCP clients and the server, you should consider the expertise of the people who will be doing the configuring. If ordinary users on your network set up their systems, using DHCP offers great benefits because it becomes much less likely that these users will accidentally enter information incorrectly because they've misunderstood the instructions. If somebody experienced in basic network configuration sets up all the computers, this factor becomes less important.

Although DHCP can simplify network configuration greatly, there is at least one computer that won't be using DHCP to set its basic network options: the DHCP server itself. You'll configure this computer with a static IP address, and set up the DHCP server program so that it doesn't attempt to issue that IP address to any clients.

NOTE

graphics/note.gif

A computer with multiple network interfaces might conceivably function as a DHCP client on one network, but host a DHCP server on the other network.


The DHCP server is extremely important to the normal functioning of your network. If the DHCP server goes down, clients won't be able to obtain IP addresses when they boot, or when they would normally renegotiate the maintenance of their IP addresses with the server. You may want to consider preparing a backup DHCP server computer. This computer's DHCP server shouldn't be active, but you should be prepared to start it should the main DHCP server go down. If possible, you should arrange to keep the backup server constantly supplied with the main server's lease file so that the backup server won't mistakenly issue an IP address that the main server assigned to another computer. You might do this through cron jobs that transfer the lease file, for instance. Such a configuration is probably overkill on a small network, though. Also, long lease times will minimize the risk should a DHCP server go down, because clients that are already booted may not need to contact the DHCP server while it's out of operation.

Finally, you may want to consider non-Linux DHCP options. All major Linux distributions ship with a DHCP server; this isn't true of some other OSs, so using Linux as a DHCP server platform often makes a great deal of sense. You might, however, be setting up a small network that uses a broadband router ”the type of device that links small office and home networks to cable or digital subscriber line (DSL) networks. These devices usually include DHCP servers. If yours does, it's probably simpler to configure than a Linux DHCP server, although broadband router DHCP servers are also usually much less flexible than are Linux DHCP servers. For instance, broadband router DHCP servers seldom give you any way to consistently deliver the same IP address to a client.

DHCP servers are normally run via SysV scripts. This configuration provides for quick responses to clients and allows the server to maintain important configuration information in memory. Chapter 4, Starting Servers, discussed options for starting servers in general.



Advanced Linux Networking
Advanced Linux Networking
ISBN: 0201774232
EAN: 2147483647
Year: 2002
Pages: 203

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net