Announcement

Collapse
No announcement yet.

dns not working after new install

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    dns not working after new install

    Hi,

    I did a new install of 15.04. Everything worked except dns. In resolv.conf I have 127.0.1.1. If I manually put 8.8.8.8 (I know it will get overwritten) then dns works. how do I have my router (192.168.0.1) provide dns? dhcp appears to work as the machine gets an address. If I put 192.168.0.1 in resolv.conf dns does not work. does anyone have any suggestions?

    thanks,

    #2
    Assuming you have Network Manager at the default, to get an IP and DNS via dhcp, is your router handing out nameservers?

    A couple of ways to check:

    $ journalctl -u NetworkManager.service

    Tail journalctl ($ journalctl -f) then disconnect and reconnect.

    Code:
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    address 10.0.0.2
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    plen 24 (255.255.255.0)
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    gateway 10.0.0.1
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    server identifier 10.0.0.1
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    lease time 604800
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    nameserver '75.75.75.75'
    Aug 16 01:23:23 gazp6 NetworkManager[445]: <info>    nameserver '75.75.76.76'

    Comment


      #3
      if you have the file ,,,,,,,,, /etc/dhcp/dhclient.conf

      open it as root
      Code:
      kdesudo kate /etc/dhcp/dhclient.conf
      find the line

      Code:
      # Configuration file for /sbin/dhclient, which is included in Debian's#    dhcp3-client package.
      #
      # This is a sample configuration file for dhclient. See dhclient.conf's
      #    man page for more information about the syntax of this file
      #    and a more comprehensive list of the parameters understood by
      #    dhclient.
      #
      # Normally, if the DHCP server provides reasonable information and does
      #    not leave anything out (like the domain name, for example), then
      #    few changes must be made to this file, if any.
      #
      
      
      option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
      
      
      #send host-name "andare.fugue.com";
      send host-name = gethostname();
      #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
      #send dhcp-lease-time 3600;
      #supersede domain-name "fugue.com home.vix.com";
      [COLOR=#ff0000]prepend domain-name-servers 207.91.5.32;[/COLOR]
      request subnet-mask, broadcast-address, time-offset, routers,
          domain-name, domain-name-servers, domain-search, host-name,
          dhcp6.name-servers, dhcp6.domain-search,
          netbios-name-servers, netbios-scope, interface-mtu,
          rfc3442-classless-static-routes, ntp-servers;
      #require subnet-mask, domain-name-servers;
      #timeout 60;
      #retry 60;
      #reboot 10;
      #select-timeout 5;
      #initial-interval 2;
      #script "/etc/dhcp3/dhclient-script";
      #media "-link0 -link1 -link2", "link0 link1";
      #reject 192.33.137.209;
      
      
      #alias {
      #  interface "eth0";
      #  fixed-address 192.5.5.213;
      #  option subnet-mask 255.255.255.255;
      #}
      
      
      #lease {
      #  interface "eth0";
      #  fixed-address 192.33.137.200;
      #  medium "link0 link1";
      #  option host-name "andare.swiftmedia.com";
      #  option subnet-mask 255.255.255.0;
      #  option broadcast-address 192.33.137.255;
      #  option routers 192.33.137.250;
      #  option domain-name-servers 127.0.0.1;
      #  renew 2 2000/1/12 00:00:01;
      #  rebind 2 2000/1/12 00:00:01;
      #  expire 2 2000/1/12 00:00:01;
      #}
      in red ,,,and change it to the DNS server you like ,,,,,,,,,I see you like the google one .

      save and close kate ,,,,,,log out and back in ,,,,,, or restart and you should be using the new DNS

      I say IF you have the file as I am in my debian system at the moment so cant check Kubuntu's ,,,,,,,,,,,O wait yes I can ,,,,and yes it's their

      VINNY
      i7 4core HT 8MB L3 2.9GHz
      16GB RAM
      Nvidia GTX 860M 4GB RAM 1152 cuda cores

      Comment


        #4
        Might be targeting the wrong address...
        My home system uses 192.168.1.254 for both DNS and the gateway... so you might need 192.168.0.254 instead of 192.168.0.1.

        :~$ nmcli dev list iface eth0 | grep IP4
        IP4.ADDRESS[1]: ip = 192.168.1.64/24, gw = 192.168.1.254
        IP4.DNS[1]: 192.168.1.254

        Or simple "nm-tool" gives a good console output as well.
        Last edited by otisklt; Aug 22, 2015, 01:29 PM.
        Kubuntu 18.04 on AMD

        Comment


          #5
          Thanks for replying. I did that and this is what I see:

          Code:
          Aug 22 19:39:56 kubuntu4 dhclient[1916]: DHCPREQUEST of 192.168.0.15 on eth1 to 255.255.255.255 port 67 (xid=0x105b5677)
          Aug 22 19:39:56 kubuntu4 dhclient[1916]: DHCPACK of 192.168.0.15 from 192.168.0.1
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info> (eth1): DHCPv4 state changed preinit -> reboot
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info>   address 192.168.0.15
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info>   plen 24 (255.255.255.0)
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info>   gateway 192.168.0.1
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info>   server identifier 192.168.0.1
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info>   lease time 86400
          Aug 22 19:39:56 kubuntu4 NetworkManager[660]: <info>   nameserver '192.168.0.1'
          after looking into it more I don't think 192.168.0.1 is correct. that is the address of my router but I don't think that address should be used. I was incorrect in thinking that my router could act as a dns server. I would like to use the address supplied by my ISP. I checked my router settings and it is configured to use the dns from my isp. but that is not being used. I don't think it's my router. I have other windows, ubuntu, andorid and kubuntu 14.04 machines using the same router and they all work. I didn't have to change anything for them to work. 15.04 is the first version I've had dns problems with.

          Comment


            #6
            thanks for replying,

            I can do that but I would like to understand why it's not working. and i would like to use the address supplied by my isp instead of hard coding an address.

            Comment


              #7
              thanks for replying,

              that syntax did not work for me. what did work was

              nmcli c show "Wired connection 2"

              The dns related output lines are

              Code:
              ipv4.dns:  
              
              IP4.DNS[1]:                             192.168.0.1
              DHCP4.OPTION[19]:               domain_name_servers = 192.168.0.1
              but 192.168.0.1 is not what it should be. I was not correct in thinking my router could act as a dns server.

              Originally posted by otisklt View Post
              Might be targeting the wrong address...
              My home system uses 192.168.1.254 for both DNS and the gateway... so you might need 192.168.0.254 instead of 192.168.0.1.

              :~$ nmcli dev list iface eth0 | grep IP4
              IP4.ADDRESS[1]: ip = 192.168.1.64/24, gw = 192.168.1.254
              IP4.DNS[1]: 192.168.1.254

              Or simple "nm-tool" gives a good console output as well.

              Comment


                #8
                Sorry I wasnt clear, my commands were only to see what the current settings are.
                If you have access to a device that works with this router then check the settings on it and then try to get 15.04 to match.
                Kubuntu 18.04 on AMD

                Comment


                  #9
                  Originally posted by Ferb1 View Post
                  after looking into it more I don't think 192.168.0.1 is correct. that is the address of my router but I don't think that address should be used. I was incorrect in thinking that my router could act as a dns server. I would like to use the address supplied by my ISP. I checked my router settings and it is configured to use the dns from my isp. but that is not being used. I don't think it's my router. I have other windows, ubuntu, andorid and kubuntu 14.04 machines using the same router and they all work. I didn't have to change anything for them to work. 15.04 is the first version I've had dns problems with.
                  Something is telling NM to use 192.168.0.1 as your name server. Have you edited your connection in NM and made sure you don't have 192.168.0.1 manually set?

                  Comment


                    #10
                    I think I told how to set the nameserver you want to use in post #3 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,

                    VINNY
                    i7 4core HT 8MB L3 2.9GHz
                    16GB RAM
                    Nvidia GTX 860M 4GB RAM 1152 cuda cores

                    Comment


                      #11
                      I did quite a lot of research about DNS when I set up my own BIND9 server, it's written up here:

                      https://samhobbs.co.uk/2015/05/local...ing-dns-server

                      Even though you're not doing that, there's quite a lot of stuff in the turorial you might find interesting/useful, for example how to configure openwrt to hand out the IP of a specific DNS server to clients.
                      samhobbs.co.uk

                      Comment


                        #12
                        No this is a clean install for a new system. It was not working before I started trying things. I don't think it was able to access the network during the install either

                        Originally posted by ronw View Post
                        Something is telling NM to use 192.168.0.1 as your name server. Have you edited your connection in NM and made sure you don't have 192.168.0.1 manually set?

                        Comment


                          #13
                          thanks I may have to do that. I never had to know much about the network stuff before because all previous versions just worked. 15.04 is the first version where networking did not work after an install.

                          Originally posted by Feathers McGraw View Post
                          I did quite a lot of research about DNS when I set up my own BIND9 server, it's written up here:

                          https://samhobbs.co.uk/2015/05/local...ing-dns-server

                          Even though you're not doing that, there's quite a lot of stuff in the turorial you might find interesting/useful, for example how to configure openwrt to hand out the IP of a specific DNS server to clients.

                          Comment

                          Working...
                          X