如何在Windows 2008服务器上保存DHCP选项43?

我需要在Windows 2008服务器(或任何其他Windows版本,只要在参数请求列表(代码55)中指定代码43)从我的DHCP服务器(Linux ISC DHCP服务器)检索DHCP选项43。

我可以在DHCP Offer数据包中看到Windows上的Wireshark所需的值

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

转换后的hex值为string给我的信息我想要的。

但我不知道在哪里/如何将它存储在磁盘上?

我以为我可以在做的时候看到它

ipconfig /all

有谁知道这是怎么做到的吗 ?

你在DHCP服务器上,对吗?

试试netsh dhcp server show optionvalue

您正在查找的信息存储在寄存器下:

HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \服务\ TCPIP \参数\接口\ {ID}

{ID}取决于您的机器。 我如何find它打开registry并寻找条目“DhcpInterfaceOptions”。

这个ruby的小代码将为您selectregistry“

  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