Labels

Showing posts with label DHCP. Show all posts
Showing posts with label DHCP. Show all posts

Thursday, December 29, 2011

How can I configure my computer to use a DHCP obtained IP address along with a static IP address at the same time?

To configure your computer (tested on Windows 2000, Windows XP and Windows Server 2003) to use both a DHCP obtained IP address and a statically configured IP address follow these steps:

Configure your computer to use DHCP

  1. Right-click My Network Places and choose Properties.
  2. On the NIC that is (usually) labeled as Local Area Connection - right-click and choose Properties.

clip_image001

  1. Select TCP/IP (make sure you don't remove the check mark accidentally) and press the Properties button.

clip_image002

  1. Make sure you have "Obtain Automatically" selected.

clip_image003

  1. You can verify your settings by running ipconfig /all at a Command Prompt:

clip_image004

  1. Ok all the way out.

Add a second (or third and so on), static, IP address

  1. Click Start and choose Run. Enter Regedit and press Enter.

Note: On Windows 2000 and NT you need to run Regedt32 instead.

  1. Navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{B003AD4A-B6DB-44FD-9741-CBA3C51B6498}

(actual GUID of the NIC may vary, select the one that represents your own NIC (from step 2 above)

  1. Select the IPAddress key and double click it.
  2. In the Edit Multi String dialog box enter a second (and third and so on) IP address. Make sure you enter each IP on a separate line. Click Ok.

clip_image005

  1. Select the SubnetMask key and double click it.
  2. In the Edit Multi String dialog box enter a second (and third and so on) Subnet Mask. Make sure you enter each Subnet Mask on a separate line. Click Ok.

clip_image006

  1. Close the registry editor.
  2. Go back to your network properties, right-click your NIC and select Disable.

clip_image007

  1. Right-click your NIC and select Enable.

clip_image008

  1. Verify your settings by running ipconfig /all at a Command Prompt:

clip_image009

Done!

Windows 98 users: This trick can also be accomplished with Windows 98, only there you need to modify the following registry path (instead of the one in step 2 above):

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\NetTrans

In Windows 98 you'll also need to reboot your computer for the trick to work.

PXE server Configuration on DHCP Server

  1. Open the DHCP control panel from administrative tools.
  2. Expand the server you are wanting to configure. Expand the "Scope" folder. Right click on "Scope Options" and select "Configure Options".
  3. Put a check mark in "013 Boot File Size" and enter the file size in 512 octet blocks. Example, your boot image file is 12 KB (kilobytes). Convert 12 KB to bytes (12288). This must be exact, don't just multiply 12 by 1000. Divide the file size in bytes by 512 (12288 / 512). Enter the resulting number (24) in the text dialog that is enabled when you put a check in 013.
  4. Put a check mark in "043 Vendor Specific Info" and enter the following binary value: 01 04 00 00 00 00 ff.
  5. Open a command window and type the following:
    c:\>netsh
    netsh>dhcp
    netsh dhcp>server \\server_name
    netsh dhcp server>add optiondef 60 ClassID String 0
    netsh dhcp server>set optionvalue 60 STRING PXEClient
  6. Put a check mark in "066 Boot Server Host Name" and enter the IP address of the server.
  7. Put a check mark in "067 Bootfile Name" and enter the name of the boot image file. (Thanks to Mark McRitchie for this step.)
  8. If you use the Linux-based boot disk, you can set the boot disk's defaults (user name, password, share) via DHCP option 233.
  9. Open a command prompt and type:
    netsh dhcp server add optiondef 233 Unattended String 0 comment="Unattended dhcp info"
  10. Go back to "Scope Options", select configure options, put a check mark next to the new entry, and fill in the boot disk options you want to use
    E.g., z_user=username z_pass=sekrit z_path=\\myserver\myshare.
  11. Right click on the server name in the DHCP control panel, go to all tasks, and select "restart".
  12. Go back to scope options and verify that all the information is there. You should see the five entries on the right. They should look like this:
    013  Boot File Size                          Standard        0x18
    043  Vendor Specific Info            Standard        01 04 00 00 00 00 ff
    060  ClassID                                       Standard        PXEClient
    066  Boot Server Host Name      Standard        Server IP address
    067  Bootfile Name                        Standard        bzImage (boot file name)
  13. If any of the options do not match these, double-click on the option and change the value. More than likely option 060 will be wrong. Change it so it looks like above.