Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 24
Originally Posted by bforbes How can I determine what DNS server my computer is currently using? My resolv.conf just has my gateway in it, and the gateway router gets the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677

    Quote Originally Posted by bforbes View Post
    How can I determine what DNS server my computer is currently using? My resolv.conf just has my gateway in it, and the gateway router gets the DNS servers automatically from my ISP.
    Not all your setups will only have one server listed in resolv.conf, yours seems to be an exception to the rule. So use DIG/NSLOOKUP if you want to know what dns server is being used. That is the point I am trying to get across to you.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  2. #12
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    Thanks, this has been very illuminating. Should I add other entries in resolv.conf below the router IP in case the ISP DNS servers go down, or are there other reasons?

  3. #13
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    The idea is good but here is the catch. Your resolv.conf file is over written everything the network is rebooted because you are using DHCP. That being said everything you place in it now will be lost at next reboot of the network.

    I would be intersted in knowing what router you are using?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #14
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    It's a Netgear DG834. So if I can't seem to resolve any hostnames, do I have to manually enter in some alternative DNS servers?

  5. #15
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Talk with your ISP and let them tell you the DNS servers they have.
    Then if you like you can add them to your resolv.conf.

    I don't know netgear or why it only supplies 1 DNS server. Might be that your ISP is only sullying one server.
    I use Linksys and it supplies all the DNS server that my ISP sends with DHCP answers.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #16
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    Actually the Netgear gives two DNS servers that it got from the ISP. I guess I could record those for future reference.

  7. #17
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    The default configuration on many home routers is that the DHCP server on the router only lists itself as the DNS server in the DHCP info sent to clients. The router then forwards any requests to the DNS servers it gets from the ISP.

    You can set the ISP's DNS servers in your resolv.conf, but then you will also need to tell the DHCP client on your desktop not to update/overwrite the resolv.conf.

  8. #18
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    I checked the man pages for resolv.conf and dhclient but I didn't see any mention of overwriting resolv.conf. Is there another service that controls this behaviour?

  9. #19
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    Google > linux dhcp resolv.conf

    Read/search for whatever distro you're running.

  10. #20
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    Thanks. I found a couple of different approaches:

    Ubuntu resolv.conf overwriting A dig (kannadiga) in Amchi Mumbai
    How To: Make Sure /etc/resolv.conf Never Get Updated By DHCP Client

    I haven't had a chance to try them yet, I will post my results.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •