Lesson 3: Choosing an NLB Model

In Lesson 2, "Planning NLB Clusters," you learned what steps you needed to take in order to plan your NLB cluster. One of the steps is to choose an NLB model. NLB clusters can be categorized into four configuration models, which address single and multiple network adapters as well as unicast and multicast modes of operation. In this lesson, you’ll learn how NLB uses unicast and multicast modes to distribute network traffic. The lesson also discusses the four configuration models you can use when planning an NLB cluster.

After this lesson, you will be able to

  • Describe the unicast and multicast modes of operation in NLB
  • Describe the advantages and disadvantages of each NLB model
  • Choose which NLB model to implement in your organization

Estimated lesson time: 30 minutes

NLB Cluster Models

NLB can operate in two modes: unicast and multicast. For each mode, you can configure the cluster hosts with one network adapter or with multiple network adapters. As a result, you can choose from four NLB models when planning your NLB clusters. These models are based on the combination of operational modes and the number of network adapters. This section describes the issues related to the unicast and multicast operational modes and each of the four models.

Distribution of Cluster Traffic

NLB uses Layer-2 broadcast or multicast to distribute incoming network traffic simultaneously to all cluster hosts. In its default unicast mode of operation, NLB reassigns the Media Access Control (MAC) address of the network adapter for which it’s enabled (called the cluster adapter), and all cluster hosts are assigned the same MAC address. Incoming packets are thereby received by all cluster hosts and passed up to the NLB driver for filtering. To ensure uniqueness, the MAC address is derived from the cluster’s primary IP address entered in the NLB Properties dialog box. For example, if a primary IP address is 1.2.3.4, the unicast MAC address is set to 02-BF-1-2-3-4. NLB automatically modifies the cluster adapter’s MAC address by setting a registry entry and then reloading the adapter’s driver; the operating system doesn’t have to be restarted.

If the cluster hosts are attached to a switch instead of a hub, the use of a common MAC address would create a conflict because Layer-2 switches expect to see unique source MAC addresses on all switch ports. To avoid this problem, NLB uniquely modifies the source MAC address for outgoing packets; a cluster MAC address of 02-BF-1-2-3-4 is set to 02-h -1-2-3-4, where h is the host’s priority within the cluster. This technique prevents the switch from learning the cluster’s actual MAC address, and as a result, incoming packets for the cluster are delivered to all switch ports. If the cluster hosts are connected directly to a hub instead of to a switch, you can disable NLB’s masking of the source MAC address in unicast mode in order to avoid flooding upstream switches. You do this by setting the NLB registry parameter MaskSourceMAC to 0.

NLB’s unicast mode has the side effect of disabling communication between cluster hosts using the cluster adapters. Because outgoing packets for another cluster host are sent to the same MAC address as the sender, the network stack loops these packets back within the sender, and they never reach the wire. You can avoid this limitation by adding a second network adapter card to each cluster host. In this configuration, NLB is bound to the network adapter on the subnet that receives incoming client requests, and the other adapter is typically placed on a separate, local subnet for communication between cluster hosts and with back-end file and database servers. NLB uses only the cluster adapter for its heartbeat and remote control traffic.

Note that communication between cluster hosts and hosts outside the cluster is never affected by NLB’s unicast mode. Network traffic for a host’s dedicated IP address (on the cluster adapter) is received by all cluster hosts because they all use the same MAC address. Because NLB never load balances traffic for the dedicated IP address, NLB immediately delivers this traffic to TCP/IP on the intended host. On other cluster hosts, NLB treats this traffic as load-balanced traffic (since the target IP address doesn’t match another host’s dedicated IP address), and it might deliver it to TCP/IP, which would discard it. Note that excessive incoming network traffic for dedicated IP addresses can impose a performance penalty when NLB operates in unicast mode due to the need for TCP/IP to discard unwanted packets.

