Configuring TCP/IP Options

The messages clients and servers broadcast to each other allow you to set TCP/IP options that clients can obtain by default when they obtain a lease or can request if they need additional information. It is important to note, however, that the types of information you can add to DHCP messages is limited in several ways:

  • DHCP messages are transmitted using User Datagram Protocol (UDP), and the entire DHCP message must fit into the UDP datagram. On Ethernet with 1500-byte datagrams, this leaves 1236 bytes for the body of the message (which contains the TCP/IP options).

  • BOOTP messages have a fixed size of 300 bytes as set by the original BOOTP standard. Any clients using BOOTP are likely to have their TCP/IP options truncated.

  • Although there are many options that you can set, clients understand only certain TCP/IP options. Thus, the set of options available to you is dependent upon the client's implementation of DHCP.

With that in mind, let's look at the levels at which options can be assigned and the options that Windows clients understand.

Levels of Options and Their Uses

Each individual TCP/IP option such as a default gateway is configured separately. DHCP administrators can manage options at five levels within the DHCP server configuration:

  • Predefined options Allow DHCP administrators to specify the way in which options are used and to create new option types for use on a server. In the DHCP console, you can view and set predefined options by right-clicking the server node in the console tree and selecting Set Predefined Options.

  • Server options Allow DHCP administrators to configure options that are assigned to all scopes created on the DHCP server. Think of server options as global options that would be assigned to all clients. Server options can be overridden by scope, class, and client-assigned options. In the DHCP console, you can view and set server options by expanding the entry for the server you want to work with, right-clicking Server Options, and then choosing Configure Options.

  • Scope options Allow DHCP administrators to configure options that are assigned to all clients that use a particular scope. Scope options are assigned only to normal scopes and can be overridden by class and client-assigned options. In the DHCP console, you can view and set scope options by expanding the scope you want to work with, rightclicking Scope Options, and then choosing Configure Options.

  • Class options Allow DHCP administrators to configure options that are assigned to all clients of a particular class. Client classes can be useror vendor-defined. Two classes included with DHCP Server are Windows 98, which is used to assign specific options to clients running Windows 98, and Windows 2000, which is used to assign specific options to clients running Windows 2000 or later. Class options can be overridden by client-assigned options. You define new user and vendor classes by rightclicking the server entry and selecting either Define User Classes or Define Vendor Classes as appropriate. Once defined, class options can be configured in the Advanced tab of the Server Options, Scope Options, and Reservation Options dialog boxes.

  • Reservation options Allow administrators to set options for an individual client that uses a reservation. Also referred to as client-specific options. After you create a reservation for a client, you can configure reservation options by expanding the scope, expanding Reservations, right-clicking the reservation, and selecting Configure Options. Only TCP/IP options manually configured on a client can override clientassigned options.

Options Used by Windows Clients

RFC 3442 defines many TCP/IP options that you can set in DHCP messages. Although you can set all of these options on a DHCP server, the set of options available is dependent upon the client's implementation of DHCP.

Table 25-1 shows the options that can be configured by administrators and used by Windows computers running the DHCP Client service. Each option has an associated option code, which is used to identify it in a DHCP message, and a data entry, which contains the value setting of the option. These options are requested by clients to set their TCP/IP configuration.

Table 25-1. Standard TCP/IP Options That Administrators Can Configure

Option Name

Option Code

Description

Router

003

Sets a list of IP addresses for the default gateways that should be used by the client. IP addresses are listed in order of preference.

DNS Servers

006

Sets a list of IP addresses for the DNS servers that should be used by the client. IP addresses are listed in order of preference.

DNS Domain Name

015

Sets the DNS domain name that clients should use when resolving host names using DNS.

WINS/NBNS Servers

044

Sets a list of IP addresses for the WINS servers that should be used by the client. IP addresses are listed in order of preference.

WINS/NBT Node Type

046

Sets the method to use when resolving NetBIOS names. The acceptable values are: 0x1 for B-node (broadcast), 0x2 for P-node (peer-to-peer), 0x4 for M-node (mixed), and 0x8 for H-node (hybrid). See the section entitled "NetBIOS Node Types".

NetBIOS Scope ID

047

Sets the NetBIOS scope for the client.

Using Userand Vendor-Specific TCP/IP Options

DHCP uses classes to determine which options are sent to clients. The user classes let you assign TCP/IP options according to the type of user the client represents on the network. The default user classes include the following:

  • Default User Class An all-inclusive class that includes clients that don't fit into the other user classes, such as computers running Windows NT 4. Any computer running a version of the Windows operating system earlier than Windows 2000 is in this class.

  • Default BOOTP Class Any computer running Windows 2000 or later has this user class if it is connected to the local network directly. This means Windows 2000, Microsoft Windows XP, and Windows Server 2003 computers connected with a wired network interface have this class.

  • Default Routing And Remote Access Class Any computer that connects to the network using RRAS has this class. Any settings applied to this class are used by dial-in and VPN users, which allows you to set different TCP/IP options for these users.

