Tuesday, July 27, 2010

DHCP Load Balancing with F5

I got a chance to write some F5 iRules for an engagement where we have to virtualise (load balance & intelligent route) DHCP traffic.

On a high level, these are what the iRule accomplishes:
1) Route DHCP Requests to DHCP server pool, based on Relay Agent IP
2) Forward DHCP Response back to Relay Agents or DHCP clients
3) Rewrite DHCP payload - mainly "DHCP Option 54" and "Next Server IP" BootP field to DHCP Server IP (Request) and Virtual Server IP (Response)
4) Intelligent detection for HA peer (another F5 unit deployed) in Active-Active setup

It worked well in Production and I think we achieve the customer needs for DHCP scalability.