NLB provides a second mode called multicast mode for distributing incoming network traffic to all cluster hosts. This mode assigns a Layer-2 multicast address to the cluster adapter instead of changing the adapter’s station address. For example, the multicast MAC address is set to 03-BF-1-2-3-4 for a cluster’s primary IP address of 1.2.3.4. Because each cluster host retains a unique station address, this mode alleviates the need for a second network adapter for communication between cluster hosts, and it also removes any performance penalty from the use of dedicated IP addresses.

NLB’s unicast mode induces switch flooding in order to deliver incoming network traffic to all cluster hosts simultaneously. When NLB uses multicast mode, switches often flood all ports by default to deliver multicast traffic. However, NLB’s multicast mode gives the system administrator the opportunity to limit switch flooding by configuring a virtual LAN within the switch for the ports corresponding to the cluster hosts. You can accomplish this by manually programming the switch or by using Internet Group Management Protocol (IGMP) or Generic Attribute Registration Protocol (GARP) Multicast Registration Protocol (GMRP). The current version of NLB doesn’t provide automatic support for IGMP or GMRP.

NLB implements the Address Resolution Protocol (ARP) functionality needed to ensure that the cluster’s primary IP address and other virtual IP addresses resolve to the cluster’s multicast MAC address. (The dedicated IP address continues to resolve to the cluster adapter’s station address.) Some routers currently don’t accept an ARP response from the cluster that resolves unicast IP addresses to multicast MAC addresses. You can overcome this problem by adding a static ARP entry to the router for each virtual IP address. You can obtain the cluster’s multicast MAC address from the Network Load Balancing Properties dialog box or from the WLBS.EXE remote-control program. The default unicast mode avoids this problem because the cluster’s MAC address is a unicast MAC address.

NLB doesn’t manage any incoming IP traffic other than TCP traffic, UDP traffic, and Generic Routing Encapsulation (GRE) traffic (as part of PPTP traffic) for specified ports. It doesn’t filter IGMP, ARP (except as described above), the Internet Control Message Protocol (ICMP), or other IP protocols. All such traffic is passed unchanged to the TCP/IP protocol software on all of the hosts within the cluster. As a result, the cluster can generate duplicate responses from certain point-to-point TCP/IP programs (such as ping) when the cluster IP address is used. Because of TCP/IP’s robustness and ability to deal with replicated data-grams, other protocols behave correctly in the clustered environment. These programs can use the dedicated IP address for each host to avoid this behavior.

Unicast support is enabled by default. If multicast support is enabled, a single network adapter can handle both client-to-cluster traffic and dedicated traffic without difficulty. However, the use of a second network adapter may improve performance by handling dedicated traffic concurrently with the original network adapter.

NLB handles the resolution of the cluster’s primary IP address to its associated multicast cluster MAC address within the ARP on your router. In some cases the ARP implementation on a given router might not support the use of a multicast MAC address. If this problem arises, the cluster won’t be accessible from outside the local subnet. To correct this problem, you must create a static ARP entry within the router.

Should you disable multicast support (causing the host to revert to unicast mode), NLB automatically instructs the driver belonging to the cluster adapter to override the adapter’s unique, built-in network address and to change its MAC address to the cluster’s MAC address. This is the address used on all cluster hosts. You don’t need to configure the network adapter manually to recognize this address.

Some network adapters don’t support changing their MAC addresses. If you experience this problem, you must install a network adapter that does.

NLB with Network Hardware Switches

NLB hosts in a single cluster must all be on the same broadcast subnet and connected to each other through either a hub or a switch. Network hardware switches mediate between a network and computers or other switches, routing packets from the network to the correct computer.

If you connect NLB hosts with a switch, the switch must be Level-2 rather than Level-3 or higher, because all the hosts share the same IP address (the cluster IP address) and Level-3 switches direct network packets (incoming client requests) according to the destination computer’s IP address.

In unicast mode, each host’s unique MAC address is replaced with the same cluster MAC address. Identifying all the hosts with one MAC address makes it possible to distribute incoming client requests (network packets) to all the hosts.

However, most Level-2 switches require that each port be associated with a unique source MAC address. NLB addresses this requirement in unicast mode by enabling the MaskSourceMAC feature by default.

