- Network Load Balancing
- Introduction
- Installing and Configuring
- Шаг 4. Создание кластера удаленного доступа с балансировкой сетевой нагрузки STEP 4 Create the Network Load Balanced Remote Access Cluster
- Предварительные требования Prerequisites
- Включение подмены MAC-адресов в EDGE1 и EDGE2 Enable MAC address spoofing on EDGE1 and EDGE2
- Установка компонента балансировки сетевой нагрузки на EDGE1 и EDGE2 Install the Network Load Balancing feature on EDGE1 and EDGE2
- Установка балансировки сетевой нагрузки To install Network Load Balancing
- Включение балансировки нагрузки в EDGE1 Enable load balancing on EDGE1
- Включение балансировки нагрузки Enable load balancing
- Добавление EDGE2 в кластер с балансировкой нагрузки Add EDGE2 to the load balanced cluster
- Добавление EDGE2 в кластер Add EDGE2 to the cluster
Network Load Balancing
Introduction
Network load balancing (NLB) in Windows ServerВ® 2008 provides traffic distribution using TCP/IP and can be used with the IIS shared configuration feature to create a Web farm that provides redundancy and fault-tolerance. NLB works by balancing traffic between the nodes in a Web farm or cluster. Servers emit a heartbeat message to other hosts in the cluster and listen for the heartbeat of other hosts. If a host fails, the remaining hosts adjust and redistribute the workload.
NLB does not monitor the health of your application. Instead, it allows the application developer to determine how healthy a load-balanced application is. Since each application has its own notion of load and health, measuring and monitoring these quantities is best achieved by the application itself. By using collected measurements from your application and the NLB public WMI provider, it is a relatively simple task to add load and health monitoring to your load-balanced application.
It is recommended that the servers have two networks. One is for the public cluster IP address that is shared by every host or node in the cluster. This will likely be used as the IP for Web sites on the server. The second one is for private traffic between the nodes of a Web farm. For example, if the server is using an internal network for traffic to internal resources like the file server or Active Directory servers, this could be used for traffic between the nodes.
Installing and Configuring
To install NLB
- Navigate to Administrative Tools and click Server Manager.
- Scroll down to the Features section or click the Features node in the left-hand tree view.
- Click Add Features.
- In the Add Features Wizard, select Network Load Balancing from the list of available optional components.
- Click Next, and Install, as applicable to complete the wizard.
To configure NLB
Navigate to Administrative Tools and click Network Load Balancing Manager, or run nlbmgr from a command prompt.
Right-click Network Load Balancing Clusters and click New Cluster.
Connect to the host that will be part of the cluster, in this case the Web server. In the Host text box, type the name of the host, and then click Connect.
Select the interface you want to use with the cluster, and then click Next.
On the Host Parameters page, select a value from the Priority (unique host identifier) drop-down list.
In the Dedicated IP Addresses area, click Add to type the IP address that is shared by every host in the cluster. NLB will add this IP address to the TCP/IP stack on the selected interface of all hosts chosen to be part of the cluster. Click Next to continue.
On the Cluster IP Addresses page, click Add.
In the Add IP Address dialog box, type the IP address and subnet mask, and then click OK.
Click Next.
On the Cluster Parameters page, in the Cluster operation mode area, click Unicast to specify that a unicast media access control (MAC) address should be used for cluster operations. Click Next to continue.
On the Port Rules page, click Edit to modify the default port rules if you need advanced rules. Otherwise, use the default.
Click Finish to create the cluster.
To add more hosts to the cluster, right-click the new cluster, and then click Add Host to Cluster.
Шаг 4. Создание кластера удаленного доступа с балансировкой сетевой нагрузки STEP 4 Create the Network Load Balanced Remote Access Cluster
Область применения. Windows Server (Semi-Annual Channel), Windows Server 2016 Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016
Windows Server 2016, Windows Server 2012 R2 и Windows Server 2012 позволяют создавать кластеры серверов удаленного доступа. Windows Server 2016, Windows Server 2012 R2 and Windows Server 2012 enable you to create clusters of Remote Access servers. Кластер выступает в качестве единого логического сервера и обеспечивает централизованную настройку и управление для серверов в кластере. A cluster acts as a single logical server and provides centralized configuration and management for the servers in the cluster. При использовании балансировки сетевой нагрузки (NLB) поддерживается до 8 членов удаленного доступа в одном кластере. When using Network Load Balancing (NLB) there is support for up to 8 Remote Access members in a single cluster. Кластеры удаленного доступа обеспечивают высокую доступность и балансировку нагрузки подключений клиентов DirectAccess к внутренней сети. Remote Access clusters provide high availability and load balancing of connections from DirectAccess clients to the internal network.
Следующие процедуры позволяют создавать и тестировать кластеры удаленного доступа. The following procedures enable you to create and test a Remote Access cluster:
Установите функцию балансировки сетевой нагрузки на EDGE1 и EDGE2. Install the Network Load Balancing feature on EDGE1 and EDGE2. Перед включением балансировки нагрузки необходимо установить функцию балансировки сетевой нагрузки как в EDGE1, так и в EDGE2. Before enabling load balancing, you must install the Network Load Balancing feature on both EDGE1 and EDGE2.
Включите балансировку нагрузки для EDGE1. Enable load balancing on EDGE1. EDGE1 изначально был установлен в режиме одиночного сервера. EDGE1 was originally installed in single server mode. Чтобы включить балансировку нагрузки, необходимо настроить новые внешние и внутренние выделенные IP-адреса (DIP) для EDGE1. To enable load balancing, you configure new external and internal dedicated IP addresses (DIPs) for EDGE1. Предыдущие DIP в EDGE1 автоматически настраиваются как виртуальные IP-адреса (VIP) для кластера. The previous DIPs on EDGE1 are automatically configured as virtual IP addresses (VIPs) for the cluster. Новый внешний DIP — 131.107.0.10, новый внутренний IPv4-DIP — 10.0.0.10, новый внутренний IPv6-DIP — 2001: db8:1:: 10. The new external DIP is 131.107.0.10, the new internal IPv4 DIP is 10.0.0.10, the new internal IPv6 DIP is 2001:db8:1::10. Виртуальные IP-адреса кластера — 131.107.0.2 и 131.107.0.3 (External), 10.0.0.2 и 2001: db8:1:: 2 (внутренний). The cluster VIPs are 131.107.0.2 and 131.107.0.3 (external), and 10.0.0.2 and 2001:db8:1::2 (internal).
Добавьте EDGE2 в кластер с балансировкой нагрузки. Add EDGE2 to the load balanced cluster. После включения балансировки нагрузки теперь можно добавить EDGE2 в кластер, чтобы обеспечить балансировку нагрузки и высокую доступность клиентских подключений DirectAccess. After enabling load balancing, you can now add EDGE2 to the cluster to provide load balancing and high availability for DirectAccess client connections.
Предварительные требования Prerequisites
При создании этой тестовой лаборатории на виртуальных машинах необходимо включить подмену MAC-адресов в EDGE1 и EDGE2. If you are creating this test lab on virtual machines, you must enable MAC address spoofing on EDGE1 and EDGE2.
Включение подмены MAC-адресов в EDGE1 и EDGE2 Enable MAC address spoofing on EDGE1 and EDGE2
Выполните корректное завершение работы в EDGE1 и EDGE2. Perform a graceful shutdown on EDGE1 and EDGE2.
На компьютере, на котором размещены виртуальные машины, в диспетчере Hyper-V щелкните правой кнопкой мыши EDGE1 и выберите пункт Параметры. On the machine hosting your virtual machines, in Hyper-V Manager, right-click EDGE1, and then click Settings.
В диалоговом окне Параметры в списке оборудование щелкните сетевой адаптер, подключенный к корпоративной сети, а затем в области сведений установите флажок включить подмену MAC-адресов . On the Settings dialog box, in the Hardware list, click the network adapter connected to the corpnet network, and then in the details pane, select the Enable spoofing of MAC addresses check box.
В списке оборудование выберите сетевой адаптер, подключенный к сети Интернет, а затем в области сведений установите флажок включить подмену MAC-адресов . In the Hardware list, click the network adapter connected to the Internet network, and then in the details pane, select the Enable spoofing of MAC addresses check box.
В диалоговом окне Параметры нажмите кнопку ОК. On the Settings dialog box, click OK.
Повторите эту процедуру из шага 2 в EDGE2. Repeat this procedure from step 2 on EDGE2.
Установка компонента балансировки сетевой нагрузки на EDGE1 и EDGE2 Install the Network Load Balancing feature on EDGE1 and EDGE2
Чтобы настроить EDGE1 и EDGE2 в кластере, необходимо установить компонент балансировки сетевой нагрузки как в EDGE1, так и в EDGE2. To configure EDGE1 and EDGE2 in a cluster, you must install the Network Load Balancing feature on both EDGE1 and EDGE2.
Установка балансировки сетевой нагрузки To install Network Load Balancing
В EDGE1 в консоли диспетчер сервера на панели мониторинга щелкните Добавить роли и компоненты. On EDGE1, in the Server Manager console, in the Dashboard, click Add roles and features.
Щелкните Далее четыре раза, чтобы перейти на экран выбора компонентов сервера. Click Next four times to get to the server feature selection screen.
В диалоговом окне Выбор компонентов выберите Балансировка сетевой нагрузки, щелкните Добавить компоненты, нажмите кнопку Далее, а затем — установить. On the Select features dialog, select Network Load Balancing, click Add Features, click Next, and then click Install.
В диалоговом окне Ход установки убедитесь в успешном завершении установки, а затем нажмите кнопку Закрыть. On the Installation progress dialog, verify that the installation was successful, and then click Close.
Повторите эту процедуру на EDGE2. Repeat this procedure on EDGE2.
Включение балансировки нагрузки в EDGE1 Enable load balancing on EDGE1
Используйте эту процедуру, чтобы включить балансировку нагрузки и настроить новые DIP в EDGE1. Use this procedure to enable load balancing and configure the new DIPs on EDGE1.
Включение балансировки нагрузки Enable load balancing
В EDGE1 нажмите кнопку Пуск, введите RAMgmtUI.exe и нажмите клавишу ВВОД. On EDGE1, click Start, type RAMgmtUI.exe, and then press ENTER. Если появится диалоговое окно контроля учетных записей, подтвердите, что отображаемое в нем действие именно то, которое требуется, и нажмите кнопку Да. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
В левой области консоли управления удаленным доступом щелкните Конфигурация, а затем в области задачи выберите включить балансировку нагрузки. In the Remote Access Management console, in the left pane, click Configuration, and then in the Tasks pane, click Enable Load Balancing.
В мастере включения балансировки нагрузки нажмите кнопку Далее. In the Enable Load Balancing Wizard, click Next.
На странице метод балансировки нагрузки щелкните использовать балансировку сетевой нагрузки Windows (NLB), а затем нажмите кнопку Далее. On the Load Balancing Method page, click Use Windows Network Load Balancing (NLB), and then click Next.
На странице внешние выделенные IP-адреса в поле адрес IPv4 введите 131.107.0.10, в поле Маска подсети проверьте префикс подсети 255.255.255.0 и нажмите кнопку Далее. On the External Dedicated IP Addresses page, in the IPv4 address box, type 131.107.0.10, in the Subnet mask box, verify the subnet prefix is 255.255.255.0, and then click Next.
На странице внутренние выделенные IP-адреса выполните следующие действия, а затем нажмите кнопку Далее. On the Internal Dedicated IP Addresses page, do the following, and then click Next:
В поле IPv4-адрес введите 10.0.0.10 и в поле Маска подсети убедитесь, что префикс подсети — 255.255.255.0. In the IPv4 address box, type 10.0.0.10 and in the Subnet mask box, verify the subnet prefix is 255.255.255.0.
В поле IPv6-адрес введите 2001: db8:1:: 10 и в длину префикса подсети проверьте значение 64. In the IPv6 address box, type 2001:db8:1::10 and in the Subnet prefix length, verify the value is 64.
На странице Сводка нажмите кнопку зафиксировать. On the Summary page, click Commit.
В диалоговом окне Включение балансировки нагрузки нажмите кнопку Закрыть. On the Enable Load Balancing dialog box, click Close.
В мастере включения балансировки нагрузки нажмите кнопку Закрыть. In the Enable Load Balancing Wizard, click Close.
Добавление EDGE2 в кластер с балансировкой нагрузки Add EDGE2 to the load balanced cluster
Используйте эту процедуру, чтобы добавить EDGE2 в кластер балансировки сетевой нагрузки. Use this procedure to add EDGE2 to the NLB cluster.
Перед продолжением необходимо подождать две минуты после выполнения предыдущих действий. You should wait two minutes after completing the previous steps before proceeding. После включения балансировки сетевой нагрузки Раконфигтаск запускает и настраивает компьютер с параметрами балансировки сетевой нагрузки. After enabling NLB, the RAConfigTask runs and configures the machine with NLB settings. Это может занять несколько минут, и если администратор запустит другую конфигурацию, связанную с балансировкой сетевой нагрузки, перед завершением задачи эта настройка завершится ошибкой. This might take a few minutes to complete, and if the administrator runs another NLB related configuration before the task ends, that configuration will fail.
Добавление EDGE2 в кластер Add EDGE2 to the cluster
На компьютере EDGE1 или виртуальной машине в консоли управления удаленным доступом в области задачи в разделе кластер с балансировкой нагрузки щелкните Добавить или удалить серверы. On the EDGE1 computer or virtual machine, in the Remote Access Management Console, in the Tasks pane, under Load Balanced Cluster, click Add or Remove Servers.
В диалоговом окне Добавление или удаление серверов нажмите кнопку Добавить сервер. On the Add or Remove Servers dialog box, click Add Server.
В мастере добавления сервера на странице Выбор сервера введите EDGE2, а затем нажмите кнопку Далее. On the Add a Server wizard, on the Select Server page, type EDGE2, and then click Next.
На странице Сетевые адаптеры во внешнем адаптере убедитесь, что выбран параметр Интернет , а во внутреннем адаптере выбран параметр Корпоративная сеть. On the Network Adapters page, in External adapter, make sure that Internet is selected, and in Internal adapter, make sure that Corpnet is selected. Нажмите кнопку Обзор, в диалоговом окне Безопасность Windows убедитесь, что установлен флажок сертификат IP-HTTPS , нажмите кнопку ОК, а затем нажмите кнопку Далее. Click Browse, on the Windows Security dialog box, make sure that IP-HTTPS Certificate is selected, click OK, and then click Next.
На странице Сводка нажмите кнопку Добавить. On the Summary page, click Add.
На странице Завершение нажмите кнопку Закрыть. On the Completion page, click Close.
В диалоговом окне Добавление или удаление серверов нажмите кнопку зафиксировать. On the Add or Remove Servers dialog box, click Commit.
В диалоговом окне Добавление и удаление серверов нажмите кнопку Закрыть. On the Adding and Removing Servers dialog box, click Close.
На начальном экране введите nlbmgr.exe и нажмите клавишу ВВОД. On the Start screen, type nlbmgr.exe, and the press ENTER. Если появится диалоговое окно контроля учетных записей, подтвердите, что отображаемое в нем действие именно то, которое требуется, и нажмите кнопку Да. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
В диспетчере балансировки сетевой нагрузки щелкните внутренний кластер Da. In the Network Load Balancing Manager, click Internal DA cluster. В области сведений убедитесь, что для обоих EDGE1 (в корпоративной сети) и EDGE2 (в корпоративной сети) установлено состояние конвергенции. In the details pane, make sure that both EDGE1(Corpnet) and EDGE2(Corpnet) have the status Converged.
Если сервер не сходится, в дереве консоли щелкните сервер правой кнопкой мыши, наведите указатель на узел управления и выберите пункт запустить. If a server is not Converged, in the console tree, right-click the server, point to Control Host, and then click Start.
В диспетчере балансировки сетевой нагрузки щелкните кластер Internet Da. In the Network Load Balancing Manager, click Internet DA cluster. Убедитесь, что в области сведений оба EDGE1 (Интернет) и EDGE2 (Интернет) имеют состояние конвергенции. Make sure that in the details pane, both EDGE1(Internet) and EDGE2(Internet) have the status Converged.
Если сервер не сходится, в дереве консоли щелкните сервер правой кнопкой мыши, наведите указатель на узел управления и выберите пункт запустить. If a server is not Converged, in the console tree, right-click the server, point to Control Host, and then click Start.