none
Merging 2 dhcp servers into one RRS feed

  • Question

  • Hi guys.

    In current infrastructure there are three dhcp servers:

    DHCP1: an old OS (2003, SP1)

    DHCP2: an old OS (2003, SP2)

    DHCP3: 2008 R2 STD SP1

    They all have different ranges set.
    The idea is to merge DHCP1 and DHCP2 into DHCP3.

    Should we basically trigger BACKUP in DHCP console on DHCP1,DHCP2 and then trigger restore on DHCP3 one by one, or is there any extra step needed?

    With best regards


    bostjanc

    Friday, September 1, 2017 8:56 AM

Answers

  • Hi,

    >> Technically there are different address pools, but dhcp source bounce back that using same subnet for import twice is not possible.

     

    DHCP1 and DHCP2 has the same subnet:192.168.11.0. they belongs to the same network ID:192.168.11.0. so, you got this error prompt.

     

    Besides, we have tried different methods: Import-DhcpServer cmdlet, didn’t help.

    So, please manually making these DHCP clients renew their DHCP lease on the new DHCP server.

    The better way for this issue is using : ipconfig /renew command on all of them. You could do this via GPO. Creating a dedicated GPO for these affected DHCP clients.

    >> In those 5 minutes I would need to manually move reservations, add the address pool to source DHCP and unauthorize DHCP2?

    That’s a good choice for us currently. You could use : netsh dhcp server scope show reservedip to get these reserverdIP then manually create them in your source DHCP.

    Best Regards,
    Frank




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by B_C_R Wednesday, September 20, 2017 7:55 AM
    • Unmarked as answer by B_C_R Wednesday, September 20, 2017 9:26 AM
    • Marked as answer by B_C_R Thursday, September 21, 2017 7:08 AM
    Monday, September 18, 2017 5:48 AM
  • We made a rookie mistake. A person who prepared DHCP destination server did not put static ip on server. And even worse, destination DHCP was setup to get IP from source DHCP which was migrated. No wonder that nothing worked after we have degraded source DHCP. So we have setup static IP on destination DHCP and we will repeat manual migration once again.

    With best regards

    B


    bostjanc

    • Marked as answer by B_C_R Thursday, September 21, 2017 7:07 AM
    Thursday, September 21, 2017 7:07 AM
  • With the problematic dhcp import I have ended with:
    unathorizing it
    disabling dhcp server on it
    copied reservations from it to new server

    bostjanc

    • Marked as answer by B_C_R Thursday, September 21, 2017 7:08 AM
    Wednesday, September 20, 2017 7:55 AM