When MaskSourceMAC is enabled, NLB masks the source MAC address for outgoing packets so that for each port the switch continues to see a unique source MAC address. This satisfies the switch’s requirement that each port be associated with a unique MAC address. Figure 5.10 shows a representative configuration of an NLB cluster in unicast mode with MaskSourceMAC enabled and attached to a Level-2 switch.

Figure 5.10 - NLB cluster running in unicast mode with MaskSourceMAC enabled

Masking the cluster MAC address on outgoing packets prevents the switch from associating the cluster MAC address with a single port. When a client request (which contains the cluster MAC address) enters the switch, the switch doesn’t recognize the MAC address in the packet and so sends the packet to all ports. This process is referred to as switch flooding.

In unicast mode, NLB induces switch flooding by design, so that packets sent to the cluster’s virtual IP address go to all the cluster hosts. Switch flooding is part of the NLB strategy of obtaining the best throughput for any specific load of client requests.

If, however, the cluster shares the switch with other (nonclustered) computers or other clusters, switch flooding can add to the other computers’ network overhead by including them in the flooding.

You can avoid flooding nonclustered computers by putting a network hub between the switch and the NLB cluster hosts and then disabling the MaskSourceMAC feature. The hub delivers each packet to every host, and the switch associates the cluster MAC address with a single port, satisfying the switch’s requirement that each port be associated with a unique MAC address.

Using a network hub to solve the problem of switch flooding has one major flaw. It introduces one massive single point of failure for the cluster—that is, if the hub fails, the entire cluster goes down. Unfortunately, there is no other way to prevent switch flooding.

Placing the NLB hosts downstream (toward the cluster) from a hub doesn’t reduce the bandwidth for downstream packets. However, all upstream (from the cluster) traffic must flow through the hub. To optimize use of the hub, you can also connect each host’s second network adapter back to another port in the switch for outbound packets, as shown in Figure 5.11.

Figure 5.11 - NLB cluster running in unicast mode, with MaskSourceMAC disabled

This configuration shown in Figure 5.11 has the following benefits:

  • Routing outbound packets through network adapters that aren’t attached to the hub improves use of the hub’s capacity.
  • Use of the capacity for multiple upstream pipes from the switch to the network is improved, because multiple cluster hosts can send traffic to different upstream pipes simultaneously.
  • Using two network adapters to separate each cluster host’s inbound and outbound network traffic improves the cluster hosts’ handling of network traffic.

Finally, if you choose not to use a hub as described here (for example, if the NLB cluster doesn’t share the Level-2 switch with any other computers), you can put a Level-3 switch upstream from the Level-2 switch to prevent switch flooding of other interconnected Level-2 switches.

NLB Configuration Models

NLB can operate in two modes: unicast and multicast. In unicast mode, the cluster’s MAC address is assigned to the computer’s network adapter and the network adapter’s built-in MAC address isn’t used. In multicast mode, the cluster’s MAC address is assigned to the computer’s network adapter, but the network adapter’s built-in address is retained so that both addresses are used—the first for client-to-cluster traffic and the second for network traffic specific to the computer.

You can choose from four configuration models when planning an NLB cluster: single network adapter in unicast mode, multiple network adapters in unicast mode, single network adapter in multicast mode, and multiple network adapters in multicast mode.

NLB doesn’t support a mixed unicast/multicast environment. All cluster hosts must be either multicast or unicast; otherwise, the cluster won’t function properly. However, there’s no restriction on the number of network adapters; different hosts can have a different number of adapters.

Single Network Adapter in Unicast Mode

This model is suitable for a cluster in which ordinary network communication among cluster hosts isn’t required and in which there’s limited dedicated traffic from outside the cluster subnet to specific cluster hosts.

The model has the following advantages:

  • Only one network adapter is required.
  • This model is the most straightforward configuration (because unicast mode is the default).
  • Unicast mode works with all routers.

It also has the following disadvantages:

  • Ordinary network communication among cluster hosts isn’t possible.
  • Because there’s only one network adapter, overall network performance might suffer.

