Information Technology Reference
In-Depth Information
for a laptop whose owner travels from a DHCP-enabled network to a non-DHCP network, or for
a DHCP-enabled computer that should fall back to a particular IP configuration to ensure
continued client access in the event of a DHCP failure.
Caution You can only enable an alternate IP configuration for a NIC that is configured to obtain its IP
address automatically; if you've configured a NIC with a static IP address, the Alternate Configuration tab will
not be available.
The simplest way to enable an alternate IP configuration is through the GUI, but you can
also configure it using VBScript. Unlike the configuration information used for a primary IP
configuration, you unfortunately cannot use netsh to configure a static alternate address. Further
complicating matters is the fact that the Registry entry that stores alternate IP information is a
binary large object, or blob, rather than the simple strings that you used to configure a primary
static IP address. To edit this blob, you need to enter information into an array, one hexadecimal
number at a time, using a specific format. As you saw, much of the information in the blob
doesn't change from one computer to the next—these are standard entries that need to be
present whenever you configure an alternate IP configuration. So you'll have twenty standard
array entries such as these:
' now insert another 20 fixed values
arrBlobValues(48) = &H03
arrBlobValues(49) = &H00
arrBlobValues(50) = &H00
arrBlobValues(51) = &H00
arrBlobValues(52) = &H00
arrBlobValues(53) = &H00
arrBlobValues(54) = &H00
arrBlobValues(55) = &H00
arrBlobValues(56) = &H04
arrBlobValues(57) = &H00
arrBlobValues(58) = &H00
arrBlobValues(59) = &H00
arrBlobValues(60) = &H00
arrBlobValues(61) = &H00
arrBlobValues(62) = &H00
arrBlobValues(63) = &H00
arrBlobValues(64) = &HFF
arrBlobValues(65) = &HFF
arrBlobValues(66) = &HFF
arrBlobValues(67) = &H7F
These fixed entries will then be followed by computer-specific entries that encode the actual
IP address, subnet mask, default gateway, and DNS servers into the Registry blob, like this:
Search WWH ::




Custom Search