Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to retrieve the DHCP option 43 from my DHCP server (Linux ISC DHCP server) on a Windows 2008 server (or any other Windows version, as long as the code 43 is specified in the Parameter request list (code 55)).

I can see the wanted value with Wireshark on Windows in the DHCP Offer packet

Option: (t=43; l=30) Vendor-Specific Information
  Option: (43) Vendor-Specific Information
  Length: 30
  Value: xxxxxxxxxxxxxxxxxxxxxxxxx (some hex number)

The converted hex value to string gives me the information I want.

But I don't know where / how to store it on disk ?

I thought I could see it while doing

ipconfig /all

Does anyone know how to do that ?

share|improve this question

2 Answers 2

You're on the DHCP server, correct?

Try netsh dhcp server show optionvalue.

share|improve this answer
    
Sorry for the lack of precision, but the DHCP server is a Linux ISC DHCP. My windows server is receiving information from that Linux DHCP server. I'm updating the original post. –  RaphDG Jan 5 '12 at 8:44
    
I don't think that it's available, in that case - the DHCP client has no use for an option that it doesn't pay attention to. –  Shane Madden Jan 5 '12 at 16:58

The information you are looking for is stored on the register under:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Tcpip\Parameters\Interfaces\{ID}

{ID} depends of your machine. How I find it is opening the regedit and looking for the entry 'DhcpInterfaceOptions'.

This little code on ruby will pick the registry for you"

    require 'win32/registry'

    keyname= "SYSTEM\\ControlSet001\\services\\Tcpip\\Parameters\\Interfaces\\{A0ACCA78-1CB2-46BD-B2E0-B0E791ABFC3B}"
    access = Win32::Registry::KEY_ALL_ACCESS
    Win32::Registry::HKEY_LOCAL_MACHINE.open(keyname) do |reg|;
      key = reg.read_bin('DhcpInterfaceOptions').unpack('H*')
      puts key   
    end
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.