Note that in this model the computer can also handle traffic from inside the subnet if the IP datagram doesn’t carry the same MAC address as on the cluster adapter.

When using unicast mode with a single network adapter, the adapter’s own unique MAC address is disabled. The cluster MAC address (which NLB automatically generates) replaces this address. The adapter becomes, in effect, the cluster adapter. Both the dedicated IP address and the cluster IP address resolve to the cluster MAC address.

Because all cluster hosts share the same MAC address, and because the original MAC address isn’t used, ordinary network communication among hosts isn’t possible. However, the computer can still handle traffic originating from outside the subnet in which the cluster is located and from inside the subnet if the IP datagram doesn’t carry the same MAC address as on the cluster adapter.

Multiple Network Adapters in Unicast Mode

This model is suitable for a cluster in which ordinary network communication among cluster hosts is necessary or desirable, and in which there’s comparatively heavy dedicated traffic from outside the cluster subnet to specific cluster hosts.

The model has the following advantages:

  • This model is the preferred configuration that’s used by most sites because a second network adapter may enhance overall network performance.
  • This configuration permits ordinary network communication among cluster hosts.
  • Unicast mode works with all routers.

It has the following disadvantage:

  • The configuration requires a second network adapter.

When multiple adapters are installed in unicast mode, the first network adapter is the cluster adapter. The cluster IP address resolves to this adapter’s cluster MAC address (which NLB automatically generates). If the cluster adapter’s dedicated IP address is used, this IP address also resolves to the cluster MAC address.

The cluster adapter handles client-to-cluster traffic. If the dedicated IP address is used, the computer can also handle traffic originating from outside the subnet in which the cluster is located and from inside the subnet if the IP datagram doesn’t carry the same MAC address as on the cluster adapter.

The second network adapter is the dedicated adapter. This adapter’s IP address resolves to the adapter’s built-in MAC address. The dedicated adapter handles network traffic specific to the computer, including traffic from both inside and outside the subnet in which the computer is located.

Single Network Adapter in Multicast Mode

This model is suitable for a cluster in which ordinary network communication among cluster hosts is necessary or desirable but in which there’s limited dedicated traffic from outside the cluster subnet to specific cluster hosts.

The model has the following advantages:

  • Only one network adapter is required.
  • It permits ordinary network communication among cluster hosts.

It has the following disadvantages:

  • Because there’s only one adapter, overall network performance might suffer.
  • Some routers might not support the use of a multicast MAC address.

Note that in this model the computer can also handle traffic from inside the subnet if the IP datagram doesn’t carry the same MAC address as on the cluster adapter.

When using multicast mode with a single network adapter, NLB automatically generates a cluster MAC address for the network adapter. The adapter’s own unique MAC address is retained. The cluster IP address resolves to the cluster MAC address. The dedicated IP address resolves to the original MAC address. Because both MAC addresses are used, there are no constraints on network traffic, except for the load placed on the network adapter.

Multiple Network Adapters in Multicast Mode

This model is suitable for a cluster in which ordinary network communication among cluster hosts is necessary and in which there’s heavy dedicated traffic from outside the cluster subnet to specific cluster hosts.

The model has the following advantages:

  • Because there are at least two network adapters, overall network performance might be enhanced.
  • This configuration permits ordinary network communication among cluster hosts.

It has the following disadvantages:

  • It requires a second network adapter.
  • Some routers might not support the use of a multicast MAC address.

If multiple adapters are used in multicast mode, the first network adapter is the cluster adapter. The cluster IP address resolves to this adapter’s cluster MAC address (which NLB automatically generates). If the cluster adapter’s dedicated IP address is used, this IP address resolves to the adapter’s original built-in MAC address. The cluster adapter, therefore, can handle both client-to-cluster traffic and traffic specific to the computer, including all traffic from both inside and outside the subnet in which the computer is located.

The second network adapter is the dedicated adapter. This adapter’s IP address resolves to the adapter’s built-in MAC address. The dedicated adapter handles network traffic specific to the computer, including traffic from both inside and outside the subnet in which the computer is located.

