Configuring DHCPThe DHCP client receives a bundle of configuration information from the DHCP server. That information includes the IP address and other configuration settings. You must manually configure the DHCP server with the TCP/IP address information it will need for the clients. You configure DHCP with blocks or ranges of IP addresses that it can use to satisfy lease requests. Each block of IP addresses is called a DHCP scope. Each DHCP scope contains the block of addresses that will be used to configure DHCP clients on a given network segment. DHCP Server Configuration in WindowsA tour through a DHCP server configuration gives a glimpse of the kind of information you need to set up DHCP. Windows NT Server provides a good example for DHCP server configuration. Later versions of Windows, such as Windows 2000 Server and Windows 2003, have equivalent DHCP configuration utilities, but the later versions include wizards, snap-ins and nonessential options that make for a more ungainly example. The following is a description of how to set up a DHCP server. This discussion is intended simply as an illustration. If you ever have to set up DHCP on a working network, you'd be well advised to do some additional reading. It is important to note that Windows isn't the only DHCP server. In fact, you are more likely to find a Unix/Linux DHCP server leasing addresses for your Internet service provider. To configure the DHCP server in Windows NT, follow these steps:
By the Way Often two (or possibly more) DHCP servers are configured with scopes to service a network. The additional DHCP server(s) provides fault tolerance and allows a DHCP client to acquire a lease successfully when a DHCP server is offline. However, be aware that each DHCP server operates independently and does not share information regarding leased IP addresses. For this reason, do not configure multiple DHCP servers with scopes that contain overlapping addresses. Otherwise it is just a matter of time until two DHCP clients are configured with the same IP address, which will cause network problems. Some operating systems, such as Windows, will tell you when they detect a duplicate address error. Usually you want the DHCP server to configure DHCP clients with more configuration parameters than the IP address and subnet mask. In Windows NT, the DHCP Options menu allows you to add a number of other configuration options. These options are typically configured at two levels. One configuration level establishes scope options, which are used to configure parameters that change from scope to scope. The other establishes global options, which are used to configure parameters that apply to all scopes. To configure scope options in Windows NT, follow these steps:
You use global options to configure parameters that remain constant from scope to scope. For instance, computers on every network segment typically use the same DNS server IP addresses. For this reason, the DNS server IP addresses are typically configured using a global option. To configure global options in Windows NT, follow these steps:
At this point, you have configured one DHCP scope with options. If you have not done so previously, you must activate the scope before the DHCP server can begin leasing IP addresses to DHCP clients on that network. To activate a scope, select the scope to be activated, choose Scope, and then choose Activate from the menu, as shown in Figure 12.5. DHCP is configured and active and should successfully lease IP addresses to DHCP clients. You can determine whether the server is performing its leasing task successfully by booting a DHCP client computer and using the ipconfig or winipcfg command with the Release and Renew options, as described in Hour 13, "Connectivity Utilities." Figure 12.5. The Scope menu.DHCP Server Configuration in LinuxLinux systems provide DHCP services through dhcpd, the DHCP daemon. Instructions for installing dhcpd vary according to the vendor. DHCP configuration information is stored in the configuration file /etc/dhcpd.conf. The /etc/dhcpd.conf file contains the IP address configuration information that the DHCP daemon will assign to clients. /etc/dhcpd.conf also contains optional settings such as the broadcast address, domain name, DNS server address, and the addresses of routers. A sample /etc/dhcpd.conf file follows: default-lease-time 600; max-lease-time 7200; option domain-name "macmillan.com"; option subnet-mask 255.255.255.0; option broadcast-address 185.142.13.255; subnet 185.142.13.0 netmask 255.255.255.0 { range 185.142.13.10 185.142.13.50; range 185.142.13.100 185.142.13.200; } |