Win2008 r2/2012 Network Load Balancing NLB related content _win server

Source: Internet
Author: User

The use of Network Load Balancing technology enables the availability and scalability of some applications: IIS, firewalls, VPNs, and some key businesses. Each node runs a copy of the application. NLB distributes incoming client requests in multiple hosts in the cluster. You can dynamically add a host, or you can boot all traffic to a specific single host, which is called the default master host. Supports up to 32 computers in a cluster.

When the computer fails unexpectedly or goes offline, the active connection is disconnected from the server that is failing or offline. However, if you are interested in shutting down the host, you can use the drainstop command to handle all active connections before you take the computer offline. In either case, you can explicitly rejoin the offline computer to the cluster when you are ready, and then share the cluster load again so that the other computers in the cluster handle less traffic.

The Master Opportunity Exchange Detection message in the NLB cluster to maintain consistency of data about the membership of the cluster. By default, when a host fails to send a detection message within five seconds, the host fails. When a host fails, the remaining hosts in the cluster are aggregated and perform the following actions:

Determine which hosts are still active members of the cluster.

Select the highest priority host as the new default host.

Ensure that all new client requests are processed by the host that is still active.

During aggregation, the active main opportunity finds a consistent heartbeat. If the host that cannot send the heartbeat starts providing a consistent heartbeat, it will rejoin the cluster during the aggregation. When a new host tries to join the cluster, it sends a detection message, which also triggers the aggregation. After all cluster hosts agree on the current cluster membership, the client load is redistributed to the remaining hosts and the aggregation is completed.

Typically aggregation takes only a few seconds, so the client service that is interrupted by the cluster is very small. During aggregation, hosts that are still active continue to process client requests without affecting existing connections. If all hosts report a consistent cluster membership and distribution map during several detections, the aggregation ends.

It's very simple to install and deploy, and there are a few things you need to be aware of:

1. Relevance:

None: NLB assigns its request to one of its servers based on the IP address and port of the source host.

Single: NLB assigns its request to one of its servers only based on the IP address of the source host.

Network: The highest 3 bytes in the IP address, depending on the network address of the source host. For example, 200.201.111.0 assigns its request to one of its servers for processing.

2. Operating mode:

Unicast : each node's Nic MAC address is replaced with the same cluster MAC address. This MAC address is used to receive external connection requests. But there are also some problems, as follows:

The MAC address registered on each port on the switch must be unique: If all two nodes are connected to the two-tier switch, then the switch will have a problem registering the MAC address. Microsoft's solution is to use the MASKSOURCEMAC function to resolve, it based on the host ID of each server to change the Ethernet frame head of the packet in the MAC address, the cluster MAC 2nd group to the host ID such as 01 or 02. This address is only in the Ethernet frame, by grasping the packet can be found, through the arp-a should be invisible, interested friends can test.

Enable MaskSourceMAC: In the registry [hkey_local_machine\system\currentcontrolset\services\wlbs\parameters\interface\{ The MaskSourceMAC in d46baff5-ef6d-47b0-8a87-0088a8c73010} is set to 1 and the system defaults to 1, so no modification is necessary.

Switch flood: If the router receives packets destined for the cluster IP address, it will request the MAC address of the cluster IP address through the ARP protocol, which is a true replacement of the cluster Mac, but is broadcast because it is not registered on the switch.

If you want to resolve it thoroughly, you can connect all the servers in the NLB cluster to a single hub, and then connect the hubs to one of the ports on the switch. Also disables the previous MaskSourceMAC feature so that the port will only register the cluster's MAC address. In this way, when the router sends packets destined for the cluster Mac to the switch, the switch will only be forwarded to the hub via this port, not to the other ports, and the hub to all servers.

As for the problem of inability to communicate between two nodes after multicast, it is possible after Windows Server 2008. However, it is recommended that you use a different NIC when considering performance issues or when other businesses need to access these two nodes at the same time.

Multicast : If you are using multicast mode, all nodes are in a multicast group, and each NIC retains its original MAC address in addition to a common multicast MAC address. Therefore, there is no problem with communication between node members. However, it is not possible for clients other than the cluster to access both servers at the same time, but only one of them, such as DNS resolution, is the mechanism of NLB.

The disadvantage of multicasting is that:

Some routers do not support: When the router receives packets to be forwarded to the cluster IP address, it will seek the MAC address via ARP, and some routers will accept the unicast address instead of the multicast MAC address, so there is a problem. Workaround consider creating a new static ARP map within the router, and if not, you can only use unicast mode. As long as you can solve the new ARP static mapping within the router, compatibility is good.

。。 3. Manager use: The basic use of this is not much said, but in the author's practical application found the following problems:

In a workgroup environment, when you use Network Load Balancing Manager to view the status of a connection, everything works as shown in the following illustration:

However, in the domain environment, that is, if two nodes are member servers, you will find that one node is normal to view through the manager, but when the other node view, there will be the phenomenon of inaccessible nodes, as shown in the following figure:

Workaround: Connect to an existing Network Load Balancing cluster by using the host list, as follows:

Step 1: Type the host list in Notepad:

For example, now that all hosts are not displayed correctly on node 02, we will create a text file host.txt on node 02, as follows:

Step 2: Load the host list through the manager, as shown in the following illustration:

Then, after a few minutes of waiting, the complete order information is displayed, as shown in the following illustration:

My understanding is that the process of DNS parsing is omitted, because NLB is now functioning properly, DNS as a client and Node 1 can communicate normally, you must not communicate with node 2, as shown in the following illustration:

If the NLB Manager log displays Access denied, error connecting to "host", you must reconnect to the cluster by using a login that is a member of the Administrators group on all hosts. You can do this by using a different logon name with run as, or by clicking credentials on the NLB Manager options menu to provide an alternate login that NLB Manager can use. Also, you need to know that the log for NLB is what is displayed below the manager, and that is what is recorded in the file.

In summary, it is recommended that NLB be deployed in a workgroup environment, it can also be deployed in a domain environment, but it is relatively simple for a workgroup environment, and of course it takes into account the requirements for domain and DNS in the actual environment; If there is only one network card, multicast is recommended; if there are two network cards, it is best to unicast. The above experiment if is in Hyper-V environment, need to enable Nic MAC address spoofing. It is not recommended to use a stand-alone virtual software such as workstation.

This article comes from "Duffy" blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.