Skip to end of metadata
Go to start of metadata

The "Hosts file" format can severely impact the Diagnostics Agent, the SAP Host Agent, connectivity between Managed Systems and Solution Manager.


Where is located the /etc/hosts file ?

The location of the "Hosts file's" is the following:

  • On Unix/Linux: /etc/hosts
  • On Windows: C:\Windows\System32\drivers\etc\hosts



Amount of total entries in the /etc/hosts file ?

Because the "Hosts file" format can severely impact the Diagnostics Agent, the SAP Host Agent and the connectivity between Managed Systems and Solution Manager we strongly recommend you to use a DNS whereas the /etc/hosts file itself

More line are existing in the /etc/hosts file more your system on the network will be difficult to maintain

An /etc/hosts file more than 10 IP will be very difficult to maintain
 

For more information following the information in MCSA/MCSE 70-254: Monitoring and Troubleshooting Network Activity

  • Hosts files are very effective in small environments with a limited number of hosts; however, the vast number of Internet resources led to the development of DNS.



Information's orders in the /etc/hosts file ?

The Mandatory Information order on the /etc/hosts file are the following :

1st position: IP address 

2nd position: FQDN (Full Qualified Domain Name)

3rd position: Short hostname


# Correct format with correct line information order :

#IP                                      Full Qualified Domain Name                              Hostname

ALL the line on the /etc/hosts file have to be maintain following this order

If one line is formatted incorrectly the /etc/hosts file will be unreadable


===============================================================================================

=================================        Incorrect /etc/hosts file Format         ==================================

===============================================================================================

# Incorrect format with incorrect line order in the hosts file :

#IP                                              Hostname                                      Full Qualified Domain Name                                    

(This example is strictly forbidden you cannot have the IP Hostname and FQDN in this order)

(The correct order is IP FQDN Hostname)


===============================================================================================

========================================       See Also      ============================================

===============================================================================================

For more information please verify the Standard format definition :

The "hosts" file standard format is defined as per RFC952 (Hosts Table Convention).

  • The RFC for protocols specify these labels must only contain the ASCII letters a through z (in a case-insensitive manner), the digits 0 through 9, and the hyphen-minus character ('-'). The original specification of hostnames in RFC 952 disallowed labels starting with a digit or with a hyphen character and end with a hyphen. However, a subsequent specification (RFC 1123) permits hostname labels to start with digits. No other symbols, punctuation characters, or whitespace are permitted. Internationalized domain names are stored in the Domain Name System as ASCII strings using Punycode transcription.[4]


You are using Physical, Virtual and Logical host on the /etc/hosts file hosts ?

Each Physical/Virtual and Logical host have to be unique on the /etc/hosts file

# Correct format regarding order Physical, Virtual and Logical Host :

#IP                                 Full Qualified Domain Name                      Hostname

Each host are define with unique IP FQDN and Hostname


===============================================================================================

=================================        Incorrect /etc/hosts file Format         ==================================

===============================================================================================

# Incorrect format regarding order with Physical, Virtual, Logical Host :

#IP                               Full Qualified Domain Name                       Hostname                                                            

                           

(This example is strictly forbidden you cannot have Physical, Virtual, Logical host with the same IP address)


# Incorrect format regarding order with Physical, Virtual, Logical Host :

#IP                                   Full Qualified Domain Name                         Hostname                                                            

               

(This example is strictly forbidden you cannot have Physical Virtual Logical host with same IP and define on the same /etc/hosts file line)

For more information please follow the instruction on the SAP Note 962955.



All mentioned "IP addresses", "FQDNs" and "Hostnames" are unique on the /etc/hosts file

All mentioned "IP addresses", "FQDNs" and "Hostnames" have to be unique in the host file to make it readable for SAP Server, it is not possible to have two times the same entry in the /etc/hosts file

# Correct format regarding duplicate :

# Unique IP                                   Unique Full Qualified Domain Name                         Unique Hostname

You can see on this example there is not any duplicate entries in the /etc/hosts file


===============================================================================================

=================================        Incorrect /etc/hosts file Format         ==================================o

===============================================================================================

# Incorrect format with duplicate IP address :

#IP                                        Full Qualified Domain Name              Hostname

(This example is strictly forbidden you cannot have duplicate IP address)


# Incorrect format with duplicate FQDN :

#IP                                          Full Qualified Domain Name               Hostname

(This example is strictly forbidden you cannot have duplicate FQDN is duplicate)


# Incorrect Format with duplicate Hostname :

#IP                                        Full Qualified Domain Name               Hostname

(This example is strictly forbidden you cannot have duplicate Hostname is duplicate)


===============================================================================================

========================================       See Also      ============================================

===============================================================================================

For more information please verify the "hosts" file standard format defined as per RFC952 (Hosts Table Convention).

  • The RFC for protocols specify these labels must only contain the ASCII letters a through z (in a case-insensitive manner), the digits 0 through 9, and the hyphen-minus character ('-'). The original specification of hostnames in RFC 952 disallowed labels starting with a digit or with a hyphen character and end with a hyphen. However, a subsequent specification (RFC 1123) permits hostname labels to start with digits. No other symbols, punctuation characters, or whitespace are permitted. Internationalized domain names are stored in the Domain Name System as ASCII strings using Punycode transcription.[4]



Two different FQDN for the same IP address is strictly forbidden

Two different FQDNs for the same IP address is forbidden, the file will be unreadable,

The /etc/hosts file will not able to contain's 2 FQDNs for the same IP address SAP Server following the standard format RFC


# Correct format regarding FQDN :

#IP                                  Full Qualified Domain Name                       Hostname


===============================================================================================

=================================        Incorrect /etc/hosts file Format         =================================

===============================================================================================

# Incorrect format regarding FQDN :

#IP                           1 Full Qualified Domain Name                              2 Full Qualified Domain Name                                 Hostname

             

(This example is strictly forbidden you cannot have 2 FQDN for the same IP address, each IP must have only one FQDN referenced)

In case you would like to use 2 FQDN for one IP it is not standard cause one IP must been associate only with one FQDN please verify the network possibility for this request



Any modification of the /etc/hosts file will require an OS restart or at Least a restart of the Network Service

Any modification of the "hosts" file will require an OS restart, or at least a restart of the Network service and the Diagnostic Agent.

  • Please restart the host

or at least

  • Please restart the Network Service:
    • On Unix/Linux: restart /etc/init.d/networking
    • On Windows: restart the network service

Please remember that if the host have not been restart the modification will not be apply

  • No labels