Migrate linux dhcp to active directory
I need to migrate/convert a dhcp server from linux to active directory. It's currently running fine on a sles9 box.
There are 136 subnets defined and about 1200 fixed-address reservations. It would be nice if the existing dhcpd.conf could be scripted...
Solution 1:
What version of Windows server are you running? Server 2012 has the ability to run in a failover cluster relationship. I have attached a blog post about it below. Unfortunately it is talking about migrating from an existing Windows DHCP environment. But it may have some useful info for you.
As for the importing the dhcpd.conf
if you grep out your different subnets using something like cat /etc/dhcpd.conf | grep subnet
you can create a list of your subnets and then script putting them in using something like:
netsh dhcp server add scope <ScopeAddress> <SubnetMask> <ScopeName> [ScopeComment]
Then for your reservations you could do something like cat /etc/dhcpd.conf | grep host
this will get you a list of hosts then you will need to figure out some way to break them out by subnet and use the command:
netsh dhcp server scope 192.168.1.0 add reservedip <ReservedIP> <MAC_Address> [ClientName] [ClientComment] [ClientType(DHCP | BOOTP | BOTH)]"
to add the reservations to the database. If you want more information about netsh
look here.
Nick
Migrating existing DHCP Server deployment to Windows Server 2012 DHCP Failover