DHCP User Class and Vendor Class Options

DHCP User Class and Vendor Class Options


Windows 2000's (Win2K's) DHCP provides support for a host of new features. This week, I focus on the support for user-specified and vendor-specified DHCP options—features that let administrators assign separate options to clients with similar configuration requirements. For example, if DHCP-aware clients in your human resources (HR) department require a different default gateway or DNS server than the rest of your clients, you can configure DHCP Class IDs to distribute these options to HR clients. The options that Class IDs provide override any scope or global default options that the DHCP server typically assigns.

Option Classes


Windows 2000 Server (Win2K Server) offers two option class types: User Class and Vendor Class. User Classes assign DHCP options to a group of clients that require similar configuration; Vendor Classes typically assign vendor-specific options to clients that share a common vendor type. For example, with Vendor Classes you can assign all Dell computers DHCP options that are common to those machines. The purpose of option classes is to group DHCP options for similar clients within a DHCP scope.

Setting Up a User Class Option


User Class options come in handy when you want to assign special DHCP options to a group of clients. For example, you might decide that roaming salesmen who use laptops should have a short lease period for DHCP options. Or you might decide to assign short leases to managers when they dial in with laptops and longer leases to the same managers when they work in their offices on desktop computers.

Let's say you want to configure a User Class called HR for all HR clients. Configuring a User Class involves adding a user class at the DHCP server and setting a DHCP user class ID at the client. To add a User Class HR on the DHCP server, highlight the DHCP server in the DHCP console and select Define User Classes on the Action menu, as Screen 1 shows. Click Add, and type HR in the Display name box, as Screen 2 shows. Here's where it gets tricky. You need to add the Class ID next. Position your cursor directly under the word ASCII (if you click under the word ID, this procedure won’t work). Click in the white box under the word ASCII, and type HR. You'll see the numbers 48 and 52 appear automatically under ID. Click OK, then click Close. Next, right-click Scope Options in the DHCP console and select Configure Options. Click the Advanced tab. The drop-down box next to the User Class will show the User Class HR that you just added. Select HR and configure the options for the HR group under Available Options. Click OK, and you’re finished with the server portion of the configuration.

Next, you need to set the HR class ID on the client (this requires administrative privileges). Log on to the workstation as a local administrator. Go to the command prompt and type

ipconfig /setclassid <adapter_name> HR</adapter_name>

where is the name of your network adapter. In Win2K, you can rename your adapter. For example, I renamed my adapter in Network and Dial-up Connections to 3COM by right-clicking the default local area connection. If you don’t know the name of your adapter, type ipconfig. Substitute the name of your adapter in the above command. The system will reply with a message similar to the following:

C:\> ipconfig /setclassid 3COM HR<br>
  Windows 2000 IP Configuration<br>
      DHCP ClassId successfully modified for adapter "3COM"

Now if you type ipconfig, you should see HR listed under the DHCP Class ID. You might have to release and renew your IP address to obtain the updated DHCP options for the HR User Class. To delete the Class ID on the client, simply type ipconfig /setclassid (without the Class ID at the end).

Setting Up a Vendor Class Option


The steps for creating a Vendor Class on the DHCP server are identical to creating a User Class, except that you choose Define Vendor Class from the Action menu to add a new class. Microsoft supports Vendor Class options for Win2K and Windows 98 clients. Request for Comments (RFC) 1700 defines the vendor types and lists the reserved hardware and OS type abbreviations. Some vendors can choose to define their vendor IDs for their computers. For example, Compaq can give its clients certain options that are specific to Compaq’s hardware. You'll notice that the only predefined vendor classes on your DHCP server are Microsoft's. For other vendors, you have to manually add the options to make them available to the clients. For more information about Vendor Classes, check out RFCs 2131 and 2132.

Differences Between User Classes and Vendor Classes


Several differences exist between User Classes and Vendor Classes. User Classes are part of proposed Internet drafts; Vendor Classes are part of accepted Internet drafts. You can set and view User Class information with the ipconfig command, as I discussed earlier; DHCP client vendors, such as Microsoft, configure Vendor Class IDs. You use User Classes mainly for administrative purposes, such as providing the same domain name to a group of clients; Vendor Classes typically serve to enhance DHCP functionalities that are specific to a vendor.

With Win2K's new option classes, you can better manage client configurations. You now have more control over specific clients within a particular scope, and vendors can offer enhanced functionalities to their own clients.

Discuss this Article 8

Steven Gallagher (not verified)
on Aug 17, 2001
Can this DHCP class ID be set in a domain or group policy?
baca@cohos-evamy.com
on Aug 4, 2009
I was wondering about the ramifications of implementing the ClassIDs for purposes of rudimentary NAC. If all the domain computers were to be set to use a proper User Class ID scope and the non-ClassID scope to be configured with intentionally wrongly configured gateway and DNS addresses, this would prevent rogue devices from joining the network upon jacking in. However, a company laptop would not be able to get an IP address anywhere outside the corporate network, unless the Class ID is removed, and the users are given administrative rights on the laptops to do so. I was trying to verify that this is the case, but there is no mention of this in your article. It should have been covered.
Anonymous User (not verified)
on Feb 21, 2005
Great Article
neel (not verified)
on Mar 5, 2004
Simply superb explanation. Straight to Point
Rui Machado (not verified)
on Apr 8, 2004
very good explenation
Anonymous User (not verified)
on Mar 22, 2005
succinct
Raghu (not verified)
on Jun 23, 2004
I posted a comment last time...well now that a new problem has arised...it worked once but many a times i am failing... the nic seems to accept the accounts dhcp class what i gave....but not taking the scope of that class,rather taking scope of another class HR what could be the problem.....in use is RTL8139
Raghu (not verified)
on Jun 22, 2004
Zubair, Well Done

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.