<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Ask Premier Field Engineering</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/askpfe/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/askpfe/feed.xml</link>
    <description>An ounce of prevention...</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:56:10 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How DNS Scavenging and the DHCP Lease Duration Relate</title>
      <link>https://docs.microsoft.com/archive/blogs/askpfe/how-dns-scavenging-and-the-dhcp-lease-duration-relate</link>
      <pubDate>Fri, 03 Jun 2011 10:17:00 GMT</pubDate>
      <dc:creator><![CDATA[Sean Ivey [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/askpfe/2011/06/03/how-dns-scavenging-and-the-dhcp-lease-duration-relate/</guid>
      <description><![CDATA[Hello everyone, Sean Ivey here from the US PFE &ndash; Carolinas team.&nbsp; I&rsquo;m what we...]]></description>
      <content:encoded><![CDATA[<div>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Hello everyone, Sean Ivey here from the US PFE &ndash; Carolinas team.&nbsp; I&rsquo;m what we refer to as a platforms-AD PFE.&nbsp; Basically I focus on Active Directory and related networking technologies.&nbsp; Recently, and on three separate occasions, I worked with SCCM administrators having issues deploying the SCCM client.&nbsp; Specifically, they were seeing the error &ldquo;Failed to get token for current process (5)&rdquo; in ccm.log.&nbsp; We discovered the problem was related to DNS and DHCP rather than SCCM.&nbsp; As a matter of fact, other services were suffering from the same issue but either didn&rsquo;t experience symptoms or showed slightly different symptoms.&nbsp; Let&rsquo;s talk about the problem and discuss how it can be PREVENTED!</span></span></p>
</div>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">The Scenario</span></span></span></h2>
<p><span style="font-family: Calibri;"><span style="font-size: small;">Consider the following simplified scenario.</span></span></p>
<h3><span style="color: #4f81bd;"><span style="font-family: Cambria;"><span style="font-size: small;">DHCP</span></span></span></h3>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">A DHCP scope has its lease duration set to the default 8 days.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The DHCP scope is low on available IP addresses.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Client-A has NOT renewed its IP address lease in 8 days, so it has expired.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Client-B is requesting a new IP address.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The DHCP server assigns Client-B the address that was leased to Client-A.</span></span></li>
</ul>
<p><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">So far so good.&nbsp; This is a very typical scenario and everything works as we would expect.&nbsp; Now let&rsquo;s add DNS into this story.</span></span></p>
<h3><span style="color: #4f81bd;"><span style="font-family: Cambria;"><span style="font-size: small;">DNS</span></span></span></h3>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">An Active Directory integrated DNS zone is set to scavenge stale resource records.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The defaults are used; &ldquo;No Refresh = 7 days&rdquo; and &ldquo;Refresh = 7 days&rdquo;.</span></span>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The server defaults are used as well; &ldquo;Scavenging Period = 7 days&rdquo;.</span></span></li>
</ul>
</li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Client-A renewed its DNS record 8 days ago (the last time its DHCP lease was updated as well).</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Client-A is the owner of its DNS record so it cannot be deleted by the DHCP server (by default).</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Client-B registers its DNS record with the new IP address it received from the DHCP server.</span></span>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">This IP address is the same one that is registered to Client-A!</span></span></li>
</ul>
</li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The DNS server will not be able to scavenge Client-A&rsquo;s DNS record for another 6 days!</span></span></li>
</ul>
<p><span style="font-family: Calibri;">(NOTE: if you&rsquo;re unsure what all of this &ldquo;scavenging&rdquo;, &ldquo;refresh/no refresh&rdquo; stuff is check out </span><a href="https://blogs.technet.com/b/networking/archive/2008/03/19/don-t-be-afraid-of-dns-scavenging-just-be-patient.aspx?PageIndex=3"><span style="font-family: Calibri; color: #0000ff;">Josh Jones&rsquo; blog</span></a><span style="font-family: Calibri;">, it&rsquo;s great!)<br /><br /><span style="font-size: small;">Uh-oh, not so good.&nbsp; This happens more than you&rsquo;d think.&nbsp; Now Client-A and Client-B have the same IP address registered in DNS!</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">&nbsp;</span></span></strong>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/5873.Figure1%20-%20DuplicateDNS.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/5873.Figure1-_2D00_-DuplicateDNS.jpg"><img width="447" height="262" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/5873.Figure1%20-%20DuplicateDNS.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/5873.Figure1-_2D00_-DuplicateDNS.jpg" border="0" /></a></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 1</span></span></strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Ugh, now we&rsquo;ve got two different names associated with the same IP address in DNS.&nbsp; And it will likely stay this way for at least 6 days using the defaults for DNS scavenging outlined above.&nbsp; What kind of problems can we expect to see?&nbsp; Let&rsquo;s take a look.</span></span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">The Problem</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">I mentioned this issue manifesting itself as a problem installing the SCCM client, but in reality we can demonstrate this with a much simpler example; accessing a shared folder.&nbsp; Ultimately the problem is the same.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">So now let&rsquo;s say I need access to a share on Client-A.&nbsp; Let&rsquo;s use the administrative share as an example.&nbsp; Maybe a deployment requires this share to be accessible.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/8814.Figure2%20-%20ShareFailure.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/8814.Figure2-_2D00_-ShareFailure.jpg"><img width="377" height="114" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/8814.Figure2%20-%20ShareFailure.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/8814.Figure2-_2D00_-ShareFailure.jpg" border="0" /></a></span></span></strong></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 2</span></span></strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Well that&rsquo;s interesting.&nbsp; First, Client-A isn&rsquo;t even turned on&hellip;but we get a response.&nbsp; And of all things it&rsquo;s a logon failure!&nbsp; Some of you may already realize this is what happens when we send a Kerberos ticket intended for one computer to another computer, but let&rsquo;s quickly walk through this process.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">We see that our computer (Infra-App1) does a DNS query for <b>client-a.corp.contoso.com</b>.&nbsp; It then gets a response back saying the IP address is 10.0.0.100.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/3404.Figure3%20-%20DNSQuery.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/3404.Figure3-_2D00_-DNSQuery.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/3404.Figure3%20-%20DNSQuery.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/3404.Figure3-_2D00_-DNSQuery.jpg" border="0" /></a></span></span></strong></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 3</span></span></strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">As far as DNS is concerned, this is true.&nbsp; Client-A does have 10.0.0.100 listed as its IP address, but so does Client-B.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Great, so now let&rsquo;s go get a Kerberos ticket.&nbsp; Our DNS query was for Client-A, so our TGS request will be for Client-A as well.&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/8306.Figure4%20-%20GetKerbTicket.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/8306.Figure4-_2D00_-GetKerbTicket.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/8306.Figure4%20-%20GetKerbTicket.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/8306.Figure4-_2D00_-GetKerbTicket.jpg" border="0" /></a></span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 4</span></span></strong></p>
<p><strong><span style="font-family: Calibri; color: #4f81bd;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/6661.Figure5%20-%20GetKerbTicket2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/6661.Figure5-_2D00_-GetKerbTicket2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/6661.Figure5%20-%20GetKerbTicket2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/6661.Figure5-_2D00_-GetKerbTicket2.jpg" border="0" /></a></span></strong></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 5</span></span></strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">We can see the request in Figure 4, and the domain controller&rsquo;s response in Figure 5.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Now that we have our ticket, we try to connect to what we think is Client-A.&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/0257.Figure6%20-%20PostKerbTicket.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/0257.Figure6-_2D00_-PostKerbTicket.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/0257.Figure6%20-%20PostKerbTicket.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/0257.Figure6-_2D00_-PostKerbTicket.jpg" border="0" /></a></span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 6</span></span></strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">We see the Kerberos ticket is being presented in this frame.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">And finally, we get an error returned from Client-A.&nbsp; Why?&nbsp; Because Client-A isn&rsquo;t Client-A, it&rsquo;s Client-B!</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/3324.Figure7%20-%20KerbFailure.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/3324.Figure7-_2D00_-KerbFailure.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/3324.Figure7%20-%20KerbFailure.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/3324.Figure7-_2D00_-KerbFailure.jpg" border="0" /></a></span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 7</span></span></strong></p>
<p><span style="font-family: Calibri;"><span style="font-size: small;">All of this just reiterates what you might have guessed.&nbsp; For Kerberos to work you have to present the right ticket to the right account.<br /></span>(NOTE: for more information on Kerberos, go read </span><a href="https://blogs.technet.com/b/askds/archive/2008/03/06/kerberos-for-the-busy-admin.aspx"><span style="font-family: Calibri; color: #0000ff;">Rob Greene&rsquo;s blog</span></a><span style="font-family: Calibri;">, &ldquo;Kerberos for the Busy Admin&rdquo;)</span></p>
<p><span style="font-family: Calibri; font-size: small;">Realize this works just fine if the IP address is used instead of the FQDN.&nbsp; Why?&nbsp; Because NTLM authentication will be used instead of Kerberos authentication.&nbsp; With the IP address, we make no assumption about which client we&rsquo;re connecting to (which is why we have to negotiate NTLM in the first place).&nbsp; We&rsquo;re simply connecting to an IP address.&nbsp; Some of you might be thinking that it should work when using the FQDN as well.&nbsp; After all, if Kerberos fails we try NTLM right?&nbsp; Not quite, I won&rsquo;t go into the details here, but it&rsquo;s only if we fail to <b>negotiate</b> Kerberos that we will fall back to NTLM.&nbsp; You can read more about it </span><a href="https://technet.microsoft.com/en-us/library/cc780455(WS.10).aspx"><span style="font-family: Calibri; color: #0000ff; font-size: small;">here</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.&nbsp; Either way, in our scenario Kerberos didn&rsquo;t fail.&nbsp; It returned a valid response.</span></span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Prevention</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">So now that we understand that this issue is related to stale DNS records, let&rsquo;s discuss how we can prevent the problem from happening in the first place.&nbsp; There are a few different approaches, so let&rsquo;s talk about each.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">NOTE: For each of these I recommend lowering the scavenging interval to 1-3 days.&nbsp; The 7 day default will prolong the period invalid records remain in DNS. </span></span></p>
<ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Increase the DHCP lease duration to match the &ldquo;no-refresh + refresh&rdquo; interval.&nbsp; In our example we would increase the DHCP lease to 14 days.</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Pros:</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">DHCP leases will remain until the DNS record is scavenged which means no other client will receive the address and register it in DNS</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">It&rsquo;s easy.</span></span></li>
</ol></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Cons:</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">If the DHCP scope is already low on addresses, you&rsquo;ll likely run out</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">A small percentage of records may not be scavenged before the lease expires because of small time differences.&nbsp; Setting the scavenging interval to 1 day will ensure the defunct records are removed the next day.</span></span></li>
</ol></li>
</ol></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Decrease the &ldquo;no-refresh + refresh&rdquo; interval to match the DHCP lease.&nbsp; In our example we would decrease both &ldquo;no-refresh&rdquo; and &ldquo;refresh&rdquo; to 4 days.</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Pros:</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">The existing DNS record will be scavenged sooner affectively achieving the same results as in the first solution</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">It&rsquo;s easy.</span></span></li>
</ol></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Cons:</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">Active Directory replication will increase (if these are AD integrated DNS zones).&nbsp; This is because the DNS records will be refreshed by the clients more often (every 4 days instead of every 7)</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">A small percentage of records may not be scavenged before the lease expires because of small time differences.&nbsp; Setting the scavenging interval to 1 day will ensure the defunct records are removed the next day</span></span></li>
</ol></li>
</ol></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">Allow the server DHCP to register the addresses on behalf of the clients.</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Pros:</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">The DHCP server will be able to remove the DNS record as soon as the lease expires</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">If setup correctly no duplicate records should exist.</span></span></li>
</ol></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">Cons:</span></span><ol>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">The setup is more involved.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span><span style="font-size: small;"><span style="font-family: Calibri;">A service account will need to be setup to run the DHCP service, or all the DHCP servers will need to be joined to the DNSUpdateProxy group (less secure)&nbsp;adding complexity.</span></span></li>
</ol></li>
</ol></li>
</ol>
<p><span style="font-family: Calibri; font-size: small;">For steps on doing this, read this </span><a href="https://support.microsoft.com/kb/816592"><span style="font-family: Calibri; color: #0000ff; font-size: small;">KB article</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> (around the <b>Use the DnsUpdateProxy security group</b> section).<br /></span></span><br /><span style="font-size: small;"><span style="font-family: Calibri;">Experiment with the DHCP lease duration, and &ldquo;no-refresh/refresh&rdquo; intervals.&nbsp; You may find a need to depart completely from the defaults.&nbsp; Low DHCP lease durations (in the hours) are sometimes used for wireless subnets.&nbsp; Be mindful of the performance of your servers though, especially if you have a DNS server set to scavenge every few hours on very large DNS zones. </span></span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Identifying Records with Duplicate IPs</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Almost there!&nbsp; Now, we understand the problem, when the problem happens, and how to prevent it.&nbsp; But how can we easily identify these duplicate records?&nbsp; You could search through DNS easily enough, but why not use PowerShell?</span></span><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<hr width="800" style="width: 800px;" />
<p><span style="color: #339966;">#Import the Active Directory Module</span><br /><span style="color: #000000; font-size: small;">import-module activedirectory</span></p>
<p><span style="color: #008000; font-size: small;">#Define an empty array to store computers with duplicate IP address registrations in DNS</span><br /><span style="font-size: small;">$duplicate_comp = @()</span></p>
<p><span style="color: #008000; font-size: small;">#Get all computers in the current Active Directory domain along with the IPv4 address</span><br /><span style="color: #008000; font-size: small;">#The IPv4 address is not a property on the computer account so a DNS lookup is performed</span><br /><span style="color: #008000; font-size: small;">#The list of computers is sorted based on IPv4 address and assigned to the variable $comp</span><br /><span style="font-size: small;">$comp = get-adcomputer -filter * -properties ipv4address | sort-object -property ipv4address</span></p>
<p><span style="color: #008000; font-size: small;">#For each computer object returned, assign just a sorted list of all </span><br /><span style="color: #008000; font-size: small;">#of the IPv4 addresses for each computer to $sorted_ipv4</span><br /><span style="font-size: small;">$sorted_ipv4 = $comp | foreach {$_.ipv4address} | sort-object</span></p>
<p><span style="color: #008000; font-size: small;">#For each computer object returned, assign just a sorted, unique list </span><br /><span style="color: #008000; font-size: small;">#of all of the IPv4 addresses for each computer to $unique_ipv4</span><br /><span style="font-size: small;">$unique_ipv4 = $comp | foreach {$_.ipv4address} | sort-object | get-unique</span></p>
<p><span style="color: #008000; font-size: small;">#compare $unique_ipv4 to $sorted_ipv4 and assign just the additional </span><br /><span style="color: #008000; font-size: small;">#IPv4 addresses in $sorted_ipv4 to $duplicate_ipv4</span><br /><span style="font-size: small;">$duplicate_ipv4 = Compare-object -referenceobject $unique_ipv4 -differenceobject $sorted_ipv4 | foreach {$_.inputobject}</span></p>
<p><span style="color: #008000; font-size: small;">#For each instance in $duplicate_ipv4 and for each instance </span><br /><span style="color: #008000; font-size: small;">#in $comp, compare $duplicate_ipv4 to $comp If they are equal, assign</span><br /><span style="font-size: small;"><span style="color: #008000;">#the computer object to array $duplicate_comp<br /></span>foreach ($duplicate_inst in $duplicate_ipv4)<br /></span><span style="font-size: small;">{<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp; foreach ($comp_inst in $comp)<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp; {<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!($duplicate_inst.compareto($comp_inst.ipv4address)))<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $duplicate_comp = $duplicate_comp + $comp_inst<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /></span><span style="font-size: small;">&nbsp;&nbsp;&nbsp; }<br /></span><span style="font-size: small;">}</span></p>
<p><span style="color: #008000; font-size: small;">#Pipe all of the duplicate computers to a formatted table</span><br /><span style="font-size: small;">$duplicate_comp | ft name,ipv4address -a</span></p>
<hr width="800" style="width: 800px;" />
<p><span style="font-size: small;"></span><span style="font-size: small;"><span style="font-family: Calibri;">Here&rsquo;s a sample of the output:</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/2703.Figure8%20-%20PowerShell.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/2703.Figure8-_2D00_-PowerShell.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/00/2703.Figure8%20-%20PowerShell.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-00/2703.Figure8-_2D00_-PowerShell.jpg" border="0" /></a></span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><strong><span style="color: #4f81bd;"><span style="font-family: Calibri;">Figure 8</span></span></strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">This is a pretty straightforward PowerShell script.&nbsp; Consider it a sample.&nbsp; This will only return duplicate IP addresses registered to actual computer accounts in Active Directory.&nbsp; Keep in mind it will query&nbsp;every computer in an Active Directory domain and then it will do a DNS query to get the IP address.&nbsp; If you have many computers, use the -searchbase switch with get-adcomputer to limit the number of computers returned each time.&nbsp; If the computer is not joined to AD it will never be returned from get-adcomputer.&nbsp; This is really aimed at finding records in DNS that contain duplicate IP addresses because of the scenario listed above.</span></span></p>
<h2><span style="font-size: medium;"><span style="color: #4f81bd;"><span style="font-family: Cambria;">Summary</span></span></span></h2>
<p><span style="font-size: small;"><span style="font-family: Calibri;">There are a number of articles and blogs that discuss this issue in some shape or form.&nbsp; My goal was to tie all of these separate pieces together to make the big picture a little clearer.&nbsp; To recap:</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The Scenario</span></span>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Default &ldquo;no-refresh/refresh&rdquo; interval coupled with the default DHCP lease = stale DNS records.</span></span></li>
</ul>
</li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The Symptoms</span></span>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">SCCM &ldquo;Failed to get token for current process (5)&rdquo;</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">File Shares &ldquo;Logon Failure: The target account name is incorrect&rdquo;</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Many, many others (potentially anything using Kerberos)</span></span></li>
</ul>
</li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The Problem</span></span>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Kerberos authentication requires the ticket be specific to a computer.&nbsp; Stale DNS records mean we could be sending the Kerberos ticket to the wrong computer.</span></span></li>
</ul>
</li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">The Fix</span></span>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">A combination of changing the &ldquo;no-refresh/refresh&rdquo; intervals and the DHCP lease period.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Configuring DHCP to register records for the clients.</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Identifying and removing duplicate records (either waiting for scavenging or using the provided script).</span></span></li>
</ul>
</li>
</ul>
<p><br /><span style="font-size: small;"><span style="font-family: Calibri;">I hope you find this information useful!&nbsp; Tuning these DHCP and DNS settings will leave your environment in a much healthier state!</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">-Sean Ivey</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Welcome to AskPFE!</title>
      <link>https://docs.microsoft.com/archive/blogs/askpfe/welcome-to-askpfe</link>
      <pubDate>Fri, 27 May 2011 06:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Sean Ivey [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/askpfe/2011/05/27/welcome-to-askpfe/</guid>
      <description><![CDATA[Hey everyone, and welcome to the AskPFE blog!&nbsp; We are a group of Microsoft Premier Field...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: 'Arial', 'sans-serif'; color: black; font-size: 9pt;">Hey everyone, and welcome to the AskPFE blog!&nbsp; We are a group of Microsoft Premier Field Engineers (PFEs) that directly service Microsoft Premier customers.&nbsp; We work with just about every technology Microsoft has to offer...although I'm not aware of any Xbox PFEs.&nbsp; That's a severe oversight!</span></p>
<p><span style="font-family: 'Arial', 'sans-serif'; color: black; font-size: 9pt;">Why are we blogging you ask? &nbsp;We fill a special niche in Microsoft Premier Support between "architecture and design" and "help it's on fire!"&nbsp;&nbsp;Think of us as the prevention specialists.&nbsp; We primarily conduct health checks and risk assessments as well as proactive workshops.&nbsp; We definitely do our share of troubleshooting and problem resolution, but that only comprises 20 to 30% of our time.&nbsp; This blog is aimed at sharing best practices and thoughts around configurations that reduce the chance of future issues.&nbsp; Because we have PFEs that focus on all sorts of different technologies, expect to see articles concerning Windows, Active Directory, Exchange, SQL, SharePoint, etc.</span></p>
<p><span style="font-family: 'Arial', 'sans-serif'; color: black; font-size: 9pt;">We want to hear from you!&nbsp; Give us your feedback,&nbsp;or send us your questions and we'll do our best to answer them directly or include them in a future blog post.&nbsp; Our goal is to help everyone that uses our products, whether you're a direct customer, a new administrator, or someone just interested in learning more.&nbsp; Although we'll be focusing on many different technologies, our theme for most of the posts will be prevention.&nbsp; We'll likely have a few focused on problem resolution as well.&nbsp; Stay tuned, our first few&nbsp;blogs will be posted shortly!</span></p>
<p><span style="font-family: 'Arial', 'sans-serif'; color: black; font-size: 9pt;">-PFE</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>