共用方式為


Assign a Specific IP Address to Each Compute Node (Create DHCP Reservations)

Updated: September 2010

Applies To: Windows HPC Server 2008 R2

In certain scenarios, you may want to have specific IP addresses for each compute node in your Windows HPC Server 2008 R2 cluster. For example, you may have an application running on your cluster for which you need to specify the IP addresses of your compute nodes. An efficient way to accomplish this is to create reservations of IP addresses on the Dynamic Host Configuration Protocol (DHCP) server, so that when each node is turned on and requests an IP address from the DHCP server, it is assigned a particular IP address.

If you have enabled DHCP on the head node and are using a cluster-managed DHCP scope, you can use one of the following methods to create a DHCP reservation for a specific network adapter on each compute node that is deployed from bare metal, or added as a preconfigured node:

  • Add a Create DHCP Reservation task to the Provisioning phase of a node template

    This method ensures that, after the node is deployed, the compute node is assigned the same address each time it is started.

  • Add an IPAddress attribute for each node in a node XML file

    You can choose the specific IP address that is assigned to each node that is added using the node XML file.

Note
If you are deploying iSCSI boot nodes in your cluster, a DHCP reservation in the scope for the private network is created by default for each node that is deployed from an iSCSI storage array. For more information about deploying iSCSI boot nodes, see Deploying iSCSI Boot Nodes Step-by-Step Guide.

If you are not using a cluster-managed DHCP scope, you can use the administrative or command-line tools for your DHCP server to reserve IP addresses that are assigned to nodes in your cluster. For example, you might be able to run a script that uses the add reservedip command of the netsh command-line tool. You will need to provide the physical hardware or MAC address to associate with each reserved IP address. For more information about the add reservedip command, see “Netsh DHCP server scope” in Netsh command for DHCP (https://go.microsoft.com/fwlink/?LinkID=154295).

Important
Do not create a DHCP reservation for the IP address that is assigned to your DHCP server. If you enabled the DHCP server on the head node of your cluster, do not create a DHCP reservation for the IP address of the head node.

Add a Create DHCP Reservation task to a node template

If you create a node template to deploy a compute node either with or without an operating system, you can add the Create DHCP Reservation task to the Provisioning phase of the node template. This task ensures that the compute node is always assigned the same address by the DHPC server that is running on the head node. However, the DHPC server determines the address that is assigned to each node, depending on the DHCP scope that is configured for the network that the compute node connects to using the appropriate network adapter.

If you need to edit a node template to add the Create DHCP Reservation task, you can use Node Template Editor.

To add a provisioning task to create a DHCP reservation

  1. On the head node of your HPC cluster, open HPC Cluster Manager. Click Start, point to All Programs, click Microsoft HPC Pack 2008 R2, and then click HPC Cluster Manager.

  2. In Configuration, in the Navigation Pane, click Node Templates.

  3. Double-click the node template that you want to modify. The Node Template Editor dialog box opens.

    Note
    You can also make a copy of an existing node template and modify that copy. To copy a node template, select the template, and then on the Actions pane, click Copy. The name of the duplicate template that is created will start with Copy of. You can change the name of the template when you modify it in the Node Template Editor dialog box.
  4. To ensure that the new task is added in the right place, in the Provisioning section of the list of node template tasks, click the last task in that section.

  5. Click Add Task, point to Provisioning, and then click Create DHCP Reservation. The new Create DHCP Reservation task will be listed right before the last task in the Provisioning section.

  6. If you want to move the new Create DHCP Reservation task, click Move Up or Move Down.

  7. To save the changes that you have made to the node template and close the Node Template Editor dialog box, click Save.

Add an IPAddress attribute for each node in a node XML file

If you are using a node XML file to add nodes to a cluster, you can configure the IPAddress attribute for the MacAddress element corresponding to the appropriate network adapter on each compute node listed in the XML file.

For more information about the syntax of a node XML file, see:

Note
To edit a node XML file, use a text editor or an editor that is designed specifically for working with XML files. For example, you can use the Node XML Editor for Excel that is included in the HPC Pack Tool Pack (https://go.microsoft.com/fwlink/?LinkId=183004).

For example, the following node XML file shows the configuration of the IPAddress attribute for four compute nodes. The network adapters identified by the MacAddress elements on the nodes will be assigned the reserved IP addresses 10.0.0.101, 10.0.0.102, 10.0.0.103, and 10.0.0.104:

<?xml version="1.0" encoding="utf-8"?>
<Nodes xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns="https://schemas.microsoft.com/HpcNodeConfigurationFile/2007/12">
  <Node
    Name="COMPUTENODE1"
    DoMayn="CONTOSO"
    MachineGuid="{12345678-75e6-11dd-bbda-5ac28fca0021}">
    <MacAddress IPAddress="10.0.0.101">43215AC28FCA</MacAddress>
    <Tag>ComputeNodes</Tag>
  </Node>
  <Node
    Name="COMPUTENODE2"
    DoMayn="CONTOSO"
    MachineGuid="{12345678-75e6-11dd-bbda-5ac28f7e0021}">
    <MacAddress IPAddress="10.0.0.102">43215AC28F7E</MacAddress>
    <Tag>ComputeNodes</Tag>
  </Node>
  <Node
    Name="COMPUTENODE3"
    DoMayn="CONTOSO"
    MachineGuid="{12345678-75e6-11dd-bbda-5ac3c59e0021}">
    <MacAddress IPAddress="10.0.0.103">43215AC3C59E</MacAddress>
    <Tag>ComputeNodes</Tag>
  </Node>
  <Node
    Name="COMPUTENODE4"
    DoMayn="CONTOSO"
    MachineGuid="{12345678-75e7-11dd-bbda-5ac1b7ac0021}">
    <MacAddress IPAddress="10.0.0.104">43215AC1B7AC</MacAddress>
    <Tag>ComputeNodes</Tag>
  </Node>
</Nodes>