Кроме того, эта команда используется для поиска и устранения проблем с DNS. В данном руководстве мы рассмотрим наиболее типичные примеры ее применения.
Команда nslookup может работать в интерактивном и неинтерактивном режимах. Интерактивный режим позволяет пользователю в режиме диалога отправлять DNS-серверу запросы о различных узлах и доменах. Неинтерактивный режим позволяет отправить один запрос об одном узле или домене.
Наиболее распространенные опции и типы аргументов мы рассмотрим ниже в соответствующих примерах.
Получение IP-адреса домена
$ nslookup yandex.ru
Авторитативный и неавторитативный ответы
В приведенном результате присутствует фраза «Non- Authoritative Answer» (неавторитативный ответ).
Авторитативным считается ответ от DNS-сервера, на котором есть полная информация о зоне домена. Во многих случаях на DNS-серверах такой информации нет, они хранят кэш с результатами прошлых запросов, на которые был получен авторитативный ответ. Когда такой сервер получает запрос, он осуществляет поиск в файле кэша и при наличии необходимых данных отправляет их как неавторитативный ответ, как в рассматриваемых нами примерах.
Запрос записи MX
$ nslookup -query=mx redhat.com
Запрос записи NS
Запись NS (Name Server, сервер имен) содержит соответствие доменного имени DNS-серверу, авторитативному для заданного домена. Ее можно получить при помощи опции -query=ns:
$ nslookup -query=ns yandex.ru
Запрос записи SOA
Запись SOA (Start of Authority, начальная запись зоны) содержит информацию о зоне домена, адрес его администратора, серийный номер и т.д. Ее можно получить при помощи опции -query=soa:
$ nslookup -query=soa yandex.ru
Просмотр всех имеющихся записей DNS
При помощи опции -query=any мы можем просмотреть все записи DNS, которые у нас есть для заданного доменного имени:
$ nslookup -type=any google.com
Обратный поиск DNS
$ nslookup 5.255.255.70
Использование конкретного DNS-сервера
Для разрешения доменного имени можно использовать конкретный сервер имен (в данном случае ns1.redhat.com):
$ nslookup redhat.com ns1.redhat.com
Обратите внимание, что в результате отсутствует фраза «Non-authoritative answer», так как ns1.redhat.com обладает всей информацией о зоне для redhat.com.
Изменение номера порта
По умолчанию DNS-серверы используют порт 53, но при необходимости можно указать другой номер порта посредством опции -port:
$ nslookup port 56 yandex.ru
Изменение интервала ожидания ответа
Интервал ожидания ответа по умолчанию можно изменить, указав желаемое значение в секундах с опцией -timeout:
$ nslookup -timeout=10 google.com
Режим отладки
При помощи опции -debug вы можете включить режим отладки:
$ nslookup -debug redhat.com
В режиме отладки при поиске выводится информация о пакетах.
Интерактивный режим
Для входа в интерактивный режим запустите команду nslookup без опций. Далее можно вводить необходимые имена или адреса, а также устанавливать парметры при помощи команды set, например, следующие команды интерактивного режима:
возвращают результат, аналогичный команде
Конечно, при поиске записей для одного имени использовать интерактивный режим бессмысленно. Но при необходимости работы с большим количеством записей он очень удобен, так как позволяет работать в режиме диалога.
Заключение
Мы рассмотрели основы работы с командой nslookup, а также основные типы записей DNS. Для более подробной информации о команде и ее опциях можно обратиться к соответствующей man-странице.
Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.
This article will introduce the nslookup command which is used for obtaining server records. It will also provide examples of the command’s most popular options.
- Access to the command line interface
- Access to internet
Note: If you are not familiar with DNS record types, we strongly recommend you read DNS Record Types Explained before diving into this article.
Nslookup Syntax
The nslookup command can be used in two modes: interactive and non-interactive. To initiate the nslookup interactive mode, type the command name only:
The prompt that appears lets you issue multiple server queries.
For example, you can type a domain name and receive information about it.
After nslookup outputs the information, it provides another prompt.
In interactive mode, specify an option in a separate line before the query. Precede the option with set:
To exit interactive mode, type:
The non-interactive mode lets you use nslookup to issue single queries. The syntax for the non-interactive mode is:
The command and the query are written in the same line.
Nslookup Options
nslookup comes preinstalled on all major operating systems. If you need to install it again on Ubuntu or another Linux distro featuring the APT package manager, install the dnsutils package:
sudo apt install dnsutils
On CentOS, Fedora, and Red Hat, nslookup is part of the bind-utils package. Install it by running:
sudo dnf install bind-utils
Note: The authoritative answer in the output of the nslookup refers to the answer provided by one of the nameservers belonging to the domain being searched. The non-authoritative answer is provided by a nameserver not associated with the specific domain, e.g., your ISP nameserver.
View Domain’s NS Records
Name Server (NS) records store names of the domain’s name servers. To see a domain’s NS records, type:
The output lists all available name servers:
View Domains MX Records
MX records store all relevant Mail Exchange server data. This information is used to route all email requests for the domain to the appropriate mail server.
Check a domain’s MX data by typing:
The output shows the names of mail servers.
Perform a Reverse DNS Lookup
While nslookup provides information about a domain name, it can also be used to look for the domain name associated with an IP address.
The command outputs the domain name.
View SOA Records
View a domain’s SOA records by typing:
The nslookup command output shows the relevant information:
View Text Records
The output shows each TXT record in a separate line:
View All Records
View all available DNS records of a domain using the any option.
The output shows NS, SOA, MX, and TXT information:
View Information About a Specific Name Server
The output is now limited to the nameserver you specified:
View Pointer Records
Pointer records are used for reverse DNS lookups to confirm that the IP address belongs to a specific domain name. When using the ptr option, type the IP address in reverse, i.e., 1.2.3.4 becomes 4.3.2.1:
Look for the domain name in the output.
Query a Non-Default Port
DNS servers use port 53 to communicate. If you want to check a different port, specify it with the port option:
View Debugging Information
To view information useful for debugging, use the debug option:
Note: In the interactive mode, setting the debug option turns on the debugging mode. To exit the mode, set the nodebug option.
After reading this article, you should know how to install and use the nslookup command on Linux. The article provided examples of the most common uses of nslookup.
From simple to complex configurations, there are times you need to check on how your DNS is behaving. Luckily, computers have a built-in utility that can help you do just that. This resource covers useful commands in Windows Command Prompt and PowerShell. It also touches on the differences between the two shells. Ready? Of course you are, that’s why you’re here, right? Oh, who am I kidding? You probably skipped this part and went straight to the commands. Fine. Be that way.
Windows Command Prompt vs Windows PowerShell
There are several ways to start Windows Command Prompt. One way is to click on the search icon in your taskbar and type “command prompt” or “cmd.” This should put the app at the top of the search window under “Best match.”
If you like keyboard shortcuts like I do, you can press Win + R to pull up the Run command. Type cmd and click okay. Boom, you’re in!
You can access PowerShell in the exact same way as Windows Command Prompt. Instead of typing cmd, you would type PowerShell in the Search or Run Command window. Using the search option is where things differ. If you take the search route, you will see an option for Windows PowerShell and PowerShell ISE. In this resource, I’ll be using the basic Windows PowerShell.
Did you know?: PowerShell ISE is a host application for PowerShell. ISE stands for Integrated Scripting Environment. This option provides an interface, whereas standard PowerShell looks more like Command Prompt.
Windows Command Prompt Commands For DNS
Okay, now for the really good stuff! Here’s several Windows CMD commands that can help troubleshoot or verify your DNS. Don’t worry. I have a very active imagination. I’ll pretend that you didn’t skip all my hard work above and come straight here.
The nslookup command is helpful in diagnosing issues with DNS name resolution. This command is comparable to Mac or Linux’s dig function. It can find the IP address of a host or perform a reverse DNS lookup (to find the domain name of an IP). Nslookup can also provide information on DNS records for your domain.
In this example, I did a simple request for the IP address for DNS Made Easy. In response, I received the IPv6 and IPv4 address for the domain. The reason it says “non-authoritative answer” is because I’m using a recursive server for the query.
If you have an IP address and need the domain name, you can do a reverse DNS lookup. This is the same as the above example, just in—you guessed it—reverse:
Set Command
Let’s say you want to find the nameserver for a domain or set a specific parameter in your command line. For this, you would use the Windows set command. Here’s an example:
(press enter after each command)
The result should look something like this:
DNS Record Lookup
You can also use the nslookup and set command to verify or troubleshoot DNS records for your domain. This process is the same as the above example, but this time, you’ll specify which record you want to query. You can address any errors or issues you discover from this information quickly. In the screenshot below, I performed a lookup for MX, PTR, and SOA records, but of course, you aren’t limited to only those.
Tip: If you’re checking multiple record types, you don’t need to type “nslookup” for each one. After the initial nslookup command, you can run set commands for each record. This applies even if you start verifying records for another domain.
DNS Record Command Results – Definitions
- Serial – This is the serial number of the zone file
- Refresh – The time a secondary DNS server will take to request new information if a primary server’s serial number has changed
- Rety – If a primary server doesn’t respond to a request, it will reconnect within this timeframe
- Expire – Secondary DNS cache expiration time
- Default TTL – Refers to how long a record is cached before it’s refreshed
Tip: It may be helpful to clear your DNS cache before performing commands. To do this, type: ipconfig/flushdns and then press enter. Your cache should now be cleared.
DNS Debug Command
To get additional details about your domain’s DNS, you can use the debug command. This will provide the header information of DNS server requests (see screenshot below).
Ping Command
For network diagnostics, you can run a ping command in CMD. A ping measures the latency of a connection for a target location. For demonstration purposes, I’ll run a ping test using 8.8.8.8, Google’s public DNS address.
You now have the round trip time of how long it takes to get a response from the pinged server.
Traceroute Command
What the command is doing is verifying the route packets take to arrive at their destination. The different stops listed are also called hops. Along with the number of hops, you can see the query resolution time. This information can help you improve your DNS speed or identify problematic routers.
Tip: Command Prompt keeps a history of recent commands. If you need to see a command entered earlier in a session, just hit the up arrow key to scroll through them. See the Gif below for an example of how this works.
DNS Commands for Windows PowerShell
If Windows PowerShell is your preferred utility, this section is for you. These are the PowerShell equivalents of the above Window Commands:
Nslookup – Resolve-DnsName in PowerShell
Nslookup in PowerShell = Resolve-DnsName
Tip: To save time in PowerShell, type the first few letters of a cmdlet and then press tab to autofill the rest. For example, if you type “reso” and then hit tab (reso + tab), PowerShell will populate Resolve-DnsName. This works the same with other cmdlets like Test-Connection. Start typing “test-con” then hit tab for Test-Connection, etc.”
DNS Record Lookup in Windows PowerShell
PowerShell uses its Resolve-DnsName cmdlet for record lookups. To specify what record, you must add “-type” to complete the cmdlet.
Notice that when I entered -Type or -type, the cmdlet ran the same, so this is not case-sensitive
Ping Command in PowerShell
Ping in PowerShell = Test-Connection
The results look different, but you still see the source (computer name) and the hops, as well as the time it took to receive a response.
Traceroute in PowerShell
Online resources are also excellent for troubleshooting DNS. These tools are especially useful as they’re accessible from anywhere and on any device. For instance, the DNS Lookup Tool by Constellix (our sister company) can retrieve DNS records and run checks based on geographic location. It will also query against any nameserver you specify. The records supported are A, AAAA, CNAME, MX, TXT, NS, SOA, and SRV.
There are some additional perks to using Constellix’s DNS Lookup tool. You can run checks against different domains and/or nameservers in the same session. Results can be filtered by domain, record type, resolver, or location, and you can expand or minimize each check. You can also copy the URL of the results and email it to your team, which is convenient and a huge timesaver.
It’s All in a Shell
With the above options, you can verify your DNS and troubleshoot issues. Key points: Command Prompt, PowerShell, and online DNS tools provide nameserver, record instructions, and other DNS information, but they operate differently. CMD uses single-line commands, whereas PowerShell uses cmdlets and can run batch commands. Resources like Constellix’s online DNS Lookup tool run checks based on the details you enter.
Of course, this is nowhere near a comprehensive guide to Command Prompt or PowerShell. They can both do much more. Below are several links that can help deepen your understanding of either utility.
If you liked this, you might find these helpful:
Windows CMD commands list
PowerShell Cmdlets List
Introducing Windows PowerShell
What is Nslookup?
There are Nslookup online tools too. You can access such a site full of online network tools and search for the option for nslookup. You can define your query for a specific DNS record, to identify the domain, the port in use, and timeout in seconds. For better security, we recommend you to use the software on your computer.
If you want high speed, you must use Anycast DNS services! Check this article about Anycast DNS!
https://youtube.com/watch?v=wxsB0wsjXPo%3Ffeature%3Doembed
How to install the Nslookup command?
1. Check what distro do you use. We will show you how to install the Nslookup command on Ubuntu, Debian, Linux Mint, Kali Linux, CentOS, Fedora, Red Hat, Arch Linux, and Manjaro.
For Ubuntu, Debian, Kali Linux, and Linux Mint:
$ sudo apt-get update
and then:
$ sudo apt-get install dnsutils
For CentOS, Fedora, and Red Hat:
$ sudo dnf install bind-utils
For CentOS, Fedora, and Red Hat (Earlier versions):
$ sudo yum install bind-utils
For Arch Linux and Manjaro:
$ sudo pacman -S dnsutils
3. Now, you are ready to use the Nslookup command on your device and try the examples below.
The Nslookup syntax is very simple, and you can use it the same on different OSes.
Options. First, you will put the option you want to use with the domain name or IP address. The option can be related to the type of DNS record, timeout, a port in use, debugging, or another.
Name. Here you will put the hostname (domain name) or IP address. It is the target of your DNS query.
Additional Options. Depending on the query, you can add an extra option as a parameter.
Server. You can use the default server for your query or specify another one from where you want the DNS query to be performed.
Command not found – how to fix it?
You can use this command to see how many A records are there and see the IP Addresses of each one.
Command line:
$ nslookup example.com
Searching for e great Managed DNS service? Test ClouDNS for free!
How to check the NS records of a domain.
By checking the NS records, you can see which is the authoritative server for a specific domain.
Command line:
$nslookup -type=ns example.com
How to query the SOA record of a domain.
With this one, you can see the start of authority and get information about the zone.
Command line:
$nslookup -type=soa example.com
30-day Free Trial for Premium Anycast DNS hosting
How to find the MX records responsible for the email exchange.
Here we are checking the MX records of the mail servers. You can see if all the mail servers are working well.
Command line:
$ nslookup -query=mx example.com
How to find all of the available DNS records of a domain.
This lookup has a large scope. Here we want to see all the available DNS records. After seeing all of them, we can do specific lookups for different types of DNS records.
Command line:
$ nslookup -type=any example.com
How to check the using of a specific DNS Server.
Apart from checking DNS records, you can use the Nslookup to review a particular DNS server and how it works. You can check if it is active or if it responds on time.
Command line:
$ nslookup example.com ns1.nsexample.com
How to check the Reverse DNS Lookup.
Many times you check the A records to see the IPs of a domain, but sometimes you need to verify if an IP address is related to a specific domain. For that purpose, we need a reverse DNS lookup.
Command line:
$ nslookup 10.20.30.40
How to check for a PTR record?
You can verify if an IP address belongs to a domain name by performing a reverse DNS query. For this purpose, you will need to check the PTR record that links an IP address to a domain name. You will need to put the IP address in reverse (185.136.96.96 changes to 96.96.136.185), and you need to add in-addr.arpa because it is stored in arpa’s top-level-domain.
Command line:
$ nslookup -type=ptr 96.96.136.185.in-addr.arpa
How to change the timeout interval for a reply.
You can manually choose the timeout time in seconds. You can increase it to give more time for the server to respond. You can also shorter it to see which servers can respond quicker.
Command line:
$ nslookup -timeout=20 example.com
How to enable debug mode.
Debug mode provides important and detailed information both for the question and for the received answer.
Command line:
$ nslookup -debug example.com
Why you need to use it?
Nslookup is one of the popular command-line software for DNS probing. You can use it to monitor your network and spot problematic areas. If you are interested in similar tools, you can see Ping, Traceroute, Dig, and HostYou can use them together or find one that covers all of your diagnostic needs.
Need more details what is nslookup? Check the nslookup page on wikipedia.
Conclusion
The Nslookup command is a great utility that offers many functionalities. One of its main advantages is that it is available for all kinds of operating systems, like Windows, Linux, and macOS. In case you do not have it already, you can install it in several easy steps. When you are ready, you can start testing your network easily and quickly! The Nslookup command is amazing and stands out among the DNS probing commands!
Notes
(Visited 516,555 times, 35 visits today)
Hello! My name is Boyan Peychev, and I am the Founder and CEO of ClouDNS. I enjoy writing and sharing valuable information in a simple and easy-to-understand manner.
10 most used Nslookup commands
What is Nslookup? Check the 10 most used Nslookup commands that will help you to understand better your domain’s management.
Authored by: Rackspace Support
There are many reasons why you might need to check the status of your Domain
Name System (DNS) records. For example, you might need to verify that updates
are correct or troubleshoot issues with accessing a service.
Check a DNS record
To check a specific DNS record, you need to specify the nslookup command,
an optional record type (for example, A, MX, or TXT), and the host name
that you want to check.
Note: If you omit the record type, it defaults to A.
The first two lines of output specify the server to which the request
was directed. This server is the default server that your system uses for DNS
name resolution.
The second section gives the name of the record and the corresponding Internet
Protocol (IP) address. However, the answer in this section is
non-authoritative because it originates from a server
(cachens1.lon.rackspace.com) that isn’t the root source for those records.
To get an authoritative answer you need to specify the authoritative (primary)
name server at the end of the request.
The address labeled primary name server is the DNS authority for the
domain.
If you add the address of the authoritative name server
(ns.rackspace.com) to the first command, the record is now checked
against that name server.
Check when a cached record expires
DNS uses caching, which reduces the load on authoritative name servers.
However, as a result, records might be outdated. If the authoritative and
non-authoritative answers differ, you have a cached response from the resolver
name server that you’re using. The length of time that a record is cached
depends on its time-to-live (TTL) value. The TTL is a number that is
specified in seconds.
- The first Got answer section of this example is used to get the
host name of the server from which you are requesting the A record.
In this example, the host name is cachens1.lon.rackspace.com. - The second Got answer section relates to your actual request.
- The QUESTIONS section shows that the request was for A records
for rackspace.co.uk. - The ANSWERS section displays one record with an IP address of
212.64.133.165 and a TTL of 279 seconds (4 minutes 39 seconds). - The AUTHORITY RECORDS section specifies the name servers that
correspond to the domain. - The ADDITIONAL RECORDS section lists A records for the name servers
that are listed in the authority records section.
This response shows that the name server that the client computer uses will
reuse the same A record for rackspace.co.uk for the next 4 minutes and 39
seconds. If you run the same command on the authoritative name server, you
see the current maximum TTL for the record.
В этой статье мы расскажем, что такое DNS Lookup и как узнать, какие DNS-записи прописаны для домена с помощью утилиты NSLOOKUP.
Что такое NSLOOKUP
Однако посмотреть DNS может не только браузер. Любой пользователь может получить информацию о записях через сервис Whois или через NSLOOKUP. NSLOOKUP — это утилита, которая позволяет через командную строку узнать содержимое DNS. Утилита поможет:
Как использовать утилиту NSLOOKUP
В Windows и macOS утилита встроена, поэтому можно сразу переходить в терминал и начинать с ней работать. Для Linux-систем иногда нужна её установка.
Для установки утилиты в CentOS и Ubuntu в терминале введите:
Для установки утилиты в Debian введите:
Теперь можно переходить к работе с утилитой. Если вы хотите сделать несколько запросов NSLOOKUP, можно включить утилиту в интерактивном режиме. Тогда вам не придется каждый раз писать nslookup в командах. Для этого введите:
Чтобы выйти из интерактивного режима, введите exit.
Как узнать A-запись домена
Где site.ru ― доменное имя, А-запись которого вы хотите узнать.
Вы увидите следующую информацию:
NSLOOKUP: указать DNS-сервер
Как узнать MX-запись
При создании электронной почты в ресурсных записях прописывают .
Для определения MX-записей введите команду:
nslookup –type=MX site.ru
Где site.ru ― нужный домен.
Перед вами появится вывод:
DNS MX lookup
Как определить NS-записи домена
Утилита NSLOOKUP позволяет определить, какие NS-серверы использует сайт.
Для этого введите команду:
nslookup –type=ns site.ru
Где site.ru ― нужное доменное имя.
Перед вами появится список NS:
Как определить SOA-запись
SOA-запись (Start of Authority) — начальная запись зоны, которая указывает местоположение эталонной записи о домене. Она содержит в себе контактную информацию лица, ответственного за зону, время кэширования информации на серверах и данные о взаимодействии DNS.
Для определения SOA-записи введите команду:
nslookup –type=SOA site.ru
Как изменить интервал ожидания
Когда интернет слабый, для ответа сервера нужно больше времени, чем обычно. Если ответ не приходит в течение 5 секунд, запрос либо повторяется, либо появляется ошибка. Чтобы ответ от сервера успел дойти, нужно увеличить время ожидания. Для этого введите команду:
nslookup –timeout=10 site.ru
- 10 ― это количество секунд, за которое должен прийти ответ,
- site.ru ― нужное доменное имя.
Что значит authoritative и non-authoritative
В ответе на любую команду утилита показывает, с какого сервера была получена информация. Ответ приходит от серверов двух типов:
- authoritative,
- non-authoritative.
Authoritative answer (авторитетный ответ) – это ответ, который получен от основного (официального) сервера. Non-authoritative answer (неавторитетный ответ) – это ответ от промежуточного сервера. Например, на скриншотах из нашей статьи можно увидеть, что ответ приходил от non-authoritative сервера:
Обратите внимание! На промежуточном сервере может храниться кэшированная копия DNS. Если запись DNS была изменена недавно, кэшированная копия может содержать неактуальную информацию.
Настройка ресурсных записей на хостинге
О назначении ресурсных записей читайте в статье: Что такое ресурсные записи DNS?
Эта инструкция вам подойдёт, если у вас заказан хостинг REG.RU и для домена указаны DNS-серверы ns1.hosting.reg.ru и ns2.hosting.reg.ru. В этом случае ресурсные записи настраиваются в панели управления веб-хостингом (ISPmanager, cPanel и Plesk). Как узнать, какие DNS-серверы указаны для домена?
Если у вас нет хостинга REG.RU и для домена указаны ns1.reg.ru и ns2.reg.ru, воспользуйтесь инструкцией: Настройка ресурсных записей в Личном кабинете.
Для управления ресурсными записями на хостинге
Чтобы управлять настройками домена в панели управления, убедитесь, что у вас заказан хостинг.
Доверьте сайт профессионалам: быстрая работа и круглосуточная техническая поддержка.
Как создать новую ресурсную запись?
Откройте вашу панель управления и следуйте соответствующей инструкции.
Перейдите в раздел «Управление DNS», кликните по названию домена и нажмите Управлять DNS записями:
На открывшейся странице нажмите нажмите Создать запись:
Готово, ресурсная запись добавлена в зону домена. Изменения вступят в силу в течение часа.
Обратите внимание: если вид вашей панели управления отличается от представленного в статье, в разделе «Основная информация» переключите тему с paper_lantern на jupiter.
В разделе «Домены» откройте Редактор зоны. В строке нужного домена нажмите Управлять. Для добавления новой записи нажмите + Добавить Запись:
Обратите внимание: если внешний вид вашей панели управления отличается от представленного в инструкции, перейдите в раздел «Сайты и домены» и в правом верхнем углу измените вид на «Активный».
В разделе «Сайты и домены» для нужного домена откройте Настройки DNS. Для добавления новой записи нажмите Добавить запись:
Добавление MX-записи
Обратите внимание: если внешний вид вашей панели управления отличается от представленного в инструкции, кликните в левом нижнем углу «Попробовать новый интерфейс».
Выберите тип записи MX. В графе «Имя» укажите домен, для которого нужно добавить MX-запись. В поле «Приоритет» задайте приоритет. В поле «Домен» добавьте почтовый сервер вашей почты (например: mx1.hosting.reg.ru.). Затем нажмите Ок. Важно: данные в графах «Имя» и «Домен» добавляются с точкой в конце.
Выберите тип записи MX. В графе «Имя» укажите домен (обязательно с точкой в конце), для которого нужно добавить MX-запись. В поле «Приоритет» задайте приоритет. В поле «Место назначения» добавьте почтовый сервер вашей почты (например: mx1.hosting.reg.ru.). Затем нажмите Сохранить Запись.
Выберите тип записи MX. В графе «Почтовый сервер» укажите сервер, для которого нужно добавить MX-запись. Задайте приоритет почтового сервера и нажмите Ок:
Добавление CNAME-записи
Выберите тип записи CNAME. Введите в графу «Имя» — поддомен, который будет адресован на домен, указанный в поле «Домен». Нажмите Ок. Важно: данные в графах «Имя» и «Домен» добавляются с точкой в конце.
В раскрывающемся блоке выберите тип записи CNAME. В графе «Имя» введите поддомен (обязательно с точкой в конце), который будет адресован на домен, указанный в поле «Запись». Затем нажмите Сохранить Запись.
Выберите тип записи CNAME. В поле «Имя домена» укажите поддомен, для которого добавляется запись. В поле «Каноническое имя» введите домен и нажмите Ок:
Добавление TXT-записи
Выберите тип записи TXT. В поле «Имя» укажите домен или поддомен с точкой в конце (например: faq-reg.ru.), к которому будет привязана запись, а в поле «Значение» — данные записи. Затем нажмите Ок:
В раскрывающемся блоке выберите тип записи TXT. В поле «Имя» введите имя домена (обязательно с точкой в конце), а в поле «Запись» внесите данные TXT-записи. Нажмите Сохранить запись:
Выберите тип записи TXT. При необходимости добавьте поддомен в графу «Имя домена». В поле «TXT-запись» внесите данные записи и нажмите Ок:
Как изменить или удалить ресурсную запись
Откройте вашу панель управления и следуйте соответствующей инструкции:
Перейдите в раздел «Управление DNS», кликните по названию необходимого домена и нажмите Управлять DNS записями. Чтобы изменить или удалить существующую запись, выделите её и нажмите соответствующую кнопку:
В разделе «Домены» откройте Редактор зоны. Для изменения или удаления существующей записи в строке нужного домена нажмите Управлять. Затем нажмите Редактировать или Удалить напротив нужной записи:
В разделе «Сайты и домены» для нужного домена откройте Настройки DNS. Чтобы удалить запись, выберите нужную запись и нажмите на кнопку Удалить:
Что дальше?
Дождитесь обновления зоны домена. Оно занимает от 15 минут до 1 часа. Если вы предварительно изменили DNS-серверы домена, обновление информации займёт до 24 часов. После того как зона обновится, изменения вступят в силу (например, будет инициирован выпуск SSL-сертификата или домен будет привязан к хостингу и т.д.)
Как проверить?
Проверить, корректно ли указаны записи вы можете с помощью утилиты dig. Введите домен, в зоне которого добавлялись ресурсные записи, выберите тип записи «ANY» и нажмите Проверить. Ниже вы увидите все ресурсные записи, прописанные для вашего домена.
Привет, мир! Рассказываем про 10 самых часто используемых команд nslookup.
Что такое nslookup?
Определение NS-записей домена
nslookup –type=ns merionet.ru
Определение SOA записи узла
SOA-запись (Start of Authority) — начальная запись зоны, которая указывает местоположение эталонной записи о домене. Она содержит в себе контактную информацию лица, ответственного за данную зону, время кэширования информации на серверах и данные о взаимодействии DNS. SOA-запись создается автоматически. Для определения SOA записи используется команда:
nslookup –type=SOA merionet.ru
Как найти MX-запись хоста
Электронная почта сегодня используется повсеместно. Чтобы отправлять и получать электронные письма хост используется тип записи MX. В каждой MX-записи хранятся два поля:
- имя почтового сервера, который обслуживает домен
- порядковый номер, по которому определяется какой сервер первым будет обрабатывать запросы клиентов
Для определения MX-записей хоста используется команда:
nslookup –type=MX merionet.ru
Определение всех типов DNS-записей
nslookup –type=any merionet.ru
Явное указание DNS-сервера
nslookup merionet.ru dns2.yandex.ru
Как видно из скриншота, ответ нам вернул уже сервер Яндекса.
Обратный DNS lookup
Изменение номера порта для запроса
По умолчанию, для запросов DNS использует 53 (UDP) порт. Но это поведение тоже можно изменить, хотя особого необходимости в этом нет.
nslookup –port=56 merionet.ru
Бывают случаи, особенно при слабых Интернет соединениях, что ответа от сервера приходится ждать долго. По умолчанию, если ответ не приходит в течении 5 секунд, то запрос повторяется, увеличив время ожидания в два раза. Но можно вручную задать это значение в секундах:
nslookup –timeout=10 merionet.ru
Отработку этой команды увидеть сложно, но она может быть эффективна при соединениях с низкой скоростью.
Включение режима отладки
Режим отладки позволяет получать более детальную информацию об узле. Для этого используется команда:
nslookup –debug merionet.ru
Когда утилита nslookup возвращает ответ, там указывается с какого сервера вернулся ответ. Эти сервера бывают authoritative и non-authoritative answer.
Authoritative answer – это ответ, полученные непосредственно от сервера, который располагает информацией об указанном домене. В нашем случае – это dns2.yandex.ru. Non-authoritative answer – это ответ, полученный от промежуточного сервера. В нашем случае – это мой роутер.