Clients can be a member of multiple user classes, and you can view the user class memberships for each network interface by typing ipconfig /showclassid * at the command prompt. (The asterisk tells the command that you want to see all the network interfaces.) The output you'll see on a computer running Windows 2000 or later will be similar to the following:

Windows IP Configuration
DHCP Classes for Adapter "Local Area Connection":

     DHCP ClassID Name. . . . . . . :   Default Routing and Remote Access Class
     DHCP ClassID Description . . . :   User class for remote access clients

     DHCP ClassID Name. . . . . . . :   Default BOOTP Class
     DHCP ClassID Description . . . :   User class for BOOTP Clients

Here, the client is a member of the Default Routing And Remote Access Class and the Default BOOTP Class. The client doesn't, however, get its options from both classes. Rather the class from which the client gets its options depends on its connection state. If the client is connected directly to the network, it uses the Default BOOTP Class. If the client is connected by Routing and Remote Access, it uses the Default Routing And Remote Access Class.

Vendor classes work a bit differently because they define the set of options available to and used by the various user classes. The default vendor class, DHCP Standard Options, is used to set the standard TCP/IP options, and the various user classes all have access to these options so that they can be implemented in a user-specific way. Additional vendor classes beyond the default define extensions or additional options that can be implemented in a user-specific way. This means that the vendor class defines the options and makes them available, while the user class settings determine which of these additional options (if any) are used by clients.

The default vendor classes that provide additional (add-on) options are as follows:

  • Microsoft Options Add-on options available to any client running any version of Windows

  • Microsoft Windows 98 Options Add-on options available to any client running Windows 98 or later

  • Microsoft Windows 2000 Options Add-on options available to any client running Windows 2000 or later

When it comes to these classes, a client applies the options from the most specific add-on vendor class. Thus, a Windows 98 client would apply the Microsoft Windows 98 Options vendor class, and a Windows 2000 or later client would apply the Microsoft Windows 2000 Options vendor class. Again, these options are in addition to the standard options provided through the DHCP Standard Options vendor class and can be implemented in a manner specific to a user class. This means you can have one set of add-on options for directly connected clients (Default BOOTP Class) and one set for remotely connected clients (Default Routing And Remote Access Class).

The add-on options that can be set for a client running Windows 2000 or later are listed in Table 25-2.

Table 25-2. Additional TCP/IP Options That Administrators Can Configure

Option Name

Option Code

Description

Microsoft Disable NetBIOS Option

001

Disables NetBIOS if selected as an option with a value of 0x1.

Microsoft Release DHCP Lease On Shutdown Option

002

Specifies that a client should release its DHCP lease on shutdown if selected as an option with a value of 0x1.

Microsoft Default Router Metric Base

003

Specifies that the default router metric base should be used if selected as an option with a value of 0x1.

Settings Options for All Clients

On the DHCP server, you can set TCP/IP options at several levels. You can set options for the following components:

  • All scopes on a server In the DHCP console, expand the entry for the server you want to work with, right-click Server Options, and then choose Configure Options.

  • A specific scope In the DHCP console, expand the scope you want to work with, right-click Scope Options, and then choose Configure Options.

  • A single reserved IP address In the DHCP console, expand the scope, expand Reservations, right-click the reservation you want to work with, and select Configure Options.

Regardless of the level at which you are setting TCP/IP options, the dialog box displayed has the exact same set of choices as that shown in Figure 25-16. You can now select each standard TCP/IP options you want to use in turn, such as Router, DNS Servers, DNS Domain Name, WINS/NBNS Servers, and WINS/NBT Node Type, and configure the appropriate values. Click OK when you are finished.

Set class-specific options using the General tab.

Figure 25-16. Set class-specific options using the General tab.

Settings Options for Routing and Remote Access Clients Only

On the DHCP server, you can set TCP/IP options for RRAS clients at several levels. You can set options for the following components:

  • All scopes on a server In the DHCP console, expand the entry for the server you want to work with, right-click Server Options, and then choose Configure Options.

  • A specific scope In the DHCP console, expand the scope you want to work with, right-click Scope Options, and then choose Configure Options.

  • A single reserved IP address In the DHCP console, expand the scope, expand Reservations, right-click the reservation you want to work with, and select Configure Options.

