DNS on computer or router? Which setting actually matters?

Kaustubh Katdare

Kaustubh Katdare

@thebigk Oct 26, 2024
I've been experimenting with different DNS and wondering whether I should rely on the DNS setting on my computer or on the router? My current network setting is very typical:

{Computers, Phones, other Wi-Fi Devices} --> Wi-Fi Router --> ONT Device (FTTH) --> Internet

I can specify the DNS on my computer through the network settings or even set it up in my router. I've typically use <a href="https://www.crazyengineers.com/threads/fastest-dns-available-in-india.73669">Fastest DNS available in India</a> which I believe offers the fastest overall access in India. However, sometimes the DNS just makes the web pages crawl (not sure if it's actually a DNS problem though). I'm therefore thinking of having BSNL's own DNS or OpenDNS as backup option.

Can someone tell me what'd be the ideal setup? Should I keep altering the DNS on my machine or on the router to find the one that works the best?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • rahul69

    rahul69

    @rahul69-97fAOs Jun 12, 2015

    DNS settings matter on computer. Not sure about router, as router is supposed to deal with IP addresses, so DNS should not be required on router.
  • lovejeet

    lovejeet

    @lovejeet-etHdkD Jun 13, 2015

    DNS is the record entry with maps your hostname with its respective IP.

    The websites we browse have URLs, say Translate.google.com, and your machine can't communicate the web server with the URL, but the IP.

    To understand this real easy, try pinging a website in cmd, and you would get an IP associated with it.

    Now, for the query, it makes more sense to have DNS on Computer, as the translation of URL will take place on Computer and not on Router.

    Hope it helps.
  • durga ch

    durga ch

    @durga-TpX3gO Jun 13, 2015

    by default your router acts as DNS for your network. Since DNS is hierarchical lookup its the responsibility of the gateway (router) to lookup for DNS queries. Mostly, the DNS server what your home gateway uses will be its own gateway or in short the ISP DNS server.
    How do we know this :
    nslookup

    $ nslookup
    > dns
    Server: 192.168.1.1
    Address: 192.168.1.1#53


    This can then be confirmed by verifying the same using wireshark. If you look at the below sreenshot, the DNS query is directed to my gateway
    DNS1

    now, I change my settings of DNS on my computer, effectively instructing my gateway that I need my DNS queries to be directed o google DNS.
    $ nslookup
    > dns
    Server: 8.8.8.8
    Address: 8.8.8.8#53


    a wireshark dump of a DNS query as below:
    DNS2

    so pretty much changing DNS settings on your computer is sufficient but incase you need the change to be effective for the whole network, altering DNS on the router is advised.
  • Ashraf HZ

    Ashraf HZ

    @Ash Jul 21, 2015

    DNS settings on your PC takes higher precedence over router DNS settings, and its for your PC only. The router DNS settings will only be used if you set your device DNS setting to obtain automatically (or in general, obtain IP via DHCP).