Windows server dns diagnostics

Диагностика работы Windows Server dns

Диагностика работы Windows Server dns 2008r2

Небольшой faq, как дебажить\отладить работу DNS.

Рядовая задача: не резолвится mx у домена:

nslookup -type=mx yandex.com server-dns
╤хЁтхЁ: server-dns
Address: server-dns

DNS request timed out.
timeout was 2 seconds.
*** Превышено время ожидания запроса server-dns

Решил проверить,может хост действительно не имеет записей.

C:\Windows\system32>nslookup -type=mx yandex.com 8.8.8.8
╤хЁтхЁ: google-public-dns-a.google.com
Address: 8.8.8.8

Не заслуживающий доверия ответ:
yandex.com MX preference = 10, mail exchanger = mx.yandex.ru

Идем дальше, смотрим на сервер,

DNS not forwarders

Настроено на корень, dns не имеет сервера пересылки и сам отправляет запросы на Root hints\корневики.

Включаем режим отладки, устанавливаем максимально значение для файла лога, также рекомендую сделать фильтр по ip адресу, это значительно помогает сократить лог.

DNS Debug logging

Пытаемся еще раз отрезолвить адрес. Смотрим что пишется в логе:

25.12.2014 11:36:05 0150 PACKET Response packet 000000333Bv40 does not match any outstanding query
25.12.2014 11:36:16 12E0 PACKET 00000000044FCB90 UDP Snd 192.168.1.1 f920 R Q [8981 DR SERVFAIL] MX (8)yandex(3)com(0)
UDP response info at 00000000044FCB90
Socket = 324
Remote addr 192.168.143.62, port 50359
Time Query=2998040, Queued=2998044, Expire=2998047
Buf length = 0x0200 (512)
Msg length = 0x001e (30)
Message:
XID 0xf920
Flags 0x8182
QR 1 (RESPONSE)
OPCODE 0 (QUERY)
AA 0
TC 0
RD 1
RA 1
Z 0
CD 0
AD 0
RCODE 2 (SERVFAIL)
QCOUNT 1
ACOUNT 0
NSCOUNT 0
ARCOUNT 0
QUESTION SECTION:
Offset = 0x000c, RR count = 0
Name «(8)yandex(3)com(0)»
QTYPE MX (15)
QCLASS 1
ANSWER SECTION:
empty
AUTHORITY SECTION:
empty
ADDITIONAL SECTION:
empty

Ага, нас интересует строчка
RCODE 2 (SERVFAIL)
Все значения, увы, на зубок не помню, ну ничего, идем в RFC 1035 и смотрим что же означает этот флаг, а означает он что:

Server failure — The name server was
unable to process this query due to a
problem with the name server.

Давайте посмотрим что же там за ns сервера:

C:\Windows\system32>nslookup -type=ns yandex.com 8.8.8.8
╤хЁтхЁ: server-dns
Address: server-dns

Не заслуживающий доверия ответ:
yandex.com nameserver = ns1.yandex.net
yandex.com nameserver = ns2.yandex.net

ns1.yandex.net internet address = 213.180.193.1
ns1.yandex.net AAAA IPv6 address = 2a02:6b8::1
ns2.yandex.net internet address = 93.158.134.1
ns2.yandex.net AAAA IPv6 address = 2a02:6b8:0:1::1

Смотрим, что скажет нам ns сейчас

C:\Windows\system32>nslookup -type=mx yandex.com ns1.yandex.net
╤хЁтхЁ: UnKnown
Address: 213.180.193.1

DNS request timed out.
timeout was 2 seconds.
*** Превышено время ожидания запроса server-dns

Теперь становится относительно понятно, почему dns не может отрезолвить данный хост. Посмотрел еще через WireShark, ответов от NS сервера не было.

Итог, нет сетевого доступа по UDP 53. Как только установили разрешении на фаерволе,стало все ок..

Устранение неполадок DNS-клиентов Troubleshooting DNS clients

В этой статье рассматривается устранение неполадок DNS-клиентов. This article discusses how to troubleshoot issues from DNS clients.

Читайте также:  Локальный php сервер для windows

Проверка IP-конфигурации Check IP configuration

Откройте окно командной строки от имени администратора на клиентском компьютере. Open a Command Prompt window as an administrator on the client computer.

Выполните следующую команду: Run the following command:

Убедитесь, что у клиента есть допустимый IP-адрес, маска подсети и шлюз по умолчанию для сети, к которой он присоединен и используется. Verify that the client has a valid IP address, subnet mask, and default gateway for the network to which it is attached and being used.

Проверьте DNS-серверы, указанные в выходных данных, и убедитесь, что указанные IP-адреса указаны правильно. Check the DNS servers that are listed in the output, and verify that the IP addresses listed are correct.

Проверьте в выходных данных DNS-суффикс подключения и убедитесь, что он указан правильно. Check the connection-specific DNS suffix in the output and verify that it is correct.

Если у клиента нет допустимой конфигурации TCP/IP, используйте один из следующих методов. If the client does not have a valid TCP/IP configuration, use one of the following methods:

Для динамически настроенных клиентов используйте ipconfig /renew команду, чтобы вручную обновить конфигурацию IP-адресов на DHCP-сервере. For dynamically configured clients, use the ipconfig /renew command to manually force the client to renew its IP address configuration with the DHCP server.

Для статически настроенных клиентов измените свойства TCP/IP клиента, чтобы они использовали допустимые параметры конфигурации, или завершите настройку DNS для сети. For statically configured clients, modify the client TCP/IP properties to use valid configuration settings or complete its DNS configuration for the network.

Проверка сетевого подключения Check network connection

Проверка связи Ping test

Убедитесь, что клиент может связаться с предпочитаемым (или альтернативным) DNS-сервером, обратившись к предпочитаемому DNS-серверу по его IP-адресу. Verify that the client can contact a preferred (or alternate) DNS server by pinging the preferred DNS server by its IP address.

Например, если клиент использует предпочитаемый DNS-сервер 10.0.0.1, выполните следующую команду в командной строке: For example, if the client uses a preferred DNS server of 10.0.0.1, run this command at a command prompt:

Если ни один настроенный DNS-сервер не отвечает на прямую проверку связи с IP-адресом, это означает, что источником проблемы является более вероятное сетевое подключение между клиентом и DNS-серверами. If no configured DNS server responds to a direct pinging of its IP address, this indicates that the source of the problem is more likely network connectivity between the client and the DNS servers. В этом случае выполните основные действия по устранению неполадок сети TCP/IP, чтобы устранить проблему. If this is the case, follow basic TCP/IP network troubleshooting steps to fix the problem. Помните, что для работы команды ping трафик ICMP должен быть разрешен через брандмауэр. Keep in mind that ICMP traffic must be allowed through the firewall in order for the ping command to work.

Тесты запросов DNS DNS query tests

Если DNS-клиент может проверить связь с компьютером DNS-сервера, попробуйте использовать следующие nslookup команды, чтобы проверить, может ли сервер отвечать на DNS-клиенты. If the DNS client can ping the DNS server computer, try to use the following nslookup commands to test whether the server can respond to DNS clients. Так как nslookup не использует кэш DNS клиента, разрешение имен будет использовать настроенный клиент DNS-сервер. Because nslookup doesn’t use the client’s DNS cache, name resolution will use the client’s configured DNS server.

Читайте также:  Linux error module in use

Тестирование клиента Test a client

Например, если клиентский компьютер имеет имя КЛИЕНТ1, выполните следующую команду: For example, if the client computer is named client1, run this command:

Если успешный ответ не возвращается, попробуйте выполнить следующую команду: If a successful response is not returned, try to run the following command:

Например, если полное доменное имя — CLIENT1.Corp.contoso.com, выполните следующую команду: For example, if the FQDN is client1.corp.contoso.com, run this command:

При выполнении этого теста необходимо включить конечную точку. You must include the trailing period when you run this test.

Если Windows успешно обнаружит полное доменное имя, но не сможет найти его, проверьте конфигурацию DNS-суффикса на вкладке DNS (дополнительные параметры TCP/IP сетевого адаптера). If Windows successfully finds the FQDN but cannot find the short name, check the DNS Suffix configuration on the DNS tab of the Advanced TCP/IP Settings of the NIC. Дополнительные сведения см. в разделе Настройка разрешения DNS. For more information, see Configuring DNS Resolution.

Тестирование DNS-сервера Test the DNS server

Например, если DNS-сервер называется DC1, выполните следующую команду: For example, if the DNS server is named DC1, run this command:

Если предыдущие тесты были успешными, этот тест также должен быть успешным. If the previous tests were successful, this test should also be successful. Если проверка не прошла успешно, проверьте подключение к DNS-серверу. If this test is not successful, verify the connectivity to the DNS server.

Тестирование записи, в которой происходит сбой Test the failing record

Например, если неудачная запись была App1.Corp.contoso.com, выполните следующую команду: For example, if the failing record was app1.corp.contoso.com, run this command:

Проверка общедоступного адреса в Интернете Test a public Internet address

Например: For example:

Если все четыре теста выполнены успешно, запустите ipconfig /displaydns и проверьте в выходных данных имя, которое завершилось ошибкой. If all four of these tests were successful, run ipconfig /displaydns and check the output for the name that failed. Если в неудачном имени появится сообщение «имя не существует», то на DNS-сервере был возвращен отрицательный ответ, который был кэширован на клиенте. If you see «Name does not exist» under the failing name, a negative response was returned from a DNS server and was cached on the client.

Чтобы устранить эту проблему, очистите кэш, выполнив ipconfig /flushdns . To resolve the issue, clear the cache by running ipconfig /flushdns .

Следующий шаг Next step

Если разрешение имен по-прежнему не выполняется, перейдите к разделу Устранение неполадок DNS-серверов . If name resolution is still failing, go to the Troubleshooting DNS Servers section.

How to Enable DNS Logging and Diagnostics in Windows Server 2012 R2

Windows Server 2012 R2

The Enchanced DNS Logging and diagnostics tool is available in Windows Server 2016 Technical Preview by default. You can also download the hotfix containing the query logging and auditing features from Microsfot at http://support.microsoft.com/kb/2956577.

Before doing any type of logging it is a good idea to consider and plan accordingly for any impact on performance. The enchanched DNS logging and diagnostics that can be found in Windows Server 2012 and Windows Server 2016 Technical Preview has been created to reduce the impact on performance. Please see below for DNS server performance considerations.

Читайте также:  Задать имя диску windows

To install DNS diagnostic logging

If the DNS server is running Windows Server 2012 R2, download the hotfix from http://support.microsoft.com/kb/2956577.

Double-click the self-extracting file, for example 475151_intl_x64_zip.exe.

In the Microsoft Self-Extractor dialog box, click Continue.

Enter the location where you want to save the extracted files, for example C:\hotfix. If the directory does not yet exist, you will be asked if you wish to create it. Click Yes and confirm that All files were successfully unzipped is displayed, then click Ok.

In the location where files were unzipped, double-click the Windows Update file, for example Windows8.1-KB2956577-v2-x64.msu.

The Windows Update Standalone Installer will verify that the computer meets requirements to install the update. These requirements include some prerequisite updates. When verification is complete, click Yes when asked if you wish to install the Hotfix for Windows (KB2956577).

If recently downloaded updates have not yet been installed, you might need to restart the computer before the current hotfix can be installed. If this is required, you must restart the computer first and then run the Windows8.1-KB2956577-v2-x64.msu a second time after the computer has completed installing necessary updates. The Windows Update Standalone Installer will notify you that installation of the hotfix is not yet complete. If this happens, and you are prompted to restart the computer, click Restart Now.

If the computer is ready to install the update when you run the hotfix, installation will complete and you must restart the computer for the update to take effect. If Installation complete is displayed, click Restart Now for the update to take effect.

You can confirm that the hotfix was successfully installed by viewing installed updates in the Programs and Features control panel. If the update is successfully installed, Hotfix for Microsoft Windows (KB2956577) will be displayed. You can also verify installation of the hotfix by typing wmic qfe | find “KB2956577” at an elevated command prompt. The URL and date of installation for the hotfix will be displayed if it was successfully installed.

To enable DNS diagnostic logging

Type eventvwr.msc at an elevated command prompt and press ENTER to open Event Viewer.

In Event Viewer, navigate to Applications and Services Logs\Microsoft\Windows\DNS-Server.

Right-click DNS-Server, point to View, and then click Show Analytic and Debug Logs. The Analytical log will be displayed.

Right-click Analytical and then click Properties.

Under When maximum event log size is reached, choose Do not overwrite events (Clear logs manually), select the Enable logging checkbox, and click OK when you are asked if you want to enable this log. See the following example.

Click OK again to enable the DNS Server Analytic event log.

By default, analytic logs are written to the file: %SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-DNSServer%4Analytical.etl.

See the following sections for details about events that are displayed in the DNS server audit and analytic event logs.

Оцените статью