DNS name resolution using nslookup takes up to 40 seconds on an ESXi host
search cancel

DNS name resolution using nslookup takes up to 40 seconds on an ESXi host

book

Article ID: 311224

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • When using the nslookup tool from the ESXi command line, name resolution takes up to 40 seconds to complete.
  • DNS name resolution from virtual machines and other devices on the network appears to be faster than when using nslookup from the ESXi command line interface.
  • When you log in to an ESXi host using SSH, you experience a delay of several seconds before the password prompt is displayed.


Environment

VMware ESXi 4.1.x Installable
VMware vSphere ESXi 5.1
VMware ESXi 4.0.x Embedded
VMware ESXi 4.0.x Installable
VMware vSphere ESXi 5.0
VMware vSphere ESXi 5.5
VMware ESXi 4.1.x Embedded

Cause

This issue occurs when you run nslookup from the ESXi command line. If a reverse DNS lookup zone has not been created on the DNS server, or if a Name Server (NS) entry does not exist within the reverse lookup zone, the operation times out for 30 to 40 seconds before the name resolution completes successfully.

Notes:
  • Normal host functions requiring DNS resolution such as the ping command do not experience a delay as the reverse lookup of the DNS server does not occur.
  • When you do not have a reverse lookup zone configured, you may experience a delay of several seconds when logging in to hosts via SSH.

Resolution

To resolve this issue, ensure that a reverse lookup zone is created for the network containing the DNS server, and that a Name Server record is created within the DNS lookup zone.

Note: To configure reverse lookup zones, consult your DNS server vendor documentation.


Additional Information

This example shows the difference before and after configuring a reverse lookup zone.
  1. Before configuring the reverse lookup zone, run the command:

    # time nslookup hostname

    Note: In this example, the DNS hostname is win.lab.local, which is associated with the IP address, 192.168.200.15. The DNS server configured in ESXi has an IP address, 192.168.200.9.

    # time nslookup win.lab.local

    You see output similar to:

    Server: 192.168.200.9
    Address 1: 192.168.200.9

    Name: win.lab.local
    Address 1: 192.168.200.15
    real 0m 31.31s
    user 0m 0.01s
    sys 0m 0.00s

    Note: This lookup took approximately 31 seconds to execute.

  2. After configuring a reverse lookup zone for the example 192.168.200.0/24 network, including an NS record for the DNS server within this zone, run the command again:

    # time nslookup win.lab.local

    You see output similar to:

    Server: 192.168.200.9
    Address 1: 192.168.200.9

    Name: win.lab.local
    Address 1: 192.168.200.15
    real 0m 0.01s
    user 0m 0.00s
    sys 0m 0.00s


    This lookup takes less than a second to execute.
ESXi ホスト上での nslookup を使用した DNSの名前解決に40秒近くかかる