You are not logged in.

#1 2013-02-01 17:31:07

fpilee
Member
From: Windows 7
Registered: 2011-10-06
Posts: 104
Website

Changing the default dns server

I have edited the file /etc/resolv.conf and added the nameserver of the google public dns.  How can i verify if google dns are used?

Offline

#2 2013-02-01 17:36:10

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,582
Website

Re: Changing the default dns server

Install dnsutils.

[bill@Jeremiah ~]$ pacman -Ss dnsutils
core/dnsutils 9.9.2.P1-1 [installed]
    DNS utilities: dig host nslookup

[bill@Jeremiah ~]$ dig www.google.ca

; <<>> DiG 9.9.2-P1 <<>> www.google.ca
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43374
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.google.ca.                 IN      A

;; ANSWER SECTION:
www.google.ca.          300     IN      A       173.194.75.94

;; Query time: 74 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Feb  1 14:03:13 2013
;; MSG SIZE  rcvd: 58

This is the output of my machine which is set to use Google DNS.  Notice the "SERVER" part: 8.8.8.8 which is Google DNS.

Also, once you've edited resolv.conf then a reboot may overwrite your settings.

Put:

nameserver 8.8.8.8
nameserver 8.8.4.4

In it for Google DNS, THEN:

sudo chattr +i resolv.conf

To make it immutable so no other program can overwrite (change) the file.  If you ever want the file to be changeable again "chattr -i resolv.conf"

Last edited by headkase (2013-02-01 17:41:22)


We all make choices, but in the end, our choices make us.

Offline

#3 2013-02-01 17:45:59

fpilee
Member
From: Windows 7
Registered: 2011-10-06
Posts: 104
Website

Re: Changing the default dns server

Thanks.

;; Query time: 251 msec
;; SERVER: 11.0.0.3#53(11.0.0.3)
;; WHEN: Fri Feb  1 14:44:04 2013
;; MSG SIZE  rcvd: 65



;; Query time: 506 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Feb  1 14:44:14 2013
;; MSG SIZE  rcvd: 65


Should i use the default dns server. Google dns take more time tongue rigth?

edit:

;; Query time: 60 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Fri Feb  1 14:46:55 2013
;; MSG SIZE  rcvd: 65


The second server of google is more fast i think.

Last edited by fpilee (2013-02-01 17:47:55)

Offline

#4 2013-02-01 17:51:12

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,582
Website

Re: Changing the default dns server

506 msec does seem to be quite the time.  You could try OpenDNS too and see what kind of time you get from them:

# OpenDNS nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220

And of course compare that against your ISP query time.  I use Google DNS because of their policies and it is "fast enough" for me.  If you find your page loading is slow especially with pages that have a high number of elements like images then that query time may be too slow.  Browse a bit, is it good enough?

Edit:  Yes, the second server seems to be totally fine.. wink

Last edited by headkase (2013-02-01 17:51:58)


We all make choices, but in the end, our choices make us.

Offline

Board footer

Powered by FluxBB