Making a Decision

When planning your NLB cluster, you should use one of the four configuration models. Table 5.2 describes each of these models.

Table 5.2 Choosing a Configuration Model

Strategy Description

Single network adapter in unicast mode

Unicast mode is the default configuration for NLB and works with all routers. However, ordinary network com- munication among hosts isn’t possible, and network performance might be compromised.

Multiple network adapters in unicast mode

Unicast mode is the default configuration for NLB and works with all routers. In addition, ordinary network communication among hosts is possible, and network performance might be enhanced. However, at least two network adapters are required.

Single network adapter in multicast mode

Only one network adapter is required, and ordinary network communication among hosts is possible. However, this isn’t the default configuration, network performance might suffer, and some routers might not support the use of a multicast MAC address.

Multiple network adapters in multicast mode

Performance might be enhanced, and ordinary network communication among hosts is possible. However, this isn’t the default configuration, at least two network adapters are required, and some routers might not support the use of a multicast MAC address.

Recommendations

Multicast mode has many advantages; but because multicast mode is incompatible with some routers, unicast mode is often a better solution when implementing NLB. Unicast mode, with multiple network adapters, is the preferred configuration used by most sites. This model is easier to configure because it’s the default mode, permits ordinary network communication among hosts, and works with all routers. The fact that at least two network adapters are required is usually not a problem because most organizations supporting a Web infrastructure have a front-end Internet network and a back-end corporate network—a configuration that requires each host in an NLB cluster to have at least two network adapters.

Example: An NLB Configuration for the Baldwin Museum of Science

The Baldwin Museum of Science is implementing a load-balancing solution that uses a Layer-2 switch and an NLB cluster that contains four hosts, as shown in Figure 5.12. The cluster is configured for the unicast mode of operation, and each host contains multiple network adapters. The Layer-2 switch provides dedicated collision-free communication between network devices and enables multiple simultaneous data transmission between two ports, increasing network capacity. When a Layer-2 switch starts, it builds a table of each network adapter card’s MAC addresses with the port number to which the adapter is connected.

Figure 5.12 - Baldwin Museum of Science hardware configuration

In NLB, the MAC address is replaced with the cluster network adapter’s MAC address, which is used by all the cluster hosts. For an incoming request, the switch forwards the request to all the ports associated with the cluster MAC address. Based on a hashing algorithm, one of the hosts will accept the packet and the other hosts will ignore it. After processing, the data packet is sent back to the port from which the packet was originally received.

Figure 5.12 shows the use of a Layer-2 switch and an NLB cluster. The switch can handle multiple conversations at the same time at the full bandwidth. Therefore, if one cluster host is processing one request, and the cluster receives another request, another host can pick up the data packet and begin processing. This ensures the system’s high performance.

Lesson Summary

NLB can operate in two modes: unicast and multicast. For each mode you can configure the cluster hosts with one network adapter or with multiple network adapters. In its default unicast mode of operation, NLB reassigns the MAC address of the network adapter for which it’s enabled and all cluster hosts are assigned the same MAC address. In multicast mode, NLB assigns a Layer-2 multicast address to the cluster adapter instead of changing the adapter’s station address. If you connect NLB hosts with a switch, the switch must be Level-2 rather than Level-3 or higher. You can choose from four configuration models when planning an NLB cluster: single network adapter in unicast mode, multiple network adapters in unicast mode, single network adapter in multicast mode, and multiple network adapters in multicast mode. Unicast mode, with multiple network adapters, is the preferred configuration used by most sites. This model is easier to configure because it’s the default mode, it permits ordinary network communication among hosts, and it works with all routers.



Microsoft Corporation - MCSE Training Kit. Designing Highly Available Web Solutions with Microsoft Windows 2000 Server Technologies
MCSE Training Kit (Exam 70-226): Designing Highly Available Web Solutions with Microsoft Windows 2000 Server Technologies (MCSE Training Kits)
ISBN: 0735614253
EAN: 2147483647
Year: 2001
Pages: 103

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net