The Dynamic Address Pool
If you are confident that no servers with permanently assigned IP addresses will be
added to the network, you can allocate all the remaining 252 IP addresses to the
DHCP server in a dynamic pool. However, it can be helpful to save some addresses
for new servers that might be added later. For example, you can reserve addresses
10.0.0.1 through 10.0.0.9 for servers and give the remaining addresses to the DHCP
server to allocate to DHCP clients. To provide addresses to the DHCP server for
assignment, you use the
range statement, as shown in Example 15.3.
Example 15.3
range 10.0.0.10 10.0.0.254;
Now that the DHCP server has some IP addresses to allocate, it can respond when a
client requests an address. When a DHCP client broadcasts a
DHCPDISCOVER message
on the network in this example, the DHCP server chooses an address from the range
shown in Example 15.3. It’s not really possible to guess which address the server will
allocate because it depends on the server implementation.
Client Configuration Information
At this point, the DHCP server in our example has only enough information to
assign the client an IP address. As mentioned in Chapter 1, “An Introduction to
DHCP,” and Chapter 9, “DHCP Options,” this is not enough information to enable
the client to do anything useful. At a minimum, the client must know the IP address
of a router that can serve as its default route and the IP address of at least one name
server. This is shown in Example 15.4.
Example 15.4
option domain-name-servers ns.fugue.com;
option routers gw.nyc.fugue.com;
NOTE
In Example 15.4, the values of the domain name servers and routers options are declared
by using the domain names that correspond to those servers (for example, ns. fugue.com).
The DHCP server translates these domain names into IP addresses and sends the IP addresses
to the DHCP client. Because the network administrator used domain names, there is no need
to edit the configuration file when the IP addresses assigned to the routers and servers
change.
The only drawback to this is that it takes time to look up a domain name. If a client sends
a request and the DHCP server finds that it has to look up one or more names to satisfy
that request, it has to send its own request to the DNS server for each name, wait for the
responses, and then send its reply to the client.
CHAPTER 15 Configuring a DHCP Server256
019 3273 CH15 10/3/02 4:59 PM Page 256