The following are advantages of DHCP:
■ Configuration of large and even midsized networks is much simpler. If a DNS server address or some other change is necessary to the client, you don’t have to touch each device in the network physically to reconfigure it with the new settings.
■ Once you enter the IP configuration information in one place— the server— it’s automatically propagated to clients, eliminating the risk that a user will misconfigure some parameters and require you to fix them.
■ IP addresses are conserved because DHCP assigns them only when requested.
■ IP configuration becomes almost completely automatic. In most cases, you can plug in a new system (or move one) and then watch as it receives a configuration from the server. For example, when you install new network changes, such as a gateway or DNS server, the client configuration is done at only one location— the DHCP server.
■ It allows a preboot execution environment (PXE) client to get a TCP/IP address from DHCP. PXE clients (also called Microsoft Windows Deployment Services [WDS] clients) can get an IP address without needing to have an operating system installed. This allows WDS clients to connect to a WDS server through the TCP/IP protocol and download an operating system remotely.
Disadvantages of DHCP
Unfortunately, there are a few drawbacks with DHCP:
■ DHCP can become a single point of failure for your network. If you have only one DHCP server and it’s not available, clients can’t request or renew leases.
■ If the DHCP server contains incorrect information, the misinformation will automatically be delivered to all of your DHCP clients.
■ If you want to use DHCP on a multisegmented network, you must put either a DHCP server or a relay agent on each segment, or you must ensure that your router can forward Bootstrap Protocol (BOOTP) broadcasts.
Ipconfig Lease Options
The ipconfig command is useful for working with network settings. Its /renew and /release switches make it particularly handy for DHCP clients. These switches allow you to request renewal of, or give up, your machine’s existing address lease. You can do the same thing by toggling the Obtain An IP Address Automatically button in the Internet P rotocol (TCP/IP) Properties dialog box, but the command- line option is useful especially when you’re setting up a new network.
For example, I spend about a third of my time teaching MCSA or MCSE classes, usually in temporary classrooms set up at conferences, hotels, and so on. Laptops are used in these classes, with one brawny one set up as a DNS/DHCP/DC server. Occasionally, a client will lose its DHCP lease (or not get one, perhaps because a cable has come loose). The quickest way to fix it is to pop open a command- line window and type ipconfig /renew.
You can configure DHCP to assign options only to certain classes. Classes, defined by an administrator, are groups of computers that require identical DHCP options. The
/setclassidclassID switch of ipconfig is the only way to assign a machine to a class. More specifically, the switches do the following:
ipconfig /renew Instructs the DHCP client to request a lease renewal. If the client already has a lease, it requests a renewal from the server that issued the current lease.
This is equivalent to what happens when the client reaches the half- life of its lease. Alternatively, if the client doesn’t currently have a lease, it is equivalent to what happens when you boot a DHCP client for the first time.
ipconfig /release Forces the client to give up its lease immediately by sending the server a DHCP release notification. The server updates its status information and marks the client’s old IP address as “available,” leaving the client with no address bound to its network interface. When you use this command, most of the time it will be immediately followed by ipconfig/renew. The combination releases the existing lease and gets a new one, probably with a different address. (It’s also a handy way to force your client to get a new set of settings from the server before the lease expiration time.) ipconfig /setclassidclassID Sets a new class ID for the client. You will see how to configure class options later in the section “Setting Scope Options for IPv4.” For now, you should know that the only way to add a client machine to a class is to use this command. Note that you need to renew the client lease for the class assignment to take effect.
If you have multiple network adapters in a single machine, you can provide the name of the adapter (or adapters) upon which you want the command to work, including an asterisk (*) as a wildcard. For example, one of my servers has two network cards: an Intel EtherExpress (ELNK1) and a generic 100 Mbps card. If I want to renew DHCP settings for both adapters, I can type ipconfig /renew *. If I just want to renew the Intel EtherExpress card, I can type ipconfig /renew ELNK1.
Understanding Scope Details
By now you should have a good grasp of what a lease is and how it works. To learn how to configure your servers to hand out those leases, however, you need to have a complete understanding of some additional topics: scopes, superscopes, exclusions, reservations, address pool, and relay agents.
Scope
Let’s start with the concept of a scope, which is a contiguous range of addresses. There’s usually one scope per physical subnet, and a scope can cover a Class A, Class B, or Class C network address or a TCP/IP v6 address. DHCP uses scopes as the basis for managing and assigning IP addressing information.
Each scope has a set of parameters, or scope options, that you can configure. Scope options control what data is delivered to DHCP clients when they’re completing the DHCP negotiation process with a particular server. For example, the DNS server name, default gateway, and default network time server are all separate options that can be assigned. These settings are called option types. You can use any of the types provided with Windows Server 2022, or you can specify your own.
Superscope
A superscope enables the DHCP server to provide addresses from more than one scope to clients on the same physical subnet. This is helpful when clients within the same subnet have more than one IP network and thus need IPs from more than one address pool. Microsoft’s DHCP snap- in allows you to manage IP address assignment in the superscope, though you must still configure other scope options individually for each child scope.
Exclusions and Reservations
The scope defines what IP addresses could potentially be assigned, but you can influence the assignment process in two additional ways by specifying exclusions and reservations:
Exclusions These are IP addresses within the range that you never want automatically assigned. These excluded addresses are off-l imits to DHCP. You’ll typically use exclusions to tag any addresses that you never want the DHCP server to assign at all. You might use exclusions to set aside addresses that you want to assign permanently to servers that play a vital role in your organization.
Reservations These are IP addresses within the range for which you want a permanent DHCP lease. They essentially reserve a particular IP address for a particular device. The device still goes through the DHCP process (i.e., its lease expires and it asks for a new one), but it always obtains the same addressing information from the DHCP server.
Exclusions are useful for addresses that you don’t want to participate in DHCP at all. Reservations are helpful for situations in which you want a client to get the same settings each time they obtain an address.
An address cannot be simultaneously reserved and excluded. Be aware of this fact for the exam, possibly relating to a troubleshooting question.
Using Reservations and Exclusions |
Deciding when to assign a reservation or exclusion can sometimes be confusing. In practice, you’ll find that certain computers in the network greatly benefit by having static IP network information. Servers such as DNS servers, the DHCP server itself, SMTP servers, and other low- level infrastructure servers are good candidates for static assignment. There are usually so few of these servers that the administrator is not overburdened if a change in network settings requires going out to reconfigure each individually. Even in large installations, I find it preferable to manage these vital servers by hand rather than rely on DHCP. Reservations are also appropriate for application servers and other special but nonvital infrastructure servers. With a reservation in DHCP, the client device will still go through the DHCP process but will always obtain the same addressing information from the DHCP server. The premise behind this strategy is that these nonvital servers can withstand a short outage if DHCP settings change or if the DHCP server fails. |
Address Pool
The range of IP addresses that the DHCP server can assign is called its address pool. For example, let’s say you set up a new DHCP scope covering the 192.168.1 subnet. That gives you 254 usable IP addresses in the pool. After adding an exclusion from 192.168.1.241 to 192.168.1.254, you’re left with 240 (254 – 14) IP addresses in the pool. That means (in theory, at least) that you can service 240 unique clients at a time before you run out of IP addresses.
DHCP Relay Agent
By design, DHCP is intended to work with clients and servers on a single IP network. But RFC 1542 sets out how BOOTP (on which DHCP is based) should work in circumstances in which the client and server are on different IP networks. If no DHCP server is available on the client’s network, you can use a DHCP relay agent to forward DHCP broadcasts from the client’s network to the DHCP server. The relay agent acts like a radio repeater, listening for DHCP client requests and retransmitting them through the router to the server.
Leave a Reply