Regardless of the level at which you are setting TCP/IP options, the dialog box displayed has the exact same set of choices. You can now complete the following steps:

  1. Click the Advanced tab, as shown in Figure 25-17. Select DHCP Standard Options as the vendor class and Default Routing And Remote Access Class as the user class.

    Set the DHCP Standard Options.

    Figure 25-17. Set the DHCP Standard Options.

  2. Select each standard TCP/IP option you want to use in turn, such as Router, DNS Servers, DNS Domain Name, WINS/NBNS Servers, and WINS/NBT Node Type, and configure the appropriate values.

  3. For clients running Windows 2000 or later, select Microsoft Windows 2000 Options as the vendor class and Default Routing And Remote Access Class as the user class, as shown in Figure 25-18.

    Set the add-on options for remote access clients.

    Figure 25-18. Set the add-on options for remote access clients.

  4. Select each add-on TCP/IP option you want to use in turn, such as Microsoft Disable NetBIOS Option and Microsoft Release DHCP Lease On Shutdown Option, and accept the default value (0x1) to turn on the option.

  5. Click OK.

Setting Add-On Options for Directly Connected Clients

You can set add-on options for directly connected clients that are different from those of remote access clients. Access the TCP/IP options dialog box at the appropriate level, and then click the Advanced tab. For Windows 2000 or later clients, select Microsoft Windows 2000 Options as the vendor class and Default BOOTP Class as the user class, as shown in Figure 25-19. Now select each add-on TCP/IP option you want to use in turn, such as Microsoft Disable NetBIOS Option and Microsoft Release DHCP Lease On Shutdown Option, and accept the default value (0x1) to turn on the option. Then click OK when you are finished.

Set the add-on options for directly connected clients.

Figure 25-19. Set the add-on options for directly connected clients.

Defining Classes to Get Different Option Sets

If you want a group of DHCP clients to use a set of options different than other computers, you can use classes to do this. It is a two-part process. First, create your own user-defined class on each DHCP server to which the clients might connect. Then configure the network interfaces on the clients to use the new class.

Creating the Class

In the DHCP console, you can define the new user class by right-clicking the server entry and selecting Define User Classes. In the DHCP User Classes dialog box, shown in Figure 25-20, the existing classes are listed, including the Default Routing And Remote Access Class and then Default BOOTP Class. The Default User Class isn't listed, however, because it is the base user class.

User classes in addition to the base class.

Figure 25-20. User classes in addition to the base class.

Click Add to display the New Class dialog box shown in Figure 25-21. In the Display Name box, type the name of the class you are defining. The name is arbitrary and should be short but descriptive enough so that you know what that class is used for by seeing its name. You can also type a description in the Description box. Afterward, click in the empty area below the word ASCII. In this space, type the class identifier, which is used by DHCP to identify the class. The class identifier cannot have spaces. Click OK to close the New Class dialog box, and then click Close to return to the DHCP console.

Set the class name, description, and class ID.

Figure 25-21. Set the class name, description, and class ID.

Next, you must configure the TCP/IP options that should be used by this class. In the DHCP console, expand the entry for the server you want to work with, right-click Server Options, and then choose Configure Options. In the Server Options dialog box, click the Advanced tab. As shown in Figure 25-22, select DHCP Standard Options as the vendor class and the class you created as the user class.

Set the TCP/IP options for the new class.

Figure 25-22. Set the TCP/IP options for the new class.

Select each standard TCP/IP option you want to use in turn, such as Router, DNS Servers, DNS Domain Name, WINS/NBNS Servers, and WINS/NBT Node Type, and configure the appropriate values. If you want to set Windows options, select Microsoft Windows 2000 Options as the vendor class. Don't change the user class. Then select each add-on TCP/IP option you want to use in turn, such as Microsoft Disable NetBIOS Option and Microsoft Release DHCP Lease On Shutdown Option, and accept the default value (0x1) to turn on the option. Click OK to complete the configuration of the new class.

Configuring Clients to Use the Class

Now you must configure the network interfaces on the clients to use the new class. Assuming "Local Area Connection" is the name of the network interface on the client, you would type the following command to do this:

ipconfig /setclassid "Local Area Connection" ClassID

where ClassID is the ID of the user class to use. For example, if the class ID is Engineering, you would type

ipconfig /setclassid "Local Area Connection" Engineering

In these examples, I use "Local Area Connection" as the network interface name because that is the default connection created by Windows. If a client has multiple network interfaces or a user has changed the name of the default network interface, you must use the name of the appropriate interface. You can get a list of all network interfaces on a client by typing ipconfig /all at the command prompt.

After you set the class ID, type ipconfig /renew at the command prompt. This tells the client to renew the lease and because the client has a new class ID it also forces the client to request new TCP/IP options. The output should be similar to the following:

Windows IP Configuration
Ethernet adapter Local Area Connection:

     Connection-specific DNS Suffix . .:
     IP Address . . . . . . . . . . . .:  192.168.1.22
     Subnet Mask. . . . . . . . . . . .:  255.255.255.0
     Default Gateway. . . . . . . . . .:  192.168.1.1
     DHCP Class ID. . . . . . . . . . .:  Engineering

That's it. Because the class ID is persistent, you need to set it only once. So, if the client is restarted, the class ID will remain. To remove the class ID and use the defaults again, type the following command:

ipconfig /setclassid "Local Area Connection"
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset