<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[binaryquest - Medium]]></title>
        <description><![CDATA[our development/programming experiences (www.binaryquest.com) - Medium]]></description>
        <link>https://medium.com/binaryquest?source=rss----c202c4ed4c9f---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>binaryquest - Medium</title>
            <link>https://medium.com/binaryquest?source=rss----c202c4ed4c9f---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 02:09:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/binaryquest" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Migrate From Windows DHCP to Linux DHCP Server with ease]]></title>
            <link>https://medium.com/binaryquest/migrate-from-windows-dhcp-to-linux-dhcp-server-with-ease-aab9334b8118?source=rss----c202c4ed4c9f---4</link>
            <guid isPermaLink="false">https://medium.com/p/aab9334b8118</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[dhcp-server]]></category>
            <category><![CDATA[powershell-script]]></category>
            <dc:creator><![CDATA[Sazzad Hossain]]></dc:creator>
            <pubDate>Fri, 06 Sep 2024 18:17:12 GMT</pubDate>
            <atom:updated>2024-09-06T18:14:12.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="network mesh" src="https://cdn-images-1.medium.com/max/1024/0*TAPm6SG2_JcE05Z8" /><figcaption>Photo by <a href="https://unsplash.com/@alinnnaaaa?utm_source=medium&amp;utm_medium=referral">Alina Grubnyak</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Recently at work, we decided to move away from the Windows Server that we had been running for years to a Linux-based system mainly Ubuntu. We had two old active directory sites that also hosted the DHCP service. It had 10+ subnets, hundreds of active leases and many reservations.</p><p>Planning to migrate it to the new server turned out to be a challenge in avoiding potential IP conflicts and copy-paste mistakes.</p><p>So playing with PowerShell we figured we could potentially extract the config for the Windows server and prepare a config file suitable for dhcpd in Linux.</p><p>I just wanted to share the script we prepared and used. I hope it might come in handy for someone else looking into the same.</p><p>There are two scripts to run. The first one is to create the dhcpd.conf file with all the zone options and reservations. The second will be for active leases.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/091f56fa95800e84241052d01c40c72e/href">https://medium.com/media/091f56fa95800e84241052d01c40c72e/href</a></iframe><p>Then run this script to create an active leases list.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92fadc2b7af27a549f9e43e365509f57/href">https://medium.com/media/92fadc2b7af27a549f9e43e365509f57/href</a></iframe><p>These scripts will produce similar following outputs:</p><pre>subnet 10.2.0.0 netmask 255.255.255.0 {<br>    range 10.2.0.50 10.2.0.250;<br>    default-lease-time 432000;<br>    max-lease-time 432000;<br>    option domain-name-servers 172.16.0.2, 172.16.0.3;<br>    option routers 10.2.0.1;<br>    option domain-name mydomain.com;<br>    host POS.mydomain.com {<br>        hardware ethernet e0-d5-5e-53-55-84;<br>        fixed-address 10.2.0.250;<br>    }<br>}<br>subnet 10.3.0.0 netmask 255.255.255.0 {<br>    range 10.3.0.50 10.3.0.250;<br>    default-lease-time 432000;<br>    max-lease-time 432000;<br>    option routers 10.3.0.1;<br>    option domain-name mydomain.com;<br>    option domain-name-servers 172.16.0.2, 172.16.0.3;<br>}<br>...</pre><pre>lease 10.2.0.50 {<br>  starts  2024/01/01 00:00:00;<br>  ends Sunday 2024/09/08 13:12:48;<br>  cltt  2024/01/01 00:00:00;<br>  binding state active;<br>  next binding state free;<br>  hardware ethernet 0c-38-3e-39-3f-f9;<br>  uid &quot;0c-38-3e-39-3f-f9&quot;;<br>  client-hostname &quot;&quot;;<br>}<br>lease 10.2.0.51 {<br>  starts  2024/01/01 00:00:00;<br>  ends Monday 2024/09/09 10:31:04;<br>  cltt  2024/01/01 00:00:00;<br>  binding state active;<br>  next binding state free;<br>  hardware ethernet f8-d0-27-1d-06-d2;<br>  uid &quot;f8-d0-27-1d-06-d2&quot;;<br>  client-hostname &quot;EPSON1D06D2.mydomain.com&quot;;<br>}<br>...</pre><p>You can now copy and paste the contents to your Linux server for easy migration. On a side note, Webmin GUI makes it very easy to manage the DHCP scopes and leases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aab9334b8118" width="1" height="1" alt=""><hr><p><a href="https://medium.com/binaryquest/migrate-from-windows-dhcp-to-linux-dhcp-server-with-ease-aab9334b8118">Migrate From Windows DHCP to Linux DHCP Server with ease</a> was originally published in <a href="https://medium.com/binaryquest">binaryquest</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>