{"id":627,"date":"2018-09-23T22:38:00","date_gmt":"2018-09-24T05:38:00","guid":{"rendered":"https:\/\/kb.terabyteunlimited.com\/kb-articles\/using-a-static-ip-in-tbwinpe-re\/"},"modified":"2021-09-07T15:05:17","modified_gmt":"2021-09-07T22:05:17","slug":"using-a-static-ip-in-tbwinpe-re","status":"publish","type":"lsvr_kba","link":"https:\/\/www.terabyteunlimited.com\/kb\/kb-articles\/using-a-static-ip-in-tbwinpe-re\/","title":{"rendered":"Using a Static IP in TBWinPE\/RE"},"content":{"rendered":"<p>This article provides instructions on specifying a static IP address in TBWinPE\/RE. This is useful when connecting to a network without a DHCP server or other cases when a specific address is required. The process can be done manually after booting or it can be configured to run automatically as part of initialization.<\/p>\r\n<p><strong>Manually set static IP<\/strong><\/p>\r\n<ol>\r\n\t<li>Boot to TBWinPE\/RE.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Open a Command Prompt. <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Determine the appropriate interface name used by running one of the following commands:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>netsh interface ip show addresses<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>netsh interface ip show interfaces<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>ipconfig<\/strong><\/span><br \/>\r\n<br \/>\r\nCommon interface names include <em>Local Area Connection<\/em>, <em>Ethernet<\/em>, and <em>Ethernet0<\/em>. <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Run the following command to set a static address. This example uses <em>Ethernet0<\/em> for the interface name, an address of <em>192.168.0.252<\/em>, subnet mask of <em>255.255.255.0<\/em>, and a gateway of <em>192.168.0.1<\/em>. (Command should all be on one line.)<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>netsh interface ip set address \"Ethernet0\" static 192.168.0.252 255.255.255.0 192.168.0.1<\/strong><\/span><br \/>\r\n<br \/>\r\nHelp and examples are available by running:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>netsh interface ip set address \/?<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If necessary, DNS addresses can also be added. (Commands should each be on one line line.)<br \/>\r\n<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>netsh interface ip add dnsservers \"Ethernet0\" 192.168.0.25 index=1<br \/>\r\n<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>netsh interface ip add dnsservers \"Ethernet0\" 192.168.0.26 index=2<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>The address change should take affect within a few seconds.<\/li>\r\n<\/ol>\r\n<p>&nbsp;<\/p>\r\n<p><strong>Set static IP during initialization<\/strong><\/p>\r\n<p>If you would like the commands to run automatically as part of the TBWinPE\/RE initialization you can add them to InitScript.cmd when creating the build.<\/p>\r\n<ol>\r\n\t<li>Determine the appropriate interface name (see steps 1 through 3 in the above manual instructions).<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Run TBWinPE\/RE Builder.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Go into Settings and click the <strong>Scripts<\/strong> tab.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Check the <strong>Include InitScript.cmd<\/strong> option and then click the <strong>Edit<\/strong> link. The script will open in Notepad.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Add the commands to the end of the file (these will be the commands you would run in steps 4 and 5 in the above manual instructions). Save the file and exit Notepad when finished.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Back in TBWinPE\/RE Builder Settings, click the <strong>TBLauncher<\/strong> tab.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Make sure the <strong>Run network initialization<\/strong> option is checked.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Make sure the <strong>Run initialization programs in background <\/strong>option is unchecked (this is necessary so that network initialization can complete prior to InitScript.cmd being run).<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Click <strong>OK<\/strong> to close Settings.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Continue creating the TBWinPE\/RE build.<\/li>\r\n<\/ol>\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>This article provides instructions on specifying a static IP address in TBWinPE\/RE. This is useful when connecting to a network without a DHCP server or other cases when a specific address is required. The process can be done manually after booting or it can be configured to run automatically as part of initialization. Manually set [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"lsvr_kba_cat":[1796],"lsvr_kba_tag":[2121],"class_list":["post-627","lsvr_kba","type-lsvr_kba","status-publish","hentry","lsvr_kba_cat-general-information-image-for-windows","lsvr_kba_tag-image-for-windows"],"_links":{"self":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/comments?post=627"}],"version-history":[{"count":1,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/627\/revisions"}],"predecessor-version":[{"id":6355,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/627\/revisions\/6355"}],"wp:attachment":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/media?parent=627"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_cat?post=627"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_tag?post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}