none
DHCP replication using powershell - Avoiding to loose last changes. RRS feed

  • Question

  • Hi, I have two dhcp windows server 2016.

    I have server "A" (the primary server) and server "B" working with load balance. I want to replicate, scopes and leases so I have configured all and if I do the replication manually the servers works ok.

    I have tested the powershell command Invoke-DhcpServerv4FailoverReplication and did the replication well.

    So now I will try to set in the scheduled task manager to execute the replication, but first I need to solve this question:

    ¿Where and how I must execute the replication? Supose this case:

    - Server A and B are working ok.

    - Server A have a problem and goes offline. So B takes all control and keep working, leasing IP addresses, etc.

    - Server A goes online again, but it doesn't has the last leased addresses wich server B has.

    - Which server has to execute replication to avoid loose the last changes ? A? B? When? how?

    SO:

    .. if I run the Invoke-DhcpServerv4FailoverReplication only in Server A... I will loose the changes wich server B did..

    If I compare this with my two Active Directory Servers... they do automatic bidirectional replication. Should the DHCP servers work like that? or not?

    I hope have been clear in my question (I know that my english isn't very good :P  ) Thank you!!!






    • Edited by Tomás L Friday, May 24, 2019 6:56 PM
    Friday, May 24, 2019 6:52 PM

Answers

  • Hi,

    If server A becomes available again in MCLT(maximum client lead time), it will attempt to reestablish communications with server 2. 

    DHCP 1 begins communications by sending an update request (UPREQ) to DHCP 2. DHCP 2 sends binding update messages and DHCP 1 sends binding acknowledgment messages until the lease database is synchronized. DHCP 2 then sends an update done message (UPDDONE).

    So, DHCP servers will keep database in sync.

    Please refer to the link below:

    https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn338973(v%3dws.11)  

    The command Invoke-DhcpServerv4FailoverReplication is used to replicate scope configuration.

    If the user makes any changes in any property/configuration (e.g. add/remove option values, reservation) of a failover scope, you need to keep the synchronization manually. 

    Best regards,

    Travis


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

    Monday, May 27, 2019 2:45 AM
    Moderator

All replies

  • Hi,

    If server A becomes available again in MCLT(maximum client lead time), it will attempt to reestablish communications with server 2. 

    DHCP 1 begins communications by sending an update request (UPREQ) to DHCP 2. DHCP 2 sends binding update messages and DHCP 1 sends binding acknowledgment messages until the lease database is synchronized. DHCP 2 then sends an update done message (UPDDONE).

    So, DHCP servers will keep database in sync.

    Please refer to the link below:

    https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn338973(v%3dws.11)  

    The command Invoke-DhcpServerv4FailoverReplication is used to replicate scope configuration.

    If the user makes any changes in any property/configuration (e.g. add/remove option values, reservation) of a failover scope, you need to keep the synchronization manually. 

    Best regards,

    Travis


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

    Monday, May 27, 2019 2:45 AM
    Moderator
  • Hi,

    Just checking in to see if the information provided was helpful.

    Please let us know if you would like further assistance.

    Best Regards,

    Travis


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

    Thursday, May 30, 2019 7:45 AM
    Moderator
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation to provide further help.

    Best Regards,

    Travis


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

    Monday, June 3, 2019 9:26 AM
    Moderator
  • Thank you for your answer. Sorry by my delay. So leased address replicate automatically. The scope configuration must replicate manually o by scheduled task.

    Thank you!

    Monday, June 3, 2019 7:50 PM