
The Hitchhiker's Guide to the Windows Naming Resolution An introduction to how Windows resolves names to IP addresses and vice versa, and a best practice guide for your daily work with SAP on Windows platforms The Hitchhiker's Guide to the Windows Naming Resolution TABLE OF CONTENTS HOW TO USE THIS DOCUMENT .................................................................................................................... 3 CHAPTER 1 HOW DOES WINDOWS NAMING RESOLUTION WORK? ................................................ 4 CHAPTER 2: USEFUL OS COMMANDS .................................................................................................. 11 2.1 Ping ................................................................................................................................................. 11 2.2 nslookup ......................................................................................................................................... 13 2.3 ipconfig ........................................................................................................................................... 13 2.4 nbtstat ............................................................................................................................................. 16 2.5 Some interesting things about host names … ........................................................................... 17 2.6 telnet command to check open ports on local or remote Windows......................................... 17 CHAPTER 3: BEST PRACTICES AND USE CASES ............................................................................... 18 3.1 General problems with the naming resolution – basic strategy ............................................... 18 3.2 SAP gateway problems / RFC problems in Windows Failover Cluster environment ............. 21 3.3 Gateway problems – trace file says “… host name resolution takes longer than x seconds.” 27 3.4 Wrong IP address returned by ping (more network cards are installed) ................................. 27 3.5 Standalone gateway installations in a Failover Cluster … related problems with naming resolution ....................................................................................................................................................... 29 3.6 How to turn off IPv6? ..................................................................................................................... 33 Useful SAP notes and web links regarding “host names and naming resolution”. ............................... 34 2 The Hitchhiker's Guide to the Windows Naming Resolution HOW TO USE THIS DOCUMENT This best practice guide describes how Windows resolves IP addresses for host names and vice versa. Chapter 1 explains how Windows naming resolution works in general. Start with this chapter if you are not familiar with naming resolution techniques and want to learn more about DNS, WINS, NetBios, etc. Chapter 2 contains examples of the most useful operating system (OS) commands and tools, which help you resolve host names on Windows. If you already know how to use the common OS commands like ping, nslookup, ipconfig, etc., you can skip this chapter and go directly to chapter 3. Chapter 3 contains best practice examples from the daily work of an SAP basis administrator on Windows platforms. This document is valid for all Windows operating systems, including Windows Server 2012 and Windows 8. 3 The Hitchhiker's Guide to the Windows Naming Resolution CHAPTER 1 HOW DOES WINDOWS NAMING RESOLUTION WORK? When you want to communicate with another partner on a TCP/IP network, you need to know the IP address of the partner. Since it is much easier to remember names, we use names to reach partners over our networks. Networks can be a local area network (LAN) in your home, your office, a datacenter, or a wide area network (WAN) such as the Internet. All internet communication uses names, for example, www.sap.com. All communication in companies' intranets also uses names, such as sap-server11.company.corp. However, the communication on network level only works with IP addresses. Who then “translates” names to IP addresses? It is the operating system (together with other services from the network like DNS, WINS, etc.). If you use a name to reach a partner – for example, in your internet browser or in a command prompt when you try to “ping” a partner – the operating system tries to resolve the name to an IP address. The standard order in which Windows resolves names to IP addresses is as follows: 1. Host name (the host itself) 2. DNS resolver cache (the Windows service “DNS Client”) 3. Local hosts file (located in c:\windows\system32\drivers\etc\hosts) 4. DNS server 5. NetBIOS cache (can be checked with nbtstat –r) 6. WINS server 7. Broadcasting (yell in the network if someone responds …) 4 The Hitchhiker's Guide to the Windows Naming Resolution Although the various Windows versions differed slightly in the past, and Microsoft is still changing the behavior, this standard order is fine for us at the moment. As of Windows Server 2008, you can change the naming resolution order with a group policy. But we have not yet seen such a configuration at customer site. The order above (1 to 7) is extremely expensive, since a non-resolvable name can result in a pause of several seconds. Use the “ping” command (see chapter 2) and analyze the steps of the OS: Example: ping donald 1. The OS checks whether the local host name of the OS is “donald”. If yes, it returns the local IP address. 2. The OS checks the local DNS resolver cache to see whether there is an entry for “donald” from a previous request. 3. The OS reads the local \etc\hosts file to see whether there is an entry for “donald”. 4. The OS sends a request to the first DNS server from the list of configured DNS servers (see your network cards / TCP/IP protocol configuration). The DNS server can ask another DNS server whether it is not responsible for the requested DNS zone. 5. The OS stores NetBIOS names in another cache. If “donald” is found in this cache, the OS returns the IP address found. 6. The OS sends a request to the first WINS server from the list of configured WINS servers (see your network card(s) / TCP/IP protocol configuration). 7. Finally, the OS sends three NetBIOS broadcast messages to all hosts on the network. If the whole chain cannot resolve an IP address for “donald”, the OS finally returns an error message: C:\>ping donald Ping request could not find host donald. Please check the name and try again. The NetBIOS name resolution is very time- and resource-consuming. SAP Note 1431619 recommends disabling NetBIOS over TCP/IP. The OS then does no longer performs steps 5, 6, and 7. 5 The Hitchhiker's Guide to the Windows Naming Resolution How do I disable “NetBIOS over TCP/IP” in the IPv4 protocol section of the network card? Note: The SAP gateway performs reverse lookup checks: it asks the OS through an IP address for the related host name. If the above setting “NetBIOS over TCP/IP” is enabled, this results in longer resolution times and therefore possible error messages in the SAP gateway’s trace file (dev_rd). 6 The Hitchhiker's Guide to the Windows Naming Resolution Why do I need to specify more than one DNS server in my network configuration? At least two DNS servers are configured in the TCP/IP configuration, regardless of an IPv4 or IPv6 protocol. Example configuration: Reason: If the first (preferred) DNS server fails to respond (for example, due to power outage), the second (alternate) DNS server responds to DNS requests. You can specify more than 2 DNS servers. Note: If the first (preferred) DNS server can be contacted and answers to a DNS request, the other DNS servers are not contacted by the client (default behavior). Example: The client asks the preferred DNS server for the IP address of the name “prod-server”. The preferred DNS server responds: “I do not know prod-server”. The client does not ask the second or third DNS server, but returns an error code to the application that “prod-server” is unknown. How about IPv4 and IPv6 protocol – are there any changes with regard to the naming resolution? No. The naming resolution mechanism works identically also with the new IPv6 protocol. The DNS server uses a different record-type to store IPv6 addresses, but this is a technical difference due to the different address format of IPv6. Should I turn off the IPv6 protocol? This question is not related to naming resolution. Microsoft strongly recommends not turning off the IPv6 protocol in the network card configuration. Especially in Windows Failover Clusters, this can have bad side effects. 7 The Hitchhiker's Guide to the Windows Naming Resolution To turn off the IPv6 protocol, it is not enough to deselect the checkbox. If you want to turn off the IPv6 protocol stack, contact Microsoft for the best solution. You can turn off IPv6 via the registry key or using the netshell command “netsh”. 8 The Hitchhiker's Guide to the Windows Naming Resolution WINS Server (using NetBIOS) Microsoft implemented their own naming resolution 20 years ago, called Windows Internet Naming (WINS). The WINS server is a very poor and limited implementation of a naming resolution mechanism and works only with short names. WINS servers store NetBIOS names that are limited to max. 15 characters to use for host names. If you use WINS servers, keep in mind that they affect the naming resolution mechanism (see the resolution order above). This means, that even if you have deleted an entry
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages35 Page
-
File Size-