MDT: Automating Static IP during Bare metal boot

No DHCP? No Problem

In this scenario, the requirement is to boot a lite touch boot image with a static IP address, where is no DHCP available. You can use a custom answer file (unattend.xml) to configure your static IP settings at boot. Below are 2 methods

Method 1 – Netshell

Use the answer file in your extra files folder to run a command line like netsh  during boot. I’ve previously explained how to use the extra files for BGInfo and the process is pretty much the same.

  1. Create a folder called ‘ExtraFiles’ (or Extrafiles64) in your deployment share.
  2. Next, create a folder called Windows with a subfolder called System32 beneath it.
  3. In the Deployment Workbench, Right-Click on the Deployment Share and select properties. Then click on the Windows PE x86 Settings (or Windows PE x86 Settings )Tab
  4. In the Windows PE Customizations section browse to the ExtraFiles (or Extrafiles64) folder

Unattend.XML

  1. Open Windows System Image Manager and select a DeploymentShare
  2. Then select a Windows Image
  3. Then create a New AnswerFile
  4. Add the following settings to the Answer File in the WindowsPE configuration Pass

Microsoft-Windows-Setup | RunSynchronous | RunSynchronousCommand

5. Add the following settings:

Description=Set Static IP Address
Order=1
Path=netsh interface ip set address Ethernet static 10.0.0.9 255.255.255.0 127.0.0.1

Description=Set Background
Order=2
Path=Bginfo.exe Win_PE.bgi /silent /timer:0 /NOLICPROMPT

Description=Lite Touch PE
Order=3
Path=wscript.exe X:\Deploy\Scripts\LiteTouch.wsf

WSIM-SetIP

In this example I am placing the command before BGInfo and Lite Touch PE. Ommit the BGInfo section if you’ve not configured it.

6.  Save the file in your deployment share as \ExtraFiles\Unattend.XML then update the deployment share to recreate the LiteTouchPE_x86.wim (or ISO or x64)

Method 2 – Set a Unicast IP Address

In this method, we use the native settings of the WindowsPE answer file configuration pass.

1. Navigate to Microsoft-Windows-TCPIP | Interfaces | Interface | Ipv4Settings and select Add Setting to Pass 1 windowsPE.

WSIM-Add-IPv4Settings

2. Add the following settings:

Ipv4Settings
    DhcpEnabled=false
Metric=10
RouterDiscoveryEnabled=false

WSIM-Set-IPv4Settings

3. Under Microsoft-Windows-TCPIP | Interfaces | Interface | UnicastIpAddresses

and select Add Setting to Pass 1 windowsPE.

WSIM-Add-IPAddress

4. Add an IP Address with the following settings:

Key=1
Value=10.0.0.9/24WSIM-Set-IPAddress

5. Navigate to Microsoft-Windows-TCPIP | Interfaces | Interface

and change the Identifier to “Ethernet”.

WSIM-Set-Identifier

6. Again, save the file in your deployment share as \ExtraFiles\Unattend.XML then update the deployment share to recreate the LiteTouchPE_x86.wim (or ISO or x64)

Be aware that this method only has very basic IP settings.

Advertisements

About Andrew Barnes

A Scripting and Deployment Specialist.
This entry was posted in Deployment, MDT 2010, MDT 2012 and tagged , , , . Bookmark the permalink.

2 Responses to MDT: Automating Static IP during Bare metal boot

  1. batmunkh says:

    thank you very much for the guide. how to configure dns server ip

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s