All replies

  • Thanks for the quick reply.

    I got three more questions.
    One question is regarding the 4th step:

    1. Export your DHCP db from your 2003 Server (netsh dhcp server export C:\Temp\Export_2003_Dhcp_db)
    2. Copy the C:\Temp\Export_2003_Dhcp_db on your 2012 Server
    3. Backup the current DHCP configuration from your 2012 Server (Export-DhcpServer -ComputerName dhcpsrv01.contoso.com -File C:\Temp\Export_2012_Dhcp.xml -leases)
    4. Delete all scopes from your Windows 2012 DHCP
    5. Import your Windows 2003 Dhcp db using netsh (netsh dhcp server import c:\temp\Export_2003_Dhcp_db)
    6. Import only the previous DHCP scopes that were on your 2012 DHCP server (Import-DhcpServer -ComputerName dhcpsrv01.contoso.com -File C:\Temp\Export_2012_Dhcp.xml -BackupPath C:\dhcpbackup\ -ScopeId 10.10.10.0,20.20.20.0 -Leases) where scopesID is the scopes that were present on your 2012 DHCP Server.

    1. is it necessary to delete all scopes on 2012 r2 DHCP, or could we just try to import settings from both 2003 dhcp servers into 2012 r2? I
    if they are in different scopes, there should not be any issues in theory, right?
    2. Could we achieve the same thing with using GUI? or we should stick with netsh option?
    3. How will clients know they must be redirected to "new dhcp 2012r2" ?

    with best regards


    bostjanc


    • Edited by B_C_R Friday, September 1, 2017 10:13 AM
    Friday, September 1, 2017 10:11 AM
  • As long as you don't have duplicate scopes on your DHCP1, DHCP2 and DHCP3, it should not cause any issue


    This posting is provided AS IS without warranty of any kind

    Friday, September 1, 2017 10:14 AM
  • Well unfortuantelly it's not working.
    First of all Export-DhcpServer option only works on 2012 servers, in my case the destination server is 2008 R2 STD.

    Second of all, I have tried with restoring both backup files and each times it overwrites everything so at the end I have restored back to 2008 r2 backup which I made before doing any imports.
    Basically importing 2003 dhcp backup to 2008 r2 dhcp server overwrites everything and it looses the content that 2008 r2 had.

    Any other ways to achieve this?


    bostjanc

    Friday, September 1, 2017 10:38 AM
  • Have you tried using netsh ?

    This posting is provided AS IS without warranty of any kind

    Friday, September 1, 2017 5:04 PM
  • I did it in the gui.

    Isn't it the same?


    bostjan - halcom d.d.

    Saturday, September 2, 2017 11:39 AM
  • anyone?

    with best regards


    bostjanc

    Wednesday, September 6, 2017 5:01 AM
  • Hi,

    Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.

    Best Regards,
    Frank



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, September 12, 2017 2:01 AM
  • To move a DHCP database and configuration from a server that is running Windows Server 2003 to another server that is running Windows Server 2008 R2

    1. Log on to the source DHCP server.
    2. Click Start, click Run, type cmd in the Open box, and then click OK.
    3. On the Action menu, click Backup.
    4. Type netsh dhcp server export C:\dhcp.txt all, and then press ENTER.
    5. Install the DHCP server service on the destination DHCP server. For more information about installing DHCP, see Installing the DHCP Server Role.
    6. Log on to the destination DHCP server.
    7. Copy the exported DHCP database file to the local hard disk of the destination DHCP server.
    8. Verify that the DHCP service is started on the destination DHCP server.
    9. Click Start, click Run, type cmd in the Open box, and then click OK.
    10. 10. Type netsh dhcp server import C:\dhcp.txt all, and then press ENTER
    11. Open DHCP.
    12. In the console tree, click DHCP.
    13. On the Action menu, click Authorize.

    https://technet.microsoft.com/en-us/library/dd759224(v=ws.11).aspx

    please ensure that the original DHCP scope has no conflict with the new DHCP scope on 2008r2.

    Best Regards,

    Frank


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Wednesday, September 13, 2017 2:55 AM
  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,
    Frank

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, September 15, 2017 2:02 AM
  • Hey Frank.

    Thanks for the reply.
    Haven't tested yet, because it's a production environment.

    The last time that I have tried with backup and restore thru GUI it has overwritten the current that destination DHCP already had.

    What about this approach: "netsh dhcp server import C:\dhcp.txt " in this case does it overwrittes (let's presume that all DHCP server has different scopes...) or adds this to destination DHCP server which already contains data?


    With best regards


    bostjanc

    Friday, September 15, 2017 5:40 AM
  • Hi there. Ignore my previous comment because I have an update:

    I have sucessfully imported settings from DHCP1 to our SOURCE DHCP.

    We are having problem with importing DHCP2 to our SOURCE DHCP.

    Running the command: netsh dhcp server import C:\temp\dhcp2.txt all
    Throws an error:

    Error while importing subnet 192.168.11.0 "LJ". This subnet already exists on the local server. An internal error occurred.

    Well DHCP1 contained subnet:
    192.168.11.0 (address pool: 192.168.11.100 - 192.168.11.159) and we have sucessfully imported DHCP1 to source DHCP.

    Now DHCP2 (the problematic one, which does not wants to be imported to source) also contains that subnet but it has different address pool which are 192.168.11.160 - 192.168.11.230 and we also have one IP excluded: 192.168.11.203

    How to convince DHCP source to take this data for import? Technically there are different address pools, but dhcp source bounce back that using same subnet for import twice is not possible.

    So I'm searching for workaround?

    But if I understand logic of DHCP I could also use manual approach for importing DHCP2 to source (please correct me if I'm wrong).

    I would somehow need to tell the dhcp clients on DHCP2 that their lease duration is from now on less then 5 minutes and force that settings immediatiely. In those 5 minutes I would first need to manually move reservations from DHCP2 to source, then add address pool to source DHCP and unauthorize DHCP2, correct?

    with best regards


    bostjanc


    • Edited by B_C_R Friday, September 15, 2017 6:34 AM
    Friday, September 15, 2017 6:30 AM
  • Hi,

    >> Technically there are different address pools, but dhcp source bounce back that using same subnet for import twice is not possible.

     

    DHCP1 and DHCP2 has the same subnet:192.168.11.0. they belongs to the same network ID:192.168.11.0. so, you got this error prompt.

     

    Besides, we have tried different methods: Import-DhcpServer cmdlet, didn’t help.

    So, please manually making these DHCP clients renew their DHCP lease on the new DHCP server.

    The better way for this issue is using : ipconfig /renew command on all of them. You could do this via GPO. Creating a dedicated GPO for these affected DHCP clients.

    >> In those 5 minutes I would need to manually move reservations, add the address pool to source DHCP and unauthorize DHCP2?

    That’s a good choice for us currently. You could use : netsh dhcp server scope show reservedip to get these reserverdIP then manually create them in your source DHCP.

    Best Regards,
    Frank




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by B_C_R Wednesday, September 20, 2017 7:55 AM
    • Unmarked as answer by B_C_R Wednesday, September 20, 2017 9:26 AM
    • Marked as answer by B_C_R Thursday, September 21, 2017 7:08 AM
    Monday, September 18, 2017 5:48 AM
  • Bostjan,

    Are your ip helper commands currently pointing at two DHCP servers for the 192.168.11.0 subnet, both old and new? Or just the old one? 


     
    Monday, September 18, 2017 3:01 PM
  • r_falconer, where can I find that option (IP HELPER COMMANDS) in dhcp console?

    bostjanc

    Wednesday, September 20, 2017 6:57 AM
  • With the problematic dhcp import I have ended with:
    unathorizing it
    disabling dhcp server on it
    copied reservations from it to new server

    bostjanc

    • Marked as answer by B_C_R Thursday, September 21, 2017 7:08 AM
    Wednesday, September 20, 2017 7:55 AM
  • Hi,

    Thanks for your support and sharing.


    Best Regards,

    Frank


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, September 20, 2017 8:29 AM
  • Frank, unfortunatelly I need to reopen this thread.

    The mission to migrate DHCP2(source) to DHCP3(destination) manually did not went well.
    A matter a fact: "hole hell rised".


    Let me explain the approach I have used.

    The 1st plan was:
    Migrate DHCP1, DHCP2 to DHCP3
    DHCP1 to DHCP3 with backup/restore approach did not work so we used import.
    DHCP2 with backup/restore approach or neither import did not work, because DHCP3 already contained subnet which was imported from DHCP2 to DHCP3.

    So we had to "manually" move DHCP2 to DHCP3.

    First of all I have made a list of all active connections and reservations on DHCP2.
    To avoid any IP CONFLICTs durring leasse time we have decided that we will make reservations on DHCP3 for active connections which were on DHCP2.
    Before doing anything we had made DHCP backup on DHCP2 and DHCP3.
    Before migration: DHCP2 (source) had scope: 192.168.10.160 - 192.168.10.230
    DHCP3 (destination) had scope: 192.168.10.100 - 192.168.100.159
    After the migration the idea is that DHCP3 has scope 192.168.10.100 - 192.168.10.230

    Ok, I have unauthorized DHCP2 and disabled the service.
    I have extended the scope on DHCP3.
    I have created all the reservations on DHCP3 (which were active leases on DHCP2)

    DHCP2 had lease time 1 hour. After 1 hour the clients started to loose ip addresses as DHCP3 did not gave them new ones.
    I would expect that client would automatically ask DHCP3 for getting IP adderss, because DHCP2 was not authoritive any more. I would even expect if that automatically does not happens, that triggering IPCONFIG /release /renew on problematic client would make it work, but that also did not gave those clients ip.
    The only option I had (panic mode) was to revert the things as they were.

    We did not delete the scope on DHCP2, so I just needed to reauthorize DHCP server role on DHCP2 and start the DHCP SERVER service.

    But on DHCP3 I could not make restore.
    The error message at the restore attempt on DHCP3 was:
    THE DHCP SERVICE FAILED TO RESTORE THE DHCP REGISTRY CONFIGURATION. THE FOLLOWING ERROR OCCURED: The system cannot find the patch specified
    By the way when I was making backup before I have even started doing anything, I have made it on DHCP3's local storage: (C:\temp\DHCP3-backup-september2017) so I don't quite understand the error message: "the system cannot find the patch specified".
    Because RESTORE was not possible I decided to manually change the scope as it was before the migration. When I wanted to change scope from 192.168.10.100 - 192.168.10.230 to 192.168.10.100 - 192.168.10.159 it gave me some kind of conflict error message.
    I have even checked if there were any ips in IPV6 and they were not.
    I thought maybe the problem could be that I can not edit the address pool because. have even deleted all the reservations and it did not help.
    At the end I had to:
    - take a snapshot/list of current reservations on DHCP3
    - delete the scope, recreate it and put back the reservations


    I don't understand why clients did not start talking with DHCP3 after they leases from DHCP2 had expired. I even don't understand why IPCONFIG /release /renew did not trigger to push that IP givement.

    We also have NAP in our environment, maybe that could be blocking it?


    bostjanc



    • Edited by B_C_R Wednesday, September 20, 2017 11:00 AM
    Wednesday, September 20, 2017 10:45 AM
  • Bostjan,

    The IP helper (Cisco command) is configured on a router or layer 3 switch. DHCP clients use broadcasts to communicate with DHCP servers. Since broadcasts don't cross layer 3 boundaries, you need to tell the router where to send the broadcast traffic. The helper is what tells it where to send the traffic.

    If your DHCP server is on the same subnet as the clients, you don't need helper addresses. But if they are on different subnets, you will need them.

    What is the IP address of the new DHCP server? 

    Wednesday, September 20, 2017 10:16 PM
  • We made a rookie mistake. A person who prepared DHCP destination server did not put static ip on server. And even worse, destination DHCP was setup to get IP from source DHCP which was migrated. No wonder that nothing worked after we have degraded source DHCP. So we have setup static IP on destination DHCP and we will repeat manual migration once again.

    With best regards

    B


    bostjanc

    • Marked as answer by B_C_R Thursday, September 21, 2017 7:07 AM
    Thursday, September 21, 2017 7:07 AM
  • Hi,Bostjanc

    Thanks for your sharing and support.

    Best Regards,

    Frank


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, September 22, 2017 1:53 AM