Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Assigning a Static IP Address


  • Please log in to reply
11 replies to this topic

#1
nhall@emc.org

nhall@emc.org
  • Member
  • 5 posts
  • Joined 21-December 15
  • OS:Server 2012R2
  • Country: Country Flag
Alright, I've been at this for several hours. I for the life of me cannot get a static IP set to this machine (Server 2012) after my sysprep reboot takes place.
Anyone see an issue with my Syntax / setup or any pointers to try and debug why the settings wont stick?
I have noted the MAC address and it does indeed match the address showed in ipconfig /all.
Thanks!!
<?xml version="1.0" encoding="UTF-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-TCPIP"
                   processorArchitecture="amd64"
                   publicKeyToken="31bf3856ad364e35"
                   language="neutral"
                   versionScope="nonSxS"
                   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
            <Interfaces>
                <Interface wcm:action="add">
                    <Ipv4Settings>
                        <DhcpEnabled>false</DhcpEnabled>
                    </Ipv4Settings>
                    <UnicastIpAddresses>
                        <IpAddress wcm:action="add"
                                   wcm:keyValue="1" >
                            10.128.36.186/24
                        </IpAddress>
                    </UnicastIpAddresses>
                    <Ipv6Settings>
                        <DhcpEnabled>false</DhcpEnabled>
                    </Ipv6Settings>
                    <Identifier>00-50-56-A9-6E-E3</Identifier>
                    <Routes>
                        <Route wcm:action="add">
                            <Identifier>1</Identifier>
                            <Prefix>0.0.0.0/0</Prefix>
                            <NextHopAddress>10.128.36.1</NextHopAddress>
                        </Route>
                    </Routes>
                </Interface>
            </Interfaces>
        </component>
        <component name="Microsoft-Windows-International-Core"
                   processorArchitecture="amd64"
                   publicKeyToken="31bf3856ad364e35"
                   language="neutral"
                   versionScope="nonSxS"
                   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>en-US</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup"
                   processorArchitecture="amd64"
                   publicKeyToken="31bf3856ad364e35"
                   language="neutral"
                   versionScope="nonSxS"
                   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
            <AutoLogon>
                <Password>
                    <Value>MyPazsw0rd</Value>
                    <PlainText>true</PlainText>
                </Password>
                <Enabled>true</Enabled>
                <LogonCount>3</LogonCount>
                <Username>Administrator</Username>
            </AutoLogon>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
            <TimeZone>Pacific Standard Time</TimeZone>
        </component>
    </settings>
</unattend>

Edited by Yzöwl, 28 December 2015 - 11:34 AM.
Code tags added



How to remove advertisement from MSFN

#2
jaclaz

jaclaz

    The Finder

  • Developer
  • 16,627 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Try putting the identifier right after the add action: <- edited, see below.

 

Try re-ordering the entries according to MS documentation linked in following post.

 

jaclaz


Edited by jaclaz, 28 December 2015 - 12:25 PM.


#3
aXeSwY

aXeSwY
  • Member
  • 5 posts
  • Joined 25-October 15
  • OS:Windows 10 x64
  • Country: Country Flag

Well am not expert but with command line you can make it so if you still having troubles :

 

Create a SetupComplete.cmd here : %WINDIR%\Setup\Scripts\

 

Let say this 
IP : 10.128.36.1

Mask : 255.255.255.240

Default gateway : 192.168.0.1

Gateway Metric : 1
 

Add this line 

 
netsh interface ip set address name="Local Area Connection" static 10.128.36.1 255.255.255.240 192.168.0.1 1


#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Supervisor
  • 10,517 posts
  • Joined 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Donator

Try putting the identifier right after the add action:


Have you seen any instance where re-arranging the XML does anything? By design, it shouldn't, as everything should be parsed prior to being used.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
office2016_sig_zps5dackl2h.jpg

#5
jaclaz

jaclaz

    The Finder

  • Developer
  • 16,627 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

 

Try putting the identifier right after the add action:


