Configuring Delivery of Dynamic Addresses

Listing 27.1 is adequate for assigning dynamic IP addresses to no more than 205 computers. The lines that accomplish this task are the final three lines of the listing:

subnet netmask { range;

These lines make up a declaration. In this case, the declaration applies to the network, as defined on the first line of the declaration. The parameters that appear between the curly braces apply only to machines in that block of addresses. You can create multiple subnet declarations if you like, and in some cases you might need to do this. For instance, the server might have multiple network interfaces and need to assign different IP addresses to machines on different physical subnets. For a network with a single physical subnet, a declaration similar to the one in Listing 27.1 should work just fine. This declaration's second line, consisting of a range parameter, defines the IP address range that the server delivers: to When you turn on a DHCP client computer, it might receive any address in this range, depending on which addresses the server has already assigned. If you have more computers than this range permits, then you should expand it (if possible) or create another subnet declaration that provides additional addresses. If you need significantly more than 205 addresses, expanding the declaration will probably require changing the netmask. For instance, using a netmask of enables you to assign addresses ranging from through (You'd specify a subnet of rather than in this case.) Of course, you must have the right to use whatever addresses you pick. The addresses I use as examples in this chapter are parts of private address blocks that anybody can use, but they aren't routed on the Internet.

Tip If possible, define a range that's substantially larger than the number of computers on your network. Doing so will give your network room to grow, and it will provide a buffer against addresses being claimed and not released, thereby consuming a lease unnecessarily.

Given the network block, Listing 27.1's reservation of only 205 IP addresses means that the first 49 addresses are available for static assignment. Typically, at least one of these addresses will be assigned to the network's router ( in Listing 27.1), and one will go to the DHCP server itself. Others might go to a name server, mail server, or other servers that are best run with static IP addresses. Alternatively, you can run some of these servers using DHCP and assign them fixed addresses, as described in the next section.

Warning An address with a machine portion, in binary, of all 0s or all 1 s has special meaning in TCP/IP addressing. AII-0 addresses refer to the network itself, and all-1 addresses are used for broadcasts. You should never attempt to assign such an address using DHCP, nor should you attempt to assign it statically for that matter. If you use a 24-bit netmask, this means that the final byte of an address should never be 0 or 255.

0 0

Post a comment