The SAP NI (network interface) encapsulates the network and transport layers for SAP applications.
One feature of the network interface is the host name buffer, which acts as a cache for mapping between host names and IP addresses, and therefore ensures stability and reduces wait times during name resolution.
This includes “forward lookups” (host name to IP) and “reverse lookups” (IP to host name). Both valid entries, that is, previously successful queries to the operating system, and invalid entries, if queried again, are answered from this buffer.
However, there are circumstances in which the cache provides an incorrect value, for example, if a system is moved to another subnetwork with a different IP address.
For this reason, the system automatically removes entries from the cache if a connection attempt with the data from the cache fails. In this way, obsolete data is removed from the cache, and current data is created.
In addition, you can deactivate the cache for all components, or set the retention period of objects without needing to restart the system or individual components.
You can control the caching of IP addresses to host names using the following profile parameters, which you can also change dynamically when the system is running:
The parameters define the period after which the invalid (“negative cache”) and the valid (“positive cache”) entries are deleted from the host name buffer.
Both parameters are specified in seconds, and have a value range between 0 and 86400 (1 day). By default, both are set to 600 (10 minutes).
If you set the value of the positive cache to 0 (is/hostbuffer_timeout_valid_entry = 0), you fully deactivate the cache (positive and negative cache).
If you set the value of the negative cache to 0, only the negative cache is deactivated.
The internal NI host name buffer (DNS cache) is subject to the following restrictions:
No updating at operating system level.
The NI host name buffer forms a separate layer between the operating system and the application.
If entries in the NI host name buffer are invalidated, this does not have any influence on the corresponding information at operating system level (such as the DNS cache).
Entries in the negative cache prevent invalidation
The automatic invalidation is triggered by a failed connection attempt and an entry in the positive cache is the prerequisite for creating the connection. Since there is always either an entry in the positive cache or an entry in the negative cache, but never both, invalidation can only be used for entries in the positive cache. Entries in the negative cache must either expire or be deleted manually. If this leads to problems, you can ease the situation by setting a short timeout for the negative cache.
Applications that store IP addresses doe not profit from the host name buffer
If an application stores the result of a name resolution locally, or is configured directly with an IP address instead of a host name, the described mechanisms do not catch it. The application program must then be corrected.