Top
PRIMECLUSTER GLS for Windows User's Guide 4.3
FUJITSU Software

3.4.5 Follow-up Tasks: IP Address Settings

In order to set and use GLS correctly, you must make IP address settings for the virtual adapters.

When using the adapter setting script of GLS

You can set IP addresses automatically using the adapter setting script provided with GLS.
Note that this script is executed automatically after you execute the strhanet command to activate all virtual adapters. For more details, refer to "6.2.7 strhanet."

The method is described below.

  1. Open the following file.

    <GLS Installation Directory>\usr\script\adapter\netconf.bat
  2. Enter and save the required information in the file. The following example shows how to use the netsh command to set the IP address 192.168.1.10 for the virtual adapter sha0.

    netsh interface ip set address "sha0" static 192.168.1.10 255.255.255.0

You can use the script that takes the name of the virtual adapter which has been transited from the inactive state to the active state as the argument.

  1. Open the following file.

    <GLS Installation Directory>\usr\script\adapter\netconf_indivi.bat
  2. Enter the required information and save the file.
    Except for the point that the name of the virtual adapter which has been transited from the inactive state to the active state is taken as the argument, this step is the same as for netconf.bat. Note that the name of the virtual adapter is in the shaX (where X is an integer of 0 or larger) format. The number of arguments is one or more. The script may take one or more arguments.
    The following example shows how to use the netsh command to set the IP address 192.168.110.1 for the virtual adapter sha0 and the IP address 192.168.254.1 for the virtual adapter sha1.

    @echo off
    :LOOP_START
    
    if "%1"=="" GOTO :LOOP_END
    
    if "%1"=="sha0" (
    netsh interface ip set address "sha0" static 192.168.110.1 255.255.255.0
    )
    
    if "%1"=="sha1" (
    netsh interface ip set address "sha1" static 192.168.254.1 255.255.255.0
    )
    
    shift
    goto :LOOP_START
    :LOOP_END

Moreover, if you have executed the strhanet command with the -n option, you can prepare scripts for each virtual adapter.

  1. Create the following file.

    <GLS Installation Directory>\usr\script\adapter\netconf_shaX.bat (X is an integer)
  2. Enter the required information and save the file.
    Enter the same data as netconf.bat.

The following table shows when each script is called.

strhanet

strhanet -n shaX

netconf.bat

Y

N

netconf_indivi.bat

Y

N

netconf_shaX.bat (X is an integer)

N

Y

Note

  • Do not enter GLS commands in the netconf.bat, netconf_indivi.bat, and netconf_shaX.bat (X is an integer) files.

  • When activating a virtual adapter without specifying the -n option with the strhanet command, all the commands entered in the netconf.bat are executed. This time, if there are active virtual adapters, communications may be temporarily disabled by resetting IP addresses with netconf.bat.

When using the function of Windows

You can also use standard Windows functions to set IP addresses manually. There are two methods:

Note that, in order to set IP addresses manually, the virtual adapter must be activated in advance. For more details, refer to "3.4.6 Activating Virtual Adapters."

Setting by GUI

Windows provides the [Internet Protocol (TCP/IP) Properties] window, as shown below, for setting IP addresses using the GUI.

Open the Control Panel and the [Network Connections] window, and then the [Properties] window of the relevant network adapter. The [Properties] window opens. Select [Internet Protocol (TCP/IP)] and click [Properties].

Figure 3.9 [Internet Protocol (TCP/IP) Properties] Window

Specify the IP address of the virtual adapter in above window.

Setting by Commands

Windows provides the netsh command for setting IP addresses by command.

The following example shows how to use the netsh command to set the IP address for the virtual adapter from the Command Prompt.

> netsh interface ip set address "sha0" static 192.168.1.10 255.255.255.0
OK

See

For more details on netsh, refer to "netsh /?".