Mobile app version of vmapp.org
Login or Join
Deb1703797

: How does DNS detect changes in nameserver IP address? Suppose I have a domain such as example.com and I configure the domain's primary and secondary nameserver to be ns1.example2.com and ns2.example2.com.

@Deb1703797

Posted in: #Dns #Nameserver

Suppose I have a domain such as example.com and I configure the domain's primary and secondary nameserver to be ns1.example2.com and ns2.example2.com.

Questions:


Does the IP address of the nameservers get retrieved and stored in the registry's database (ie VeriSign for .com domains) at the time I set these nameservers for my example.com domain? Or is it both the IP and the domain name for the nameservers as well?
If both pieces of information is stored, what happens if at some point in time the IP address of the nameserver itself is changed? I mean how would the registry know about the IP address change?


EDIT: The question is not about what happens if the web host’s IP address changes but rather what happens if the nameserver’s IP address changes. I know this would not normally happen as all nameservers would have a static IP. But let's say that the nameserver is moved to another physical server on another network and hence it is given a new IP address. In this case wouldn't the domain name system have an issue with this due to the fact that the nameserver itself cannot be found?

Thinking this through for a moment, and someone please correct me if my thinking is incorrect here. Assume no cache is used throughout and the domain name example.com needs to be resolved to find the web host's IP address.

Step 1: The root will be queried which will return the nameservers for the .com TLD.

Step 2: The .com nameservers will be queried and this will return the nameservers for example.com. The information that we would get as a result of this query will be something like:


ns2.example2.com internet address = 216.239.34.10
ns1.example2.com internet address = 216.239.32.10


Now, won't these IP address that are being returned be out of date? One way I can think of so that the .com nameservers could possibly keep these in sync every time is if the .com nameservers resolved ns2.example2.com in real time every time the query for the example.com domain was made! Obviously this can't be happening because it would create even more load on the .com nameservers.

This is the part I don't quite understand about the Domain Name System and hence my questions.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

3 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

(posting this as an answer cos I can't comment yet)

The records that gets stored on the TLD name servers that indicate where to find the name servers for a given domain are called Glue Records, just mentioning that since that might be the terminology that your registrar uses in it's documentation.

Without the glue records if you use name servers whos names are under the same domain as the domain they are serveing (as with your example.com and ns1.example2.com and ns2.example2.com example) then there will be no way for something trying to look up a record under example.com to find it - it's a "Chicken and the Egg" problem.

If your nameservers have names that are outside the domain then you don't need glue records.

Another thing to watch out for is that when adding glue records some registrars expect you to enter the hostname part of the name (ns1 and ns2 in your example) - the registrar then adds on the rest of the domain. If you used the full name (e.g. ns1.example.com) you'd end up with ns1.example.com.example.com, which wouldn't work.

10% popularity Vote Up Vote Down


 

@Voss4911412

Suppose I have a domain such as example.com and I configure the domain's primary and secondary nameserver to be ns1.example2.com and ns2.example2.com.

Prior to configuring nameservers for your domain, you would need to register each nameserver at your domain's registrar, which requires the hostname and the IP address for the nameserver. Example steps for one registrar can be viewed here.

Does the IP address of the nameservers get retrieved and stored in the registry's database (ie VeriSign for .com domains) at the time I set these nameservers for my example.com domain?

The domain registrar will update the authoritative DNS server of the registry for the TLD with the nameserver's hostname and IP address. The time-frame for this update is dependent upon the registrar, however most major ones preform the update fairly quickly. For .com nameservers, you can view these updates using Verisign’s WHOIS tool (click the Name Server tab).

If both pieces of information is stored, what happens if at some point in time the IP address of the nameserver itself is changed? I mean how would the registry know about the IP address change?

To update the IP address of the nameserver, you would edit the IP address of the nameserver host at your domain registrar, who will then update the authoritative DNS server for the TLD. Example steps can be viewed here.

After these updates are made at the authoritative DNS server-level with the registry, DNS servers around the world will query them and update their DNS databases. It takes time for this to occur, which is why DNS changes need time to propagate in order to be resolved by clients everywhere.

Caching is done on all levels to reduce the load across the entire distributed system. Clients first check their own cache for the host, and if missing or expired will query the DNS servers of your network provider, ISP, or public DNS servers, which update on a periodic basis and may not resolve nameserver IP changes immediately.

For additional information, see: How DNS Works

10% popularity Vote Up Vote Down


 

@Nimeshi995

DNS servers are pretty simple but kinda complex at the same time and I'll do my best to describe what happens as shortly as possible.

Basically every domain has a Zone File that contains information about where it points too, such as MX records for email and A records for IP addresses. Querying each domain every time would be resourceful and so that's why we have DNS servers that store information such as the IP address. So when you visit Pro Webmasters your broadband queries the DNS server for the IP address, without this your site would only be accessible knowing the IP address.


I mean how would the registry know about the IP address change?


DNS servers cache data but they also expire this data after X Hours or Days. This is why propagation can take a few hours to a few days, DNS servers work on intervals and expires, so if your IP address changes it may take some hours or even days depending on the domain type. Most DNS servers have priority on .com's and country level domains as they believe these are more important as say .info or .name

But generally for 99.9% of web hosts and other hosting services will use static IP addresses so they never change and this is only an issue when switching one server to another when being issued a new IP address.

If you have a dymantic IP that regularly changes then you need a DDNS Service that rapidly updates the IP, this is different technology and actually they use there own IP addresses that mask over. Hope this answers your question ;)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme