Configuring the Mapping Between SAP HANA Host Names and IP Addresses
Procedure
- 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.
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.
- Run the following command to open the hosts file:
vi /etc/hosts
- 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
- After you complete editing, press Esc, enter :x, and press Enter to exit the hosts file.
- (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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot