Configuring DHCP

The 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 Windows

A 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:

  1. Install the DHCP service.

  2. Launch the DHCP Manager utility by choosing Start, Programs, Administrative Tools, DHCP Manager.

    The DHCP Manager (Local) utility appears. There is a single entry labeled Local Machine; if you double-click this entry, a character at the far left toggles between + and -. Make sure that the Local Machine entry displays the - symbol, which indicates it is currently expanded.

  3. Choose Scope, Create from the menu.

    You are presented with the Create Scope - (Local) dialog box, as depicted in Figure 12.1. The Start Address and End Address fields define the two ends of the block of IP addresses you will allow the DHCP server to control. In Figure 12.1, you can see that the starting address in the range is 192.59.66.10 and the ending address is 192.59.66.254. If any statically assigned IP addresses fall within this range, you must exclude those addresses from the scope so that they are not assigned to other computers, which would cause networking problems. In this example, the DHCP server itself is statically configured with an IP address of 192.59.66.200; therefore, you can see that this address has been excluded from the scope.

    Figure 12.1. The DHCP Manager's Create Scope dialog box.

    graphics/12fig01.gif

    By the Way

    It is not required and probably not desirable to configure a scope with the full range of allowable IP addresses on a network or a subnetwork. If you do so, be sure to exclude the IP address of any configured routers and other nodes with static IP addresses.

  4. Configure the Subnet Mask field with the proper subnet mask. If you want, you can alter the length of the lease and make entries into the Name and Comment fields. The text you enter in these two fields is used only for administrative purposes.

    When you are finished, choose OK to close the Create Scope (Local) dialog box and display the DHCP Manager dialog box. The DHCP Manager dialog box indicates that the scope has been successfully created but is not yet active. This dialog box asks if you want to activate the scope at this time. You can choose either the Yes or No button. Typically, you would choose not to activate the scope at this time if you want to add options such as the IP addresses of the default gateway or DNS servers, and so on.

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:

  1. Choose DHCP Options, Scope from the DHCP Manager menu. The DHCP Options: Scope dialog box appears.

  2. From the Unused Options list, select the options that you want applied at the scope level. In this case, 003 Router, which now appears in the Active Options list, is selected and added.

  3. Click the Value button to expand the dialog box so it appears as depicted in Figure 12.2.

    Figure 12.2. The DHCP Options: Scope dialog box.

    graphics/12fig02.gif

  4. After the dialog box is expanded, choose the Edit Array button and add the IP address for the default gateway using the dialog box provided. After all scope-level options for the currently selected scope have been entered and configured, you can choose OK to close the DHCP Options: Scope dialog box.

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:

  1. Choose DHCP Options, Global from the DHCP Manager menu. The DHCP Options: Global dialog box appears.

  2. From the Unused Options list, select the options that you want applied at the scope level. In this case, 006 DNS Servers is selected and added, and appears in the Active Options list.

  3. Click the Value button to expand the dialog box so that it appears as depicted in Figure 12.3.

    Figure 12.3. The DHCP Options: Global dialog box.

    graphics/12fig03.gif

  4. After the dialog box is expanded, choose the Edit Array button. The IP Address Array Editor dialog box appears, as shown in Figure 12.4. The IP Address Array Editor is used to enter several IP addresses, as in the case of DNS servers.

    Figure 12.4. The IP Address Array Editor dialog box.

    graphics/12fig04.gif

  5. Add the IP addresses for the DNS servers. After all global-level options have been entered and configured, you can choose OK to close the DHCP Options: Global dialog box.

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.

graphics/12fig05.gif

DHCP Server Configuration in Linux

Linux 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; } 


Sams Teach Yourself TCP/IP in 24 Hours
Sams Teach Yourself TCP/IP in 24 Hours (4th Edition)
ISBN: 0672329964
EAN: 2147483647
Year: 2003
Pages: 259
Authors: Joe Casad

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net