• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (Single Node)
  4. Deployment
  5. Creating ECSs
  6. Configuring the Mapping Between SAP HANA Host Names and IP Addresses

Configuring the Mapping Between SAP HANA Host Names and IP Addresses

During the SAP HANA installation, installation programs use host names for communication. Therefore, you must configure the mapping between hostnames and IP addresses.

Procedure

  1. Use PuTTY to log in to the NAT server with an elastic IP address bound. Ensure that user root and the key file (.ppk file) are used for authentication. Then, use SSH to switch to the HANA server on which SAP HANA is to be installed.

    NOTE:

    In cluster scenarios, you will switch to the first SAP HANA server. Then, you will perform operations on this HANA server when installing SAP HANA.

  2. Run the following command to open the hosts file:

    vi /etc/hosts

  3. Enter i to enter editing mode and write the names and IP addresses of all SAP HANA nodes into the hosts file.

    • In single-node scenarios where HA is not required, IP-Address is the IP address of the server or client plane of the SAP HANA ECS. In single-node scenarios where HA is required, IP-Address is the IP address of the system replication plane.
    • Both Full-Qualified-Hostname and Short-Hostname are the server name, for example, hana001.

    The format is "IP-Address Full-Qualified-Hostname Short-Hostname".

    In an SAP HANA system, you must write the mapping between all SAP HANA node IP addresses and node names into the hosts file.

    Take the IP addresses 10.0.4.2 to 10.0.4.3 of the system replication plane for two SAP HANA nodes in single-node scenarios where HA is required as an example.

    The edited content is as follows:

    ...   
    10.0.4.2 hana001 hana001
    10.0.4.3 hana002 hana002

  4. After you complete editing, press Esc, enter :x, and press Enter to exit the hosts file.
  5. (Optional) Run the following command to transfer the configured /etc/hosts file to other SAP HANA nodes:

    The command is in the following format:

    scp /etc/hosts Peer IP address:/etc/hosts

    This operation is performed only in single-node scenarios where HA is required.

    Verify the SSH switching between SAP HANA nodes.

    Use SSH to switch from one SAP HANA node to all SAP HANA nodes (including the current node) to ensure that the switching is correct.

    For example, if the name of the peer SAP HANA node is hana002, run the following command:

    ssh hana002