Precautions for modifying the/etc/hosts file When configuring OracleRAC

Source: Internet
Author: User
First, our question is: Why do we need to modify the etchosts file when deploying the OracleRAC? Or specifically, when we deploy OracleRAC on the Linux platform

First, our question is: Why do we need to modify the/etc/hosts file when deploying Oracle RAC? Or specifically, when we deploy Oracle RAC on the Linux platform

First, our question is: Why do we need to modify the/etc/hosts file when deploying Oracle RAC? Or specifically, why do we need to change the loop address in the/etc/hosts file
127.0.0.1 localhost
Format? Of course, the hosts file names and locations that need to be modified on different operating system platforms depend on the operating system itself. For example, the C: \ Windows \ System32 \ drivers \ etc \ hosts file must be modified in Windows.

Next, it is not difficult to understand this problem. You just need to know some basic network-related knowledge.
We know that in a network environment, we can use IP addresses to precisely access a network device [such as a host, pc, or printer], or the device name.
When you use an IP address to locate a device, if the network has not suffered such as ARP attacks, the problem will not occur. ARP is not the focus of this article.
To access the host name, you need some conversion rules to map the Host Name and IP address correctly.
This conversion rule can be implemented in three ways:
1 hosts configuration file;
2 NIS [Network Information System | Service], Network Information Service, or "Network Yellow Pages ";
3. DNS [Domain Name System]: Domain Name System.

In the network environment where NIS and DNS are not configured, the/etc/hosts file becomes the only choice for accessing the host through the host name.
This configuration file records the IP addresses of each host name in the network. If a host name corresponds to multiple IP addresses, only the first record takes effect and can be used for correct host name resolution, during the parsing process, the subsequent records will be ignored. The file configuration format is as follows:
IP Address hostname aliases

Let's take a look at the example. If the default loop address is retained:

[Root @ node1 ~] # Hostname

Node1.oracleonlinux.cn

[Root @ node1 ~] # Cat/etc/hosts

# Do not remove the following line, or various programs

# That require network functionality will fail.

127.0.0.1 node1.oracleonlinux.cn node1 localhost. localdomain localhost

: 1 localhost6.localdomain6 localhost6



# Public

172.16.0.33 node1.oracleonlinux.cn node1

172.16.0.34 node2.oracleonlinux.cn node2



# Private

192.168.94.11 node1-priv.oracleonlinux.cn node1-priv

192.168.94.12 node2-priv.oracleonlinux.cn node2-priv



# Virtual

172.16.0.35 node1-vip.oracleonlinux.cn node1-vip

172.16.0.36 node2-vip.oracleonlinux.cn node2-vip



# Scan-ip

172.16.0.223 scan-cluster.oracleonlinux.cn

[Root @ node1 ~] # Ping node1

PING node1.oracleonlinux.cn (127.0.0.1) 56 (84) bytes of data.

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 1 ttl = 64 time = 0.028 MS

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 2 ttl = 64 time = 0.043 MS

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 3 ttl = 64 time = 0.041 MS

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 4 ttl = 64 time = 0.039 MS



--- Node1.oracleonlinux. cnping statistics ---

4 packets transmitted, 4 bytes ed, 0% packet loss, time 3001 ms

Rtt min/avg/max/mdev = 0.028/0.037/0.043/0.009 MS

[Root @ node1 ~] # Ping node1.oracleonlinux.cn

PING node1.oracleonlinux.cn (127.0.0.1) 56 (84) bytes of data.

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 1 ttl = 64 time = 0.031 MS

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 2 ttl = 64 time = 0.042 MS

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 3 ttl = 64 time = 0.044 MS

64 bytes from node1.oracleonlinux.cn (127.0.0.1): icmp_seq = 4 ttl = 64 time = 0.043 MS



--- Node1.oracleonlinux. cnping statistics ---

4 packets transmitted, 4 bytes ed, 0% packet loss, time 2999 ms

Rtt min/avg/max/mdev = 0.031/0.040/0.044/0.005 MS

[Root @ node1 ~] #

After modifying the default loop address:

[Root @ node1 ~] # Cat/etc/hosts

# Do not remove the following line, or various programs

# That require network functionality will fail.

127.0.0.1 localhost

: 1 localhost6.localdomain6 localhost6



# Public

172.16.0.33 node1.oracleonlinux.cn node1

172.16.0.34 node2.oracleonlinux.cn node2



# Private

192.168.94.11 node1-priv.oracleonlinux.cn node1-priv

192.168.94.12 node2-priv.oracleonlinux.cn node2-priv



# Virtual

172.16.0.35 node1-vip.oracleonlinux.cn node1-vip

172.16.0.36 node2-vip.oracleonlinux.cn node2-vip



# Scan-ip

172.16.0.223 scan-cluster.oracleonlinux.cn

[Root @ node1 ~] # Ping node1

PING node1.oracleonlinux.cn (172.16.0.33) 56 (84) bytes of data.

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 1 ttl = 64 time = 0.026 MS

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 2 ttl = 64 time = 0.040 MS

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 3 ttl = 64 time = 0.050 MS

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 4 ttl = 64 time = 0.034 MS



--- Node1.oracleonlinux. cnping statistics ---

4 packets transmitted, 4 bytes ed, 0% packet loss, time 3000 ms

Rtt min/avg/max/mdev = 0.026/0.037/0.050/0.010 MS

[Root @ node1 ~] # Ping node1.oracleonlinux.cn

PING node1.oracleonlinux.cn (172.16.0.33) 56 (84) bytes of data.

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 1 ttl = 64 time = 0.038 MS

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 2 ttl = 64 time = 0.044 MS

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 3 ttl = 64 time = 0.047 MS

64 bytes from node1.oracleonlinux.cn (172.16.0.33): icmp_seq = 4 ttl = 64 time = 0.041 MS



--- Node1.oracleonlinux. cnping statistics ---

4 packets transmitted, 4 bytes ed, 0% packet loss, time 3001 ms

Rtt min/avg/max/mdev = 0.038/0.042/0.047/0.007 MS

[Root @ node1 ~] #

Finally, do you have an answer? Now you know why to change the loop address in the/etc/hosts file

127.0.0.1 localhost

Format?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.