Find below tutorial on how to setup and configure DHCP load balancing on Windows server 2012. This will help you get through your server 2012 interviews and also help IT professionals while configuring load balancing for the first time.
What does DHCP load balancing offer:
- Provides DHCP service availability at all times
- Both servers simultaneously supply IP addresses and configurations
- Similar to an active/active cluster
- Relationship is established between 2 partners (DHCP Servers)
- Only available for IPv4 scopes
- Time sensitive – server’s clock cannot be off by more than 1 minute
- Firewall rules are auto configured during DCHP installation (TCP Port: 647)
- Typically used in a with server within the same site
Enabling and configuring DHCP load balancing:
Here we are trying to provide redundancy and fault tolerance in the event of something failing; in this case it’s the DHCP service. We need to have 2 servers with DHCP role running. The way we can install the DHCP is:
- Go to server manager
- Click on manager and add a role
- Installation type: role based
- Server selection:
- Server role: select DHCP and click next
- Features: here for DHCP we don’t require any other features to be added, leave it alone
- Install the DHCP role
- Once finished, the same windows you will find an option to click on configure DHCP
- Configuring DHCP server:
- We need to configure DHCP server to add DHCP admins, users and authorize DHCP servers
As an admin you can administer 2 DHCP servers on any one of them. Open the DHCP console and right click on DHCP and click add a server, select the other server you want to have load balanced.
Make sure the DHCP server you add is authorized.
We need to create scopes:
- Right click on IPv4 and click on add new scope
- Assign IP address range
- Add exclusions and delay: select IP range where we they can’t be assigned or used by DHCP server to any clients
- Lease duration: 8 days
- Configure DHCP options: configure default gateway, domain name and DNS server
- Leave wins server blank and click next
- Scope activation: do it as per your requirements
- Finish the creation of new scope
How to set up reservations on DHCP:
With reservations we can set a static IP address for some server, as they don’t need changes and IP remains same.
To create new reservation:
- Expand the scope – right click on reservations new reservation
- Give the reservation a name
- IP address
- MAC address: If you want to view the mac address of a server or client..on the client machine open command prompt..and enter
IPCONFIG /ALL with command you will get all the NIC property details along with physical address which is the MAC address
You can also type: getmac /s servername
Getmac /s domain1
How to configure and setup load balancing between 2 DHCP servers
With enabling DHCP failover we can achieve high availability, where 2 server synchronize the same information, if one server fails the other server still has the same information to provide IP address to clients and servers
- Go to the DHCP console right click on first DHCP server—expand –right click on IPv4—select configure failover
- Select the scope and the partner; the partner name can be the host name or IP address
- Create a new fail-over relationship:
- Relationship name: here we find 2 servers associated with their FQDN fully qualified domain name
- Maximum client lead time and state switchover interval are 2 important features for fail-over
- Mode: we have load balance and hot standby
- IP address and workload that is going to happen between 2 servers, by default they are going to split the work load and IP address 50-50.
Whenever you make any changes in scope 1, the DCHP server doesn’t replicate to server 2, you will have right click on the scope and click replicate manually.