Solved

How to delete all scopes from a DHCP server or synchronize servers in diferent subnets

Posted on 2007-12-05
8
4,588 Views
Last Modified: 2008-02-01
I am running a network with redundant datacenters. I created a scheduled task to export all dhcp scopes from the primary datacenter to the secondary sites using netsh dhcp server commands. This works great for the initial synchronization, but once the other servers have the bulk of the scopes, further imports fail because the scopes already exist. Is there a way to delete all scopes from a dhcp server with a command line so that the import will succeed? Alternatively, is there a way to force the netsh dhcp server \\xxxx import to overwrite existing scopes?

As a last option, does anyone have a better suggestion for keeping multiple dhcp servers in multiple sites in sync?
0
Comment
Question by:bartramg1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 6

Expert Comment

by:CasUK
ID: 20415338
The best way to keep multiple DHCP servers in sync is not to.

Microsoft's guidelines for administrators who manage multiple DHCP servers is to section the DHCP scope for each server so that they address different parts of a single range.

Read this article, http://www.windowsdevcenter.com/pub/a/windows/2004/04/13/DHCP_Server.html

It's a guide for using the 20/80 rule to maintain DHCP server availability - but the principle is the same for using DHCP servers dotted around different locations.

If you're using Active Directory, DNS does keep in sync, which is the important thing to get right - which it will synchronise across domain controllers if it is integrated into AD.
0
 

Author Comment

by:bartramg1
ID: 20415576
Unfortunately in our environment, this is not an option. Each node has to maintain it's IP address no matter which DHCP server is issuing it. So the 80\20 plan won't work for our network, because the node would get a different address from the second DHCP server.

And, no, static addresses and doing away with DHCP is not an option either.
0
 
LVL 6

Expert Comment

by:CasUK
ID: 20415626
As you need to maintain IP addresses for each node, could you use reserved IP addresses instead?

(I hate static IPs :)
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

Author Comment

by:bartramg1
ID: 20415695
Yes. In fact reserved IP addresses is part of our plan. That's where the 80\20 solution doesn't work in our network is we need to have the reservation for each node to use its own reserved DHCP address regardless of which DHCP server assigns it.

The end purpose behind this is so that we can operate 3 DHCP servers without having to maintain all 3 individually. We can create scopes or reservations on the primary server, and have those additions replicate on a nightly basis to the secondary servers.

I know some of you are probably shaking your heads at how this network can be maintained in this manner. However given our unique requirements for node IP addresses (Which are dictated outside our company, and well above my pay grade) My hope is to devise a replication solution to lessen our administration work rather than increase it.
0
 
LVL 21

Expert Comment

by:from_exp
ID: 20415813
btw, one of the possible solutions is to maintain mysql database with leases and 3 different dhcp servers working with database instead of lease file.
but this means moving from windows to linux
0
 
LVL 6

Accepted Solution

by:
CasUK earned 500 total points
ID: 20415826
Ah, I see.

OK - if they need to be identical could we just copy the dhcp server database?

On the primary server do the following:

mkdir C:\DHCPBackup
net stop dhcpserver
xcopy /y %windir%\system32\dhcp\dhcp.mdb C:\DHCPBack
net start dhcpserver

Share the backup folder, and then schedule that to run everyday at, say, 10pm.

On the backup servers:
net stop dhcpserver
xcopy /y \\primaryserver\dhcpbackup\dhcp.mdb %windir%\system32\dhcp\dhcp.mdb
net start dhcpserver

This copies the DHCP database across from the primary server to the backups - set it to run about 10:05pm

I hope this suits what you're after.
0
 

Author Comment

by:bartramg1
ID: 20415904
Will this work without copying DHCP information from the registry? If so, it sounds like a winner.
0
 
LVL 6

Expert Comment

by:CasUK
ID: 20415921
Yes - it copies the database of all the assignments, reservations etc.

I've used it in the past to just move DHCP databases, but I think that it will work in your case.

Good luck!
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
2003 Server DNS/FS errors 6 80
IPv6 NAT to IPv4 28 92
Cisco WRVS4400N 11 68
How to rollback Windows updates with SCCM? 6 118
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
A Cisco router can be configured as a DHCP Server. There are advantages and disadvantages in making your Cisco router work as DHCP Server. Almost all the features for windows DHCP can be configured on Cisco-based DHCP server. Some of the features me…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question