System Requirements:
- Windows Server 2008 (R1)
- Microsoft DHCP Server
- Microsoft Mac Level Filter extension
The Problem:
If you are using a Microsoft DHCP Server release prior to Windows Server 2008 R2, Mac Address filtering (either allow or deny based) is not included as part of the main console. Microsoft made the feature available as an extension DLL for Microsoft DHCP during Windows Server 2008 (R1)’s early production run.
If you have installed this extension, filtering is restricted to a single server, with no replication options available to peer servers through clustering. This article offers a simple script that can be used to suspend and update a peer server’s Mac Filter list in a master/slave relationship.
The Fix
The script assumes that you have enabled file sharing through your firewall between the servers and that the MAC address filter configuration file is located at c:\windows\system32\dhcp\MACList.txt.
The format of MACList.txt is
Batch script:
In short, the script:
- Offers you a notepad session to make any needed changes
- When notepad closes it will restart the local servers DHCP service (thus applying the changes locally)
- Shutdown the peer servers DHCP service
- Copy the updated MAC filter list
- Restart the peer servers DHCP service
- Terminate
To add a level of safety, the following script can be run periodically to ensure that the DHCP service is in fact running