Results 1 to 5 of 5

Thread: Checking to see if DNS address was set

  1. #1
    Join Date
    Feb 2010
    Beans
    2

    Question Checking to see if DNS address was set

    Hello

    I am having issues with an ISP's DNS server that is given to my laptop when I connect to the ISP's wireless router. I changed the wireless connection method to Automatic (DHCP) address only and set the DNS to Google's dns servers (8.8.8.8 and 8.8.4.4). I'm pretty sure that the new DNS is set because I am able resolve and browse websites quicker. But I can't seem to 100% verify that the new DNS is actually set.

    Nothing gets written to /etc/resolv.conf and I don't want to set a permanent DNS because all my other ISP's DNS work fine. I just need it for this particular ISP router. The /var/lib/dhcp/dhclient.leases shows the ISP's DNS address but this could just be what the dhcp client picks up.

    The only thing I can find is by monitoring the /var/log/syslog and finding the following messages:
    Oct 4 00:36:31 <hostname> NetworkManager[856]: <info> nameserver '209.18.xx.xx'
    Oct 4 00:36:31 <hostname> NetworkManager[856]: <info> nameserver '209.18.xx.xx'
    Oct 4 00:36:32 <hostname> dnsmasq[1668]: using nameserver 8.8.4.4#53
    Oct 4 00:36:32 <hostname> dnsmasq[1668]: using nameserver 8.8.8.8#53

    It seems that the ISP nameserver gets picked up but then the Google namesever is used. If I set the wireless back to DCHP for address and DNS the ISP nameserver shows up as the nameserver in the four messages above. I'm pretty sure that the google ones are being used but I would really like to know if there is a file or a command to be 100%. Any help would be appreciated.

    Thanks

  2. #2
    Join Date
    Sep 2012
    Location
    Virginia, USA
    Beans
    209
    Distro
    Ubuntu Development Release

    Re: Checking to see if DNS address was set

    Quote Originally Posted by Randhier View Post
    Hello

    I am having issues with an ISP's DNS server that is given to my laptop when I connect to the ISP's wireless router. I changed the wireless connection method to Automatic (DHCP) address only and set the DNS to Google's dns servers (8.8.8.8 and 8.8.4.4). I'm pretty sure that the new DNS is set because I am able resolve and browse websites quicker. But I can't seem to 100% verify that the new DNS is actually set.

    Nothing gets written to /etc/resolv.conf and I don't want to set a permanent DNS because all my other ISP's DNS work fine. I just need it for this particular ISP router. The /var/lib/dhcp/dhclient.leases shows the ISP's DNS address but this could just be what the dhcp client picks up.

    The only thing I can find is by monitoring the /var/log/syslog and finding the following messages:
    Oct 4 00:36:31 <hostname> NetworkManager[856]: <info> nameserver '209.18.xx.xx'
    Oct 4 00:36:31 <hostname> NetworkManager[856]: <info> nameserver '209.18.xx.xx'
    Oct 4 00:36:32 <hostname> dnsmasq[1668]: using nameserver 8.8.4.4#53
    Oct 4 00:36:32 <hostname> dnsmasq[1668]: using nameserver 8.8.8.8#53

    It seems that the ISP nameserver gets picked up but then the Google namesever is used. If I set the wireless back to DCHP for address and DNS the ISP nameserver shows up as the nameserver in the four messages above. I'm pretty sure that the google ones are being used but I would really like to know if there is a file or a command to be 100%. Any help would be appreciated.

    Thanks
    You can find out what DNS server is resolving a particular request by using the 'dig' command (without quotes), e.g.:

    Code:
    dig www.google.com
    The line beginning ";; SERVER:" will tell you which DNS server was queried.

    Also, what is the content of your /etc/resolv.conf file, if anything?

    EDIT: Though actually, I think that 'dig' may not really be 100% either, because I believe it just uses whatever is in /etc/resolv.conf ; the server you're really using can depend on how dnsmasq is configured, etc. Still, using it might provide some helpful information, together with the contents of your resolv.conf file.
    Last edited by jrog; October 5th, 2012 at 04:04 AM.
    Asus K55A (Core i5-3210M @ 2.5GHz/8GB RAM/120GB SSD/Intel HD 4000) with Ubuntu 12.10 Beta 2
    Compaq Presario C700 (Pentium Dual-Core @ 1.6GHz/2.5GB RAM/500GB HDD/Intel GM965) with Arch Linux and Linux Mint Debian Edition

  3. #3
    Join Date
    Feb 2010
    Beans
    2

    Re: Checking to see if DNS address was set

    Here is the contents of the /etc/resolv.conf file.
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 127.0.0.1

    I don't know why it's pointing to itself. Also the 127.0.0.1 address shows up when doing the #dig command.

  4. #4
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    4,717
    Distro
    Xubuntu

    Re: Checking to see if DNS address was set

    if you only want it to be set at one location why not set the DNS server on the router and have it assign the address?

    if you are using wireless you can set this on the laptop easily and have it only effect one location using this program
    Code:
    nm-connection-editor
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  5. #5
    Join Date
    Mar 2005
    Beans
    211

    Re: Checking to see if DNS address was set

    Quote Originally Posted by Randhier View Post
    The only thing I can find is by monitoring the /var/log/syslog and finding the following messages:
    Oct 4 00:36:31 <hostname> NetworkManager[856]: <info> nameserver '209.18.xx.xx'
    Oct 4 00:36:31 <hostname> NetworkManager[856]: <info> nameserver '209.18.xx.xx'
    Oct 4 00:36:32 <hostname> dnsmasq[1668]: using nameserver 8.8.4.4#53
    Oct 4 00:36:32 <hostname> dnsmasq[1668]: using nameserver 8.8.8.8#53

    It seems that the ISP nameserver gets picked up but then the Google namesever is used. If I set the wireless back to DCHP for address and DNS the ISP nameserver shows up as the nameserver in the four messages above. I'm pretty sure that the google ones are being used but I would really like to know if there is a file or a command to be 100%. Any help would be appreciated.
    Dnsmasq is a local forwarding nameserver which listens at 127.0.0.1:53 in Precise and 127.0.1.1:53 in Quantal. That is why /etc/resolv.conf contains the line "nameserver 127.0.0.1" or "nameserver 127.0.1.1". The syslog messages you quoted indicate that NetworkManager is telling dnsmasq to use the two Google nameservers to forward queries to. That sounds right, doesn't it?

    To see what NetworkManager considers to be the current state of devices, use "nm-tool".

Bookmarks

Posting Permissions

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