Can changing DNS affect ping time?

8,796

No. DNS lookup is made prior to starting the ping, and the same IP is used for each echo request, which are timed separately. the total time to perform 3 echoes is affected by the time to complete the initial lookup, but this aggregate should not be how you measure "ping time".

So while DNS resolution will have a huge impact on practical tasks like loading a modern web page (which loads content from many different domains, each of which requires its own lookup), it will have effectively no impact on individual ping results.

Note that most OS's cache IP/domainname mappings, so you don;t need to go out to DNS for addresses you have already resolved. That means that as long as the cache contains the address requested, it will never take the time to perform the lookup again

Its not necessarily bad advice to seek a better connected DNS server, but will not help ping time.

If you are concerned about DNS performance, look into DNS Benchmark from the Gibson Research Center: https://www.grc.com/dns/benchmark.htm

Share:
8,796

Related videos on Youtube

BharathYes
Author by

BharathYes

Apparently, this user prefers to keep an air of mystery about them.

Updated on September 18, 2022

Comments

  • BharathYes
    BharathYes over 1 year

    I was facing high ping time while playing LoL game. After browsing few forums many suggested changing the DNS setting to that of Google's (8.8.8.8 and 8.8.4.4).

    My question is can this actually work? Will just using a different DNS affect ping to a particular server? If so how can that be possible if DNS is only used for converting the URL to a static IP.

    I was also of the opinion that most game servers used static IP and not URLs. Then will DNS even play a role here ?

  • Arjan
    Arjan over 7 years
    Minor addition: for content delivery networks, different worldwide servers might be able to deliver the same content. In theory, I guess different DNS servers could yield different IP addresses (or in a different order), which could yield different ping results then. (Not likely to affect gaming though.) Also, I guess that filtering DNS servers might lower the time-to-live? (To allow changes in the filtering settings to be effective as soon as possible.)