<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brad&#039;s Tech Blog &#187; export</title>
	<atom:link href="http://bradstechblog.com/tag/export/feed" rel="self" type="application/rss+xml" />
	<link>http://bradstechblog.com</link>
	<description>Microsoft technologies like: System Center Operations Manager, and whatever else comes up at the office.</description>
	<lastBuildDate>Sat, 13 Feb 2010 01:59:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Microsoft DHCP: How to Export and import scopes between DHCP servers</title>
		<link>http://bradstechblog.com/netsh/export-and-inport-dhcp-scopes</link>
		<comments>http://bradstechblog.com/netsh/export-and-inport-dhcp-scopes#comments</comments>
		<pubDate>Thu, 31 Jul 2008 16:02:50 +0000</pubDate>
		<dc:creator>Brad Hearn</dc:creator>
				<category><![CDATA[DHCP]]></category>
		<category><![CDATA[netsh]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scopes]]></category>
		<category><![CDATA[Spilt Scopes]]></category>

		<guid isPermaLink="false">http://bradstechblog.com/?p=69</guid>
		<description><![CDATA[We are going to use Microsoft&#8217;s Netsh command to export and import DHCP scopes from one server and then import them to another.  We run a split scope on two servers for redundancy. So scope one serves the range 172.0.0.64 to 172.0.0.159 and the second server handles 172.0.0.160 to 172.0.0.255. While I was performing maintenance I [...]]]></description>
			<content:encoded><![CDATA[<p>We are going to use Microsoft&#8217;s Netsh command to export and import DHCP scopes from one server and then import them to another.  We run a split scope on two servers for redundancy. So scope one serves the range 172.0.0.64 to 172.0.0.159 and the second server handles 172.0.0.160 to 172.0.0.255. While I was performing maintenance I noticed that in some cases someone missed the creation of the second half of the scope. So to fix this I am going to run a script that will export the scopes. Then I will run another script to import them on the second server. Make sure after wards to modify the exclusion on the second server to be opposite so that they are not both serving the same half.</p>
<p><!-smartads-><br />
 <span id="more-69"></span></p>
<blockquote><p>note: the import and export command cannot be ran remotely</p>
<p>Replace 198.168.0.10  with your DHCP server IP address</p>
<p>Replace 198.168.1.0 198.168.2.0 198.168.3.0 with the IP scopes that you are exporting and importing.</p>
<p>Export the scopes for the DHCP server 1</p></blockquote>
<p><strong><em>Step 1</em></strong></p>
<ol>
<li>Log on to the server that you are exporting from.</li>
<li>open the command prompt</li>
<li>Run the following command from the command prompt on the DHCP server that have the scopes already created.</li>
</ol>
<blockquote><p>Netsh DHCP server 198.168.0.10 export c:\scope 198.168.1.0 198.168.2.0 198.168.3.0</p></blockquote>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/07/image-0318.png"><img class="aligncenter size-full wp-image-70" title="image-0318" src="http://bradstechblog.com/wp-content/uploads/2008/07/image-0318.png" alt="" width="500" height="109" /></a><a href="http://bradstechblog.com/wp-content/uploads/2008/07/image-0318.png"></a></p>
<p> </p>
<p><strong>Step 2</strong></p>
<p>Import the scopes to DHCP server 2  </p>
<ol>
<li>Copy the scope file to the second DHCP server. </li>
<li>Log on locally to the second DHCP server, open the command prompts and run the following command to import the scopes</li>
</ol>
<blockquote><p>Netsh DHCP server 198.168.0.10 import c:\scope 198.168.1.0 198.168.2.0 198.168.3.0</p></blockquote>
<p>Step 3</p>
<ol>
<li>Confirm that the scopes are now on the second server.</li>
<li>Modify the Exclusions if you have any. If this is a split scope then the exclusions should be opposite of each other on the two servers.</li>
</ol>
<p> </p>
<p>Good luck.<br />
<!-smartads-><br />
 </p>
<p> The following is from Technet <a href="http://technet2.microsoft.com/windowsserver/en/library/61427fbd-de1f-4c8a-b613-321f7a3cca6a1033.mspx?mfr=true">http://technet2.microsoft.com/windowsserver/en/library/61427fbd-de1f-4c8a-b613-321f7a3cca6a1033.mspx?mfr=true</a></p>
<blockquote>
<h4>import</h4>
<div class="intro">
<p>Imports a DHCP service configuration from a file to the local service.</p></div>
<h5>Syntax</h5>
<div class="intro">
<p><strong>import</strong> [<em>Path</em>]<em>FileName</em> {<strong>all</strong> | <em>ScopeList</em>]</div>
<h5>Parameters</h5>
<div class="intro">
<div class="definitionList">
<div class="definitionListItem">
<div class="term">[<em>Path</em>] <em>FileName</em></div>
<div class="definition">Required. Specifies, by name, the file from which the DHCP configuration will be imported. If the path, the file name, or both contain spaces, quotation marks must be used.</div>
</div>
<div class="definitionListItem">
<div class="term">{<strong>all </strong>| <em>ScopeList</em>}</div>
<div class="definition">Required. Specifies which scopes you want to import. The parameter <strong>all</strong> imports all scopes represented in the file you specify. The parameter <em>ScopeList</em> imports the scopes that correspond to the IP addresses you list. Each IP address in the list must be separated by spaces.</div>
</div>
</div>
</div>
<h5>Remarks</h5>
<div class="intro">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="listBullet" valign="top">•</td>
<td class="listItem">This command works only on the local server.</td>
</tr>
<tr>
<td class="listBullet" valign="top">•</td>
<td class="listItem">While the <strong>import</strong> command runs, the DHCP service is stopped and does not respond to DHCP clients seeking new leases or lease renewals.</td>
</tr>
<tr>
<td class="listBullet" valign="top">•</td>
<td class="listItem">If the DHCP service has a large number of scopes or a large number of client address leases, this command can take a long time to run.</td>
</tr>
</tbody>
</table>
</div>
<h5>Examples</h5>
<div class="intro">
<p>In the first example, this command imports the complete DHCP service configuration from the file c:\Temp\Dhcpdb.</p>
<p>In the second example, this command imports the DHCP configuration for scopes 10.0.0.0 and 192.168.0.0 from the file c:\Temp\Dhcpdb</p>
<p>In the third example, this command imports the complete DHCP service configuration from the file c:\My Folder\Dhcp Configuration. Note that both the path and file name contain spaces, so quotation marks are used.</p>
<p><strong>import c:\Temp\Dhcpdb all</strong></p>
<p><strong>import c:\Temp\Dhcpdb 10.0.0.0 192.168.0.0</strong></div>
<p><strong>import &#8220;c:\My Folder\Dhcp Configuration&#8221; all</strong></p></blockquote>
<p><!--martad--></p>
<p><a href="http://bradstechblog.com"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://bradstechblog.com/netsh/export-and-inport-dhcp-scopes/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