Have you seen any instance where re-arranging the XML does anything? By design, it shouldn't, as everything should be parsed prior to being used.

 

Well, there is a given order on MS pages:

https://technet.micr...y/ff715739.aspx

The settings in Interface must be added in the following order: Ipv4Settings, Ipv6Settings, Identifier, UnicastIpAddresses, and then Routes. After saving your Unattend file in Windows SIM, verify in the XML file that the output is shown in the correct order, as shown in the XML example below.

 

(and BTW I just realized that I posted wrong info, my bad  :blushing: ) I am correcting my previous post, the order is:

  1. Ipv4Settings
  2. Ipv6Settings
  3. Identifier
  4. UnicastIpAddresses
  5. Routes

jaclaz



#6
nhall@emc.org

nhall@emc.org
  • Member
  • 5 posts
  • Joined 21-December 15
  • OS:Server 2012R2
  • Country: Country Flag
So I took your advice and updated my XML and still no dice. This is driving me nuts Thank you for your feedback nonetheless :).

Updated:
<?xml version="1.0" encoding="UTF-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-TCPIP"
                   processorArchitecture="amd64"
                   publicKeyToken="31bf3856ad364e35"
                   language="neutral"
                   versionScope="nonSxS"
                   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
            <Interfaces>
                <Interface wcm:action="add">
                    <Ipv4Settings>
                        <DhcpEnabled>false</DhcpEnabled>
                    </Ipv4Settings>
                    <Ipv6Settings>
                        <DhcpEnabled>false</DhcpEnabled>
                    </Ipv6Settings>
                    <Identifier>00-50-56-A9-6E-E3</Identifier>
                    <UnicastIpAddresses>
                        <IpAddress wcm:action="add"
                                   wcm:keyValue="1" >
                            10.128.36.186/24
                        </IpAddress>
                    </UnicastIpAddresses>
                    <Routes>
                        <Route wcm:action="add">
                            <Identifier>1</Identifier>
                            <Prefix>0.0.0.0/0</Prefix>
                            <NextHopAddress>10.128.36.1</NextHopAddress>
                        </Route>
                    </Routes>
                </Interface>
            </Interfaces>
        </component>
        <component name="Microsoft-Windows-International-Core"
                   processorArchitecture="amd64"
                   publicKeyToken="31bf3856ad364e35"
                   language="neutral"
                   versionScope="nonSxS"
                   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>en-US</UserLocale>
        </component>
        <component name="Microsoft-Windows-Shell-Setup"
                   processorArchitecture="amd64"
                   publicKeyToken="31bf3856ad364e35"
                   language="neutral"
                   versionScope="nonSxS"
                   xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
            <AutoLogon>
                <Password>
                    <Value>MySuperSecretPassw0d1!</Value>
                    <PlainText>true</PlainText>
                </Password>
                <Enabled>true</Enabled>
                <LogonCount>3</LogonCount>
                <Username>Administrator</Username>
            </AutoLogon>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
            <TimeZone>Pacific Standard Time</TimeZone>
        </component>
    </settings>
</unattend>

Edited by Yzöwl, 28 December 2015 - 02:09 PM.
Code tags added AGAIN


#7
jaclaz

jaclaz

    The Finder

  • Developer
  • 16,627 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

I don' t know. :unsure:

Maybe the issue is with putting it into the OOBE pass (it shoudl be AFAIK in specialize pass) see:

https://technet.micr...7(v=ws.10).aspx

 

 

specialize
Creates and applies system-specific information. For example, you can configure network settings, international settings, and domain information.

 

 

For the rest it seems to me OK, recheck with this, I finally found the reference I remembered (what i had improperly posted before):

http://blogs.technet...d-xml-file.aspx

(you could try setting just the IPv4 values as in the above, otherwise I am short of ideas :( )

 

jaclaz



#8
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,084 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

@nhall@emc.org, Could you please note that I found it necessary to make changes to your opening message, despite that you appear to have repeated the problem in your latest message, (which I have also fixed).

Please do not do the same again, thank you.



#9
nhall@emc.org

nhall@emc.org
  • Member
  • 5 posts
  • Joined 21-December 15
  • OS:Server 2012R2
  • Country: Country Flag

@nhall@emc.org, Could you please note that I found it necessary to make changes to your opening message, despite that you appear to have repeated the problem in your latest message, (which I have also fixed).

Please do not do the same again, thank you.

I'll add code tags moving forward.


  • Tripredacus and dencorso like this

#10
nhall@emc.org

nhall@emc.org
  • Member
  • 5 posts
  • Joined 21-December 15
  • OS:Server 2012R2
  • Country: Country Flag

I don' t know. :unsure:

Maybe the issue is with putting it into the OOBE pass (it shoudl be AFAIK in specialize pass) see:

https://technet.micr...7(v=ws.10).aspx

 

 

specialize
Creates and applies system-specific information. For example, you can configure network settings, international settings, and domain information.

 

 

For the rest it seems to me OK, recheck with this, I finally found the reference I remembered (what i had improperly posted before):

http://blogs.technet...d-xml-file.aspx

(you could try setting just the IPv4 values as in the above, otherwise I am short of ideas :( )

 

jaclaz

Intrestin, Ill give that a shot today and let you know. Thanks Jaclaz.



#11
nhall@emc.org

nhall@emc.org
  • Member
  • 5 posts
  • Joined 21-December 15
  • OS:Server 2012R2
  • Country: Country Flag

JacLaz, I got it!!

 

Thank you sir!!!!

 

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <InputLocale>en-US</InputLocale>
        <SystemLocale>en-US</SystemLocale>
        <UILanguage>en-US</UILanguage>
        <UILanguageFallback>en-US</UILanguageFallback>
        <UserLocale>en-US</UserLocale>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Password>
<Value>MyPass$</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>3</LogonCount>
<Username>Administrator</Username>
        </AutoLogon>
        <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <NetworkLocation>Work</NetworkLocation>
            <ProtectYourPC>1</ProtectYourPC>
        </OOBE>
        <TimeZone>Pacific Standard Time</TimeZone>
    </component>
</settings>
<settings pass="specialize">
    <component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Interfaces>
            <Interface wcm:action="add">
<Ipv4Settings>
 <DhcpEnabled>false</DhcpEnabled>
</Ipv4Settings>
<Ipv6Settings>
 <DhcpEnabled>false</DhcpEnabled>
</Ipv6Settings>
<Identifier>00-50-56-A9-6E-E3</Identifier>
<UnicastIpAddresses>
 <IpAddress wcm:action="add" wcm:keyValue="1">10.128.36.186/24</IpAddress>
</UnicastIpAddresses>
<Routes>
 <Route wcm:action="add">
<Identifier>1</Identifier>
<Prefix>0.0.0.0/0</Prefix>
<NextHopAddress>10.128.36.1</NextHopAddress>
 </Route>
</Routes>
            </Interface>
         </Interfaces>
      </component>
</settings>
</unattend>
 


#12
jaclaz

jaclaz

    The Finder

  • Developer
  • 16,627 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

 

JacLaz, I got it!!

 

Thank you sir!!!!

 

Good :), you are welcome :thumbup.

 

@St.Thomas Tripredacus ;)

Now we have a documented example :yes:, when it comes to the good MS guys, what is stated as "by design" often means "we messed up (BIG) and we try to cover our backs through mis- or under- document" a feature.

More seriously, what I found "queer" is that something that was found out in 2008 or so has not seemingly been fixed till now, according also to the comments on the given blog post:

http://blogs.technet...d-xml-file.aspx

I do understand how all the good IT guys use DHCP and dynamic IP addresses, and that it is rare to want to have static IP addresses nowadays, particularly in a server environment, and also the netsh workaround posted by aXeSwY would work fine.

Still it seems to me like a bug in the WAIK which is worth of note.

 

jaclaz






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users