Oracle software generally uses the host name to allow the client to directly enter the host name of the server rather than the IP address network to connect to the server. To achieve this goal, you need to map the Host Name and IP address into a ing entry. In Windows, the rtlIPv
Oracle software generally uses the host name to allow the client to directly enter the host name of the server rather than the IP address network to connect to the server. To achieve this goal, you need to map the Host Name and IP address into a ing entry. In Windows, the rtlIPv
Oracle software generally uses the host name to allow the clientEnter directlyServerInstead of the IP address.Connect the network to the server. For this purposeIP addressMaps to a ing entry.InIn the window systemThe rtl00006addresstostringw function called by a process on the Windows operating system (from ntdll on the Windows operating system. dll file) can automatically construct this ing entry (that is, the program is written to death), soThe content in the hosts file can be blank.To achieve the above purpose.In Linux, the preceding function is not available. Therefore, manually add this record to the/etc/hosts file.
InWindows System,A ing entry is constructed.HabitsIn the format of "ip address name 1 name 2" [This is a general form]Name 1Write ,Name 2Write , That isHostname. The final result is . Hostname specifies the system's DNS host name, which can be returned by the "hostname" command. That is, the FQDN (fully qualified domain name, fully qualified domain name) = Host name + the host name in the domain name (including the top-level domain name.Because hostname is the dns host nameHostnameThe domain name appears in the fqdn format used by the dns system. But hereWindows SystemI FunctionA ing entry is constructed.Li is alsoDomain names in fqdn format.
Refer to 0:
Windows modifies the host name by modifying the Registry
Oracle software generally uses the host name to allow the clientEnter directlyServerInstead of the IP address.Connect the network to the server.
For example, if the host name in listener. ora is set to the host name, the listener can still be monitored normally because the host already exists.Host Name andIP addressA ing entry mapped.
Note:
1. The server is not necessarily on a different host than the client, but also on the same host. For example, A host has IP addresses A and B, the server uses A, and the client uses B. Alternatively, A host has only one IP address A, and the server uses A, and the client is also available with.
In Windows, generally, during the installation of oracle Database software, the rtl1_6addresstostringw function (from ntdll on Windows operating system) will be called once. dll file) to construct the ing entry between the host name and the existing IP address and save it on the installed oracle database software. After the host name or IP address of the operating system is modified, some functions related to the host name on oracle will become abnormal.
See:
Do not easily modify your host name 11gR2 modifying the host name causes errors in CRS-0184 and CRS-4000
Reference 1:
The Linux system will query the/etc/hosts file before sending a domain name resolution request to the DNS server. If there is a corresponding record in it, the record in hosts will be used.The/etc/hosts file usually contains this record.
127.0.0.1 localhost. localdomain localhost
The hosts file format is one record per line, which isThe IP address hostname aliases, which must be separated by blank characters. Optional.IP address domain name 1 domain name 2 ..... Domain Name n.
We recommend that you do not modify the configuration from 127.0.0.1 to localhost, because many applications use this configuration, such as sendmail. After modification, these programs may not run properly.
After the hostname is modified, if you want to access the host with newhostname, you must add a newhostname record in the/etc/hosts file. For example, if my eth0 IP address is 192.168.1.61, modify the hosts file as follows:
# Hostname blog.infernor.net
# Cat/etc/hosts
127.0.0.1 localhost. localdomain localhost
192.168.1.61 blog.infernor.net blog
In this way, I can access the local machine through blog or blog.infernor.net.
From the above, it doesn't matter whether/etc/hosts sets the hostname directly, the/etc/hosts file is used only when you want to access your host with a new hostname. There is no bound relationship between the two.
Reference 2:
Use Rules for hosts files and ing entries
Additional:
1. The client will use(Your Own) hosts fileWhen establishing a connection, It is not used by the server.(Your Own) hosts file
The client's operating system will query its hosts file before sending a domain name resolution request to the DNS serverSoHosts fileThe ing entries in indicate the ing between the IP address of the server host and the domain name of the IP Address:
ClientFor example, when you enter a domain name in a browser, the system automatically queries the existing domain name in advance.Hosts fileAfter the ing entries in, you can find the IP address of the server and connect to the server through the IP address (the connection communication between the two hosts can only be established in the form of IP addresses, rather than domain names and other forms, because the communication protocol (ipprotocol is designed to only support the IP address format ).
2. The ing entries in the hosts file are in the format. The first domain name is Form, the second domain name is Format
So,Hosts fileThe ing entries in do not have to be mentioned in the format. The first domain name is Form, the second domain name is Form, that is, it is not necessarily the following method, but it is a habit:
The hosts file format is a line of records, respectively, the IP address hostname aliases, the three are separated by blank characters, aliases optional
<完全合格的主机名> <短主机名>
In fact, Why can the name of the domain name followed by the client be obtained at will? Hosts fileThe client Host (OS)You only need to know the domain name. That is to say, the domain name is the alias assigned to an IP address by the host. The host maps the alias to the real name (that is, the IP address) to its own Hosts fileIn this way, the next time the host enters this alias in its browser, it will know the real name (that is, the IP address) corresponding to this alias and connect to Host (OS)Server. Similarly, if you give an alias to someone, this alias does not actually mean anything except yourself (the person you get the alias, when you say this alias, you know who it refers to (equivalent to your host ). Hosts fileIf you have such a ing entry, you do not know who the alias is (equivalent to your host ). Hosts fileWithout such a ing entry), you don't know what the purpose of this alias is (equivalent to failing to connect to the other party after domain name resolution ).
The DNS System (composed of multiple DNS server hosts on the Internet plus the DNS protocol) gives aliases to all hosts on the Internet, and the aliases are obtained according to certain rules, it is not a random name. For example, aliases of a group of people will appear. com. If you have an alias without knowing who the alias is, you can query the specific alias from the DNS system (on the DNS server host, the DNS server host will tell you what the real name (IP address) corresponding to this alias is and connect toHost (OS)Server. If you write an alias in disorder and the alias library does not exist in the DNS system, you cannot ask the DNS system (on the DNS server host) for the result, because it does not recognize this alias.
DNS system andHosts fileAn alias is assigned to the same host, but because two alias systems do not know the meaning of the alias obtained by the other host, they are like two people, one speaking English and the other speaking Chinese, both parties do not understand each other's language, so both parties are talking about Apple, but both parties do not know what it means.
In the DNS system, the ing entry is written ;
In the host file, the ing entry is written as "ip address name 1 name 2 ".
3. FQDN (fully qualified domain name, fully qualified domain name) = Host name + domain name (including top-level domain names)
Host NameCan this location be replaced by other random names?
No, because FQDN is a domain name format specified in the DNS protocol design, that is, it requires the DNS service end to give the DNS Client a fqdn that has the client host name.
Hostname specifies the system's DNS host name, which can be returned by the "hostname" command. That is, the FQDN (fully qualified domain name, fully qualified domain name) = Host name + the host name in the domain name (including the top-level domain name. Because hostname is the dns host nameHostnameThe domain name appears in the fqdn format used by the dns system.
Note:
1. The server is not necessarily on a different host than the client, but also on the same host. For example, A host has IP addresses A and B, the server uses A, and the client uses B. Alternatively, A host has only one IP address A, and the server uses A, and the client is also available with.
2. fully qualified host name is fully qualified domain name
The host name.
3. Domain Name, specifically, yes andHost (OS)Corresponding to an IP address.