Click here to Skip to main content
15,921,577 members
Articles / Mobile Apps

Vendor Specific DHCP (option 43) in Windows CE

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
5 May 2009CPOL3 min read 25.9K   4   2
How to enable Windows CE to get vendor specific DHCP option 43.


This article describes the changes required on Windows CE (DHCP client) side to support Vendor specific DHCP option.

Using the Code

In order to enable Windows CE to pass the vendor class id to the DHCP server and to receive the vendor specific sub options from DHCP server, the following two registry settings need to be added.

* Create the following two registry entries in the Windows CE under [HKEY_LOCAL_MACHINE\Comm\<adapter name>\Parms\TcpIp] (where <adapter name> is the network adaptor name).

  1. DHCPSendOptions

    Create a key with name “DHCPSendOptions” under [HKEY_LOCAL_MACHINE\Comm\<adapter name>\Parms\TcpIp]

    Add a binary value with name “60” under this key as shown in the below example:
    [HKEY_LOCAL_MACHINE\Comm\<adapter name>\Parms\TcpIp\DHCPSendOptions]


    (DHCP Client uses option ‘60’ to request DHCP server for the vendor specific option with vendor specific class id in the DHCP Discover packet.)

    The general format of the above data is:

    <Option> <length> <values>
    3c,          04,         74,65,73,74

    where “60” is the vendor specific option (used for DHCP client to send the vendor class id to server).

    • 3C (Hexadecimal equivalent of 60)– is the option value that needs to be added as a first byte in the data.
    • 04 is the length of the vendor class id (test).
    • 74,65,73,74 is the vendor class id (‘test’ is the vendor class id we used here) – The server should be configured with this vendor class id.
  2. DHCPOptions

    Create a key called “DHCPOptions” and add the value “43” under that
    as shown in the below example:
    [HKEY_LOCAL_MACHINE\Comm\<adapter name>\Parms\TcpIp\DHCPSendOptions]


    The value “43” is set to receive the Vendor specific option from DHCP server on DHCP ack packet.

    Keep the data field empty.

    After making the above registry changes, connect the Ethernet cable to the n/w where DHCP server is connected. If the cable is already connected, then execute “ipconfig / release” and/or “ipconfig /renew” commands to request for DHCP again.

    After successful receiving DHCP server acknowledgement, the registry entry “43” will receive the sub option sent by the DHCP server.

    The format of the value 43 is:

    <Vendor specific option> <length of total data> <suboption1> 
    <length of subotion1> <data od subotion1>  <sub option> <…>

    Example value:

    HKEY_LOCAL_MACHINE\Comm\<adapter name>\Parms\TcpIp\DhcpOptions]
    • 2b is the Hexadecimal equivalent for option “43
    • 10 is the length of the total received data
    • 67 (Decimal 103) is the Sub option one name
    • 04 is length of the sub option one
    • C0, a8, 64, 6e is the value of the sub option one
    • 69 ( Decimal 105) sub option two
    • 04 is the length of the sub option two
    • c0,a8,1e,15 value of the sub option two
    • 6e (decimal 110) is the suboption name 3
    • 02 is the length of the value
    • 00,05 is the value

Configuring DHCP Server to Support Vendor Class Option

Follow the below steps to configure DHCP server for vendor specific options.

  1. Install DHCP Server.
  2. Create a scope and activate the scope.
  3. After the scope is created, right click on the DHCP server, and click on Define Vendor classes.
  4. Click on Add.
  5. In the window that comes up, enter Display name let's say “TEST”, enter Description, and then enter an ASCII class Id (example: test).
  6. Click on Predefined Options and Values.
  7. Select the new Option Class Created i.e. TEST.
  8. Click on Add to create a New Option.
  9. Enter Name, and under data type choose IP. Choose a code between 1 and 255. Provide description (we used 103, 105 110).
  10. Go to server options, right click and choose Configure Options.
  11. Click on advanced, and choose TEST from the drop down, then choose the Option you want to activate.


  • 5th May, 2009: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Technical Lead Bally Technologies
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

GeneralMistake Pin
laosteven23-Jun-09 0:21
laosteven23-Jun-09 0:21 
GeneralA very good article, but I am not sure how this is programming related Pin
zippy19815-May-09 6:15
zippy19815-May-09 6:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.