Если серверы доменов верхнего уровня возвращают только домены серверов имен, как поставщики DNS связываются с указанными серверами имен?

629
user48147

Итак, как я понимаю, после того, как провайдер DNS (например, Google 8.8.8.8) запросил корневые серверы имен для серверов домена верхнего уровня (например, «com»), он запрашивает у сервера имен верхнего уровня домен, например: серверы имен google.com. Сервер имен верхнего уровня возвращает что-то вроде ns1.google.com. Итак, как DNS-провайдер узнает IP-адрес ns1.google.com? Каждое объяснение, которое я прочитал, кажется, затуманивает эту тему.

1
[Как работают серверы доменных имен] (http://computer.howstuffworks.com/dns.htm/printable) DavidPostill 6 лет назад 0

2 ответа на вопрос

1
Joe

This is called a glue record and exists at the higher level of the registry than the domain in question.

https://serverfault.com/questions/309622/what-is-a-glue-record

From the linked SF answer:

A glue record is a term for a record that's served by a DNS server that's not authoritative for the zone, to avoid a condition of impossible dependencies for a DNS zone.

Say I own a DNS zone for example.com. I want to have DNS servers that're hosting the authoritative zone for this domain so that I can actually use it - adding records for the root of the domain, www, mail, etc. So, I put the name servers in the registration to delegate to them - those are always names, so we'll put in ns1.example.com and ns2.example.com.

There's the trick. The TLD's servers will delegate to the DNS servers in the whois record - but they're within example.com. They try to find ns1.example.com, ask the .com servers, and get referred back to... ns1.example.com.

What glue records do is to allow the TLD's servers to send extra information in their response to the query for the example.com zone - to send the IP address that's configured for the name servers, too. It's not authoritative, but it's a pointer to the authoritative servers, allowing for the loop to be resolved.

0
Rafed Muhammad Yasir

DNS responses come in pairs. It returns the domain name and the corresponding IP address. In your case, along with ns1.google.com it's corresponding IP is also returned.

Top level nameserver doesnt return ns1.google.com. The returns are something like this:

  • You -> 8.8.8.8 (asking IP for www.google.com)
  • 8.8.8.8 -> root server: returns a IP of .com
  • 8.8.8.8 -> .com: returns IP of google.com
  • 8.8.8.8 -> google.com: returns IP of ns1.google.com (ns2, ns3, ns4 .... as well)
  • 8.8.8.8 -> ns1.google.com: returns IP of www.google.com
  • 8.8.8.8 -> You (now you can go to www.google.com)