Recently i did some testing with Windows Network Load Balancing (NLB) and i was faced with the question: What exactly is the difference between the two operation modes “unicast” and “multicast” and how does this thing with the dedicated IP address work? I found the post “Selecting the Unicast or Multicast Method of Distributing Incoming Requests“, which describes very well the unicast and multicast differences. In the following article i try summarizing this:
In unicast mode, the network adapter’s original (hardware) MAC address is overwritten with the multicast MAC address of the cluster.
In multicast mode, the network adapter’s original (hardware) MAC address is kept unchanged and an additional multicast MAC address is added.
How is the communication to the virtual cluster IP proceeding?
1. When a request is sent to the virtual cluster IP address, the ARP response returned from the cluster to the client contains either the unicast MAC address (“NLB MAC” in the figure), or the multicast MAC address (“MC MAC” in the figure) of the cluster, depending on the operation mode configured.
2. The client then continues the communication with the cluster via the returned MAC address. Depending on the MAC address type, the switch decides if the request is handled as multicast or unicast and distributes it to all cluster nodes, either using the spoofed unicast address or using the multicast address. The NLB algorithm is then responsible to manage, if a node responds to the request, or if the node drops it.
How NLB operates from the switch point of view is nicely described in the article “Catalyst Switches for Microsoft Network Load Balancing Configuration Example“. Read also “Identifying Ethernet Multicast” to understand, how a multicast MAC address differs from a unicast MAC address.
How is the communication to the dedicated IP proceeding?
When a request is sent to the dedicated IP address, the request is sent to the respective cluster node directly, bypassing any NLB algorithms. The ARP request from the client resolves the dedicated IP address with either the original hardware MAC address (“HW MAC” in the figure) or the virtual unicast MAC address of the cluster, depending on the operation mode used (see figure).
How is the NLB configuration reflected on the network adapter?
Enabling NLB for a network adapter results in the binding of the “Network Load Balancing” component to the selected NIC. The dedicated IP addresses configured in NLB is then set as the first IP address of the NIC, the cluster IP address is configured as the second IP address on the same NIC. When no dedicated IP address will be configured, the cluster IP will be the first and only IP.