Considerations when Configuring DHCP

Posted: July 9, 2007 in DHCP

Considerations when Configuring DHCP

Contributed by Dru Lavigne, DNSstuff Contributing Writer

Tuesday, 15 May 2007

When configuring a network to use DHCP for IP address allocation, there are several points an administrator needs to

keep in mind.

Spending a few moments to map out your network’s addressing needs can simplify the process of configuring the

DHCP servers. 1. Determine the DHCP scope(s): In DHCP terminology, a scope is equivalent to a subnet. The

number of scopes you will configure is dependent upon the subnet mask running on your network. If your network is not

running the default subnet mask, manually calculate or use a subnet calculator to determine the number of subnets and

the valid host range for each subnet.

For example, the network creates 8 subnets (or DHCP scopes) each containing 30 host addresses. The

names of those scopes and the valid addresses available within each scope can be seen in Figure 1: Figure 1: Scopes

for Scope Address Addresses Available for Lease on that Scope – – – – – – – 2. Determine the exclusion ranges: Most subnets will

have at least one IP address which is inappropriate to lease out to hosts. For example, every subnet needs a default

gateway and the address used on the gateway should be statically assigned and excluded from the range of addresses

available for lease. Depending upon your network layout, you may also have some subnets containing other statically

assigned addresses such as those for your DNS servers, web servers, mail servers, or other servers. 3. Decide if you

will use reservations: An alternative to exclusion ranges is to use reservations. Rather than statically assigning the IP

addresses of your servers you can instead choose to reserve those addresses within DHCP. For example, you can tell

DHCP to permanently lease the address to a specified server; that server will always receive that address

and that address is not available to other hosts within the scope. Note that reservations associate the host’s MAC

address to the IP address so you will need to remember to change the reservation if you ever replace the NIC within that

host. 4. Determine the address pool: The pool is the IP addresses available for DHCP clients to lease. The pool will

be the addresses in the scope minus any exclusion ranges and reserved addresses. 5. Decide upon the Option Types:

DHCP is capable of leasing any type of IP addressing information, not just the host’s IP address, subnet mask, and

default gateway addresses. Options include DNS servers, WINS servers, MTU, TTL, SMTP servers, and so on. The

complete list of available options can be found in RFC 2132. 6. Determine which options are global and which are local:

Once you know which options are appropriate to your network go through each option one at a time and ask yourself

“should all hosts receive this option or is it specific to this subnet?”. For example, all hosts will most likely use the same

DNS servers so the IP addresses of the primary and secondary DNS servers can be configured as global options.

However, the default gateway address is unique to each subnet. Every subnet will need a default gateway address, but

the actual address used differs by subnet, making this a local option. Take care to use the correct gateway address on

each subnet. 7. Determine if you need any DHCP relay agents: Some of the DHCP packets sent out by a client in order

to receive a DHCP lease are broadcast packets. If the DHCP server is on a different subnet than the DHCP client, it will

never receive that broadcast packet as routers don’t forward broadcasts to other subnets–meaning the DHCP client will

fail to get an IP address. If you have subnets containing DHCP clients but not a DHCP server, you will need to run DHCP

relay agent software on those subnets. 8. Prepare your firewall rules: If there are any firewalls between the DHCP

clients and the DHCP server, you will need to create rules to allow the DHCP packets. When creating your rules, keep

the following points in mind: – the DCHP client uses UDP port 68 – the DHCP server uses UDP point 67 – the first

time a DHCP client requests a least it doesn’t have an IP address and it doesn’t know the IP address of the DHCP server-

-meaning it uses IP address as the source IP address and as the destination IP address The

time you take writing out these considerations is well spent–your notes will make the actual DHCP configuration a breeze

and provide the added bonus of having documentation you can refer to when troubleshooting your IP network. Powered by Joomla! Generated: 8 July, 2007, 23:58


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s