How do I configure my static DNS in interfaces?












56















I am using Ubuntu 12.04.



My /etc/network/interfaces file consists of:



# The loopback network interface  
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.58
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 66.212.63.228 66.212.48.10


I ran the command: /etc/init.d/networking restart



Which responded with:



*Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces  
*Reconfiguring network interfaces...
RTNETLINK answers: File exists
Failed to bring up eth0
[ OK ]


Next I ran ping google.com and received:



ping: unknown host google.com


I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses?










share|improve this question




















  • 1





    Reboot your computer. Do not run /etc/init.d/networking restart. The error is caused by the default route already existing. This setup looks correct to me.

    – Matt H
    Jan 27 '13 at 22:42






  • 2





    As Matt H says, /etc/network/interfaces is picky about stuff already existing. You can have a perfect setup, but already have something there, and it will complain. If it is the default route it is complaining about, you can remove it by running ip route del default to get the computer into a state where you can hand over the management of this stuff to /etc/network/interfaces

    – Azendale
    Mar 31 '13 at 19:56
















56















I am using Ubuntu 12.04.



My /etc/network/interfaces file consists of:



# The loopback network interface  
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.58
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 66.212.63.228 66.212.48.10


I ran the command: /etc/init.d/networking restart



Which responded with:



*Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces  
*Reconfiguring network interfaces...
RTNETLINK answers: File exists
Failed to bring up eth0
[ OK ]


Next I ran ping google.com and received:



ping: unknown host google.com


I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses?










share|improve this question




















  • 1





    Reboot your computer. Do not run /etc/init.d/networking restart. The error is caused by the default route already existing. This setup looks correct to me.

    – Matt H
    Jan 27 '13 at 22:42






  • 2





    As Matt H says, /etc/network/interfaces is picky about stuff already existing. You can have a perfect setup, but already have something there, and it will complain. If it is the default route it is complaining about, you can remove it by running ip route del default to get the computer into a state where you can hand over the management of this stuff to /etc/network/interfaces

    – Azendale
    Mar 31 '13 at 19:56














56












56








56


19






I am using Ubuntu 12.04.



My /etc/network/interfaces file consists of:



# The loopback network interface  
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.58
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 66.212.63.228 66.212.48.10


I ran the command: /etc/init.d/networking restart



Which responded with:



*Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces  
*Reconfiguring network interfaces...
RTNETLINK answers: File exists
Failed to bring up eth0
[ OK ]


Next I ran ping google.com and received:



ping: unknown host google.com


I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses?










share|improve this question
















I am using Ubuntu 12.04.



My /etc/network/interfaces file consists of:



# The loopback network interface  
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.58
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 66.212.63.228 66.212.48.10


I ran the command: /etc/init.d/networking restart



Which responded with:



*Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces  
*Reconfiguring network interfaces...
RTNETLINK answers: File exists
Failed to bring up eth0
[ OK ]


Next I ran ping google.com and received:



ping: unknown host google.com


I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses?







dns






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 30 '12 at 12:18









jokerdino

32.7k21120187




32.7k21120187










asked May 29 '12 at 18:48









dottedquaddottedquad

381134




381134








  • 1





    Reboot your computer. Do not run /etc/init.d/networking restart. The error is caused by the default route already existing. This setup looks correct to me.

    – Matt H
    Jan 27 '13 at 22:42






  • 2





    As Matt H says, /etc/network/interfaces is picky about stuff already existing. You can have a perfect setup, but already have something there, and it will complain. If it is the default route it is complaining about, you can remove it by running ip route del default to get the computer into a state where you can hand over the management of this stuff to /etc/network/interfaces

    – Azendale
    Mar 31 '13 at 19:56














  • 1





    Reboot your computer. Do not run /etc/init.d/networking restart. The error is caused by the default route already existing. This setup looks correct to me.

    – Matt H
    Jan 27 '13 at 22:42






  • 2





    As Matt H says, /etc/network/interfaces is picky about stuff already existing. You can have a perfect setup, but already have something there, and it will complain. If it is the default route it is complaining about, you can remove it by running ip route del default to get the computer into a state where you can hand over the management of this stuff to /etc/network/interfaces

    – Azendale
    Mar 31 '13 at 19:56








1




1





Reboot your computer. Do not run /etc/init.d/networking restart. The error is caused by the default route already existing. This setup looks correct to me.

– Matt H
Jan 27 '13 at 22:42





Reboot your computer. Do not run /etc/init.d/networking restart. The error is caused by the default route already existing. This setup looks correct to me.

– Matt H
Jan 27 '13 at 22:42




2




2





As Matt H says, /etc/network/interfaces is picky about stuff already existing. You can have a perfect setup, but already have something there, and it will complain. If it is the default route it is complaining about, you can remove it by running ip route del default to get the computer into a state where you can hand over the management of this stuff to /etc/network/interfaces

– Azendale
Mar 31 '13 at 19:56





As Matt H says, /etc/network/interfaces is picky about stuff already existing. You can have a perfect setup, but already have something there, and it will complain. If it is the default route it is complaining about, you can remove it by running ip route del default to get the computer into a state where you can hand over the management of this stuff to /etc/network/interfaces

– Azendale
Mar 31 '13 at 19:56










11 Answers
11






active

oldest

votes


















23














As the questioner gives the contents of his /etc/network/interfaces I infer that he is using ifup to configure interfaces. But since he may actually be using NetworkManager, I will discuss that as well.



If you are using ifup then DNS settings go in /etc/network/interfaces. For each interface you add dns-* options appropriate for the nameserver(s) available over that interface. E.g., if a nameserver at address 1.2.3.4 is available over interface eth0, then add dns-nameservers 1.2.3.4 to the iface eth0 stanza.



If you are using NetworkManager then settings are entered in the Connection Editor (network indicator | Edit Connections...) in the IPv4 Settings tab.



Doing /etc/init.d/networking restart to reconfigure interfaces is deprecated. If you are using ifup then first ifdown each active network interface, then ifup each interface. If you are using NetworkManager then, first, disable networking using the indicator (top of the desktop); then open a terminal and run



sudo restart network-manager


and then enable networking using the indicator.



Or you can just reboot.



Regarding the fact that /etc/init.d/networking restart resulted in



RTNETLINK answers: File exists
Failed to bring up eth0


This means that ifupdown thinks that eth0 is already up. Use ifdown --force eth0 to cause ifupdown to stop believing that it has already configured the interface.



Regarding the "deprecated" message, this message is no longer printed in Ubuntu 12.10 but you should still note that initscripts are "on their way out". To restart a service foo, use service foo restart or restart foo. Note also that if you want to reconfigure your interfaces it is better to ifdown them one by one than to rely on restarting "networking".






share|improve this answer

































    15














    If none of the above work, keep it mind that Ubuntu appends a tail file to the resolv.conf file that it generates.



    Try this:



    sudo nano /etc/resolvconf/resolv.conf.d/tail


    Which will open a blank resolv.conf.d file in the nano text editor. You will need to place your DNS server address on the first line of this file and remember to end the line with a carriage return (hit enter) as seen below:




    nameserver 10.20.1.2



    Editing the tail file instead of the actual resolv.conf file will prevent your change from being lost upon a system reboot.



    You will need to run sudo resolvconf -u to activate the change. You should be able to ping google.com after this. Good luck!






    share|improve this answer


























    • Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

      – James T Snell
      Sep 24 '15 at 18:16



















    10














    Command line version:



    You should add your nameserver(s) to /etc/resolvconf/resolv.conf.d/base file this way:



    nameserver 66.212.63.228 
    nameserver 66.212.48.10





    share|improve this answer


























    • I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

      – dottedquad
      May 29 '12 at 20:15








    • 1





      You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

      – pl1nk
      May 29 '12 at 22:05








    • 1





      @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

      – pl1nk
      May 30 '12 at 0:17








    • 1





      It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

      – jdthood
      Oct 30 '12 at 8:21






    • 1





      @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

      – pl1nk
      Nov 1 '12 at 13:19



















    9














    All of the answers which relate to /etc/network/interfaces incorrectly state dns-nameservers rather than dns-nameserver - below should work:



    auto wlan0
    iface wlan0 inet static
    address 192.168.1.28
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameserver 8.8.8.8
    dns-nameserver 8.8.4.4
    dns-search something.network.com


    (tested on Ubuntu 15.04)






    share|improve this answer



















    • 4





      Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

      – evadeflow
      Feb 5 '17 at 22:24






    • 2





      Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

      – jla
      Oct 19 '17 at 3:57











    • dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

      – Thufir
      Nov 29 '17 at 10:20



















    6














    Easiest method of configuring your DNS servers is to use NetworkManager



    Under IPv4, fill in your dns server(s)



    enter image description here






    share|improve this answer



















    • 2





      I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

      – dottedquad
      May 29 '12 at 20:13











    • It wont let me save this down. why might that be?

      – josh
      Dec 20 '18 at 16:37



















    4














    I was able to work around this on a headless ubuntu server install by adding



    nameserver 8.8.8.8


    ...after the relevant interface stuff in /etc/network/interfaces:



    auto wlan0
    iface wlan0 inet static
    address 192.168.1.28
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8
    dns-nameservers 8.8.4.4


    Hope this helps later users!






    share|improve this answer
























    • for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

      – Thufir
      Nov 29 '17 at 10:22











    • @Thufir spaces wiki.debian.org/NetworkConfiguration

      – Philippe Gachoud
      9 hours ago



















    4















    Note: carefull using without direct access on the machine, this will cut the connection...




    I use



    sudo ifdown eth0


    then



    sudo ifup eth0


    It will reset and release everything...



    If it faces with errors related to configuration, you can use:



    sudo ifdown eth0 --force





    share|improve this answer

































      3














      This worked for me



      sudo vi /etc/resolvconf/resolv.conf.d/base


      and add:



      nameserver <add your router ip>


      Run:



      sudo resolvconf -u


      I use core install of ubuntu server.






      share|improve this answer

































        2














        You are missing a subnet specification in the interfaces file.



        Add netmask 255.255.255.0 to /etc/network/interfaces below the network line.






        share|improve this answer

































          1














          For some reason the dns-nameservers statement does nothing in my case. And the other answers are not by the book, as they bypass dnsmasq as it is utilized in Ubuntu.



          To do this right, edit /etc/dnsmasq.conf



          Add your nameservers to the bottom of the file:



          server=8.8.8.8
          server=8.8.4.4


          Restart dnsmasq to use the new settings:
          sudo service dnsmasq restart



          Credit: https://unix.stackexchange.com/a/163506/187949






          share|improve this answer































            0














            You might configure that interface in an other file too, since you have more gateways.



            Details are here.






            share|improve this answer

























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f143819%2fhow-do-i-configure-my-static-dns-in-interfaces%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              11 Answers
              11






              active

              oldest

              votes








              11 Answers
              11






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              23














              As the questioner gives the contents of his /etc/network/interfaces I infer that he is using ifup to configure interfaces. But since he may actually be using NetworkManager, I will discuss that as well.



              If you are using ifup then DNS settings go in /etc/network/interfaces. For each interface you add dns-* options appropriate for the nameserver(s) available over that interface. E.g., if a nameserver at address 1.2.3.4 is available over interface eth0, then add dns-nameservers 1.2.3.4 to the iface eth0 stanza.



              If you are using NetworkManager then settings are entered in the Connection Editor (network indicator | Edit Connections...) in the IPv4 Settings tab.



              Doing /etc/init.d/networking restart to reconfigure interfaces is deprecated. If you are using ifup then first ifdown each active network interface, then ifup each interface. If you are using NetworkManager then, first, disable networking using the indicator (top of the desktop); then open a terminal and run



              sudo restart network-manager


              and then enable networking using the indicator.



              Or you can just reboot.



              Regarding the fact that /etc/init.d/networking restart resulted in



              RTNETLINK answers: File exists
              Failed to bring up eth0


              This means that ifupdown thinks that eth0 is already up. Use ifdown --force eth0 to cause ifupdown to stop believing that it has already configured the interface.



              Regarding the "deprecated" message, this message is no longer printed in Ubuntu 12.10 but you should still note that initscripts are "on their way out". To restart a service foo, use service foo restart or restart foo. Note also that if you want to reconfigure your interfaces it is better to ifdown them one by one than to rely on restarting "networking".






              share|improve this answer






























                23














                As the questioner gives the contents of his /etc/network/interfaces I infer that he is using ifup to configure interfaces. But since he may actually be using NetworkManager, I will discuss that as well.



                If you are using ifup then DNS settings go in /etc/network/interfaces. For each interface you add dns-* options appropriate for the nameserver(s) available over that interface. E.g., if a nameserver at address 1.2.3.4 is available over interface eth0, then add dns-nameservers 1.2.3.4 to the iface eth0 stanza.



                If you are using NetworkManager then settings are entered in the Connection Editor (network indicator | Edit Connections...) in the IPv4 Settings tab.



                Doing /etc/init.d/networking restart to reconfigure interfaces is deprecated. If you are using ifup then first ifdown each active network interface, then ifup each interface. If you are using NetworkManager then, first, disable networking using the indicator (top of the desktop); then open a terminal and run



                sudo restart network-manager


                and then enable networking using the indicator.



                Or you can just reboot.



                Regarding the fact that /etc/init.d/networking restart resulted in



                RTNETLINK answers: File exists
                Failed to bring up eth0


                This means that ifupdown thinks that eth0 is already up. Use ifdown --force eth0 to cause ifupdown to stop believing that it has already configured the interface.



                Regarding the "deprecated" message, this message is no longer printed in Ubuntu 12.10 but you should still note that initscripts are "on their way out". To restart a service foo, use service foo restart or restart foo. Note also that if you want to reconfigure your interfaces it is better to ifdown them one by one than to rely on restarting "networking".






                share|improve this answer




























                  23












                  23








                  23







                  As the questioner gives the contents of his /etc/network/interfaces I infer that he is using ifup to configure interfaces. But since he may actually be using NetworkManager, I will discuss that as well.



                  If you are using ifup then DNS settings go in /etc/network/interfaces. For each interface you add dns-* options appropriate for the nameserver(s) available over that interface. E.g., if a nameserver at address 1.2.3.4 is available over interface eth0, then add dns-nameservers 1.2.3.4 to the iface eth0 stanza.



                  If you are using NetworkManager then settings are entered in the Connection Editor (network indicator | Edit Connections...) in the IPv4 Settings tab.



                  Doing /etc/init.d/networking restart to reconfigure interfaces is deprecated. If you are using ifup then first ifdown each active network interface, then ifup each interface. If you are using NetworkManager then, first, disable networking using the indicator (top of the desktop); then open a terminal and run



                  sudo restart network-manager


                  and then enable networking using the indicator.



                  Or you can just reboot.



                  Regarding the fact that /etc/init.d/networking restart resulted in



                  RTNETLINK answers: File exists
                  Failed to bring up eth0


                  This means that ifupdown thinks that eth0 is already up. Use ifdown --force eth0 to cause ifupdown to stop believing that it has already configured the interface.



                  Regarding the "deprecated" message, this message is no longer printed in Ubuntu 12.10 but you should still note that initscripts are "on their way out". To restart a service foo, use service foo restart or restart foo. Note also that if you want to reconfigure your interfaces it is better to ifdown them one by one than to rely on restarting "networking".






                  share|improve this answer















                  As the questioner gives the contents of his /etc/network/interfaces I infer that he is using ifup to configure interfaces. But since he may actually be using NetworkManager, I will discuss that as well.



                  If you are using ifup then DNS settings go in /etc/network/interfaces. For each interface you add dns-* options appropriate for the nameserver(s) available over that interface. E.g., if a nameserver at address 1.2.3.4 is available over interface eth0, then add dns-nameservers 1.2.3.4 to the iface eth0 stanza.



                  If you are using NetworkManager then settings are entered in the Connection Editor (network indicator | Edit Connections...) in the IPv4 Settings tab.



                  Doing /etc/init.d/networking restart to reconfigure interfaces is deprecated. If you are using ifup then first ifdown each active network interface, then ifup each interface. If you are using NetworkManager then, first, disable networking using the indicator (top of the desktop); then open a terminal and run



                  sudo restart network-manager


                  and then enable networking using the indicator.



                  Or you can just reboot.



                  Regarding the fact that /etc/init.d/networking restart resulted in



                  RTNETLINK answers: File exists
                  Failed to bring up eth0


                  This means that ifupdown thinks that eth0 is already up. Use ifdown --force eth0 to cause ifupdown to stop believing that it has already configured the interface.



                  Regarding the "deprecated" message, this message is no longer printed in Ubuntu 12.10 but you should still note that initscripts are "on their way out". To restart a service foo, use service foo restart or restart foo. Note also that if you want to reconfigure your interfaces it is better to ifdown them one by one than to rely on restarting "networking".







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 16 '16 at 18:02









                  Neil

                  235411




                  235411










                  answered Oct 29 '12 at 13:40









                  jdthoodjdthood

                  10.5k14163




                  10.5k14163

























                      15














                      If none of the above work, keep it mind that Ubuntu appends a tail file to the resolv.conf file that it generates.



                      Try this:



                      sudo nano /etc/resolvconf/resolv.conf.d/tail


                      Which will open a blank resolv.conf.d file in the nano text editor. You will need to place your DNS server address on the first line of this file and remember to end the line with a carriage return (hit enter) as seen below:




                      nameserver 10.20.1.2



                      Editing the tail file instead of the actual resolv.conf file will prevent your change from being lost upon a system reboot.



                      You will need to run sudo resolvconf -u to activate the change. You should be able to ping google.com after this. Good luck!






                      share|improve this answer


























                      • Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

                        – James T Snell
                        Sep 24 '15 at 18:16
















                      15














                      If none of the above work, keep it mind that Ubuntu appends a tail file to the resolv.conf file that it generates.



                      Try this:



                      sudo nano /etc/resolvconf/resolv.conf.d/tail


                      Which will open a blank resolv.conf.d file in the nano text editor. You will need to place your DNS server address on the first line of this file and remember to end the line with a carriage return (hit enter) as seen below:




                      nameserver 10.20.1.2



                      Editing the tail file instead of the actual resolv.conf file will prevent your change from being lost upon a system reboot.



                      You will need to run sudo resolvconf -u to activate the change. You should be able to ping google.com after this. Good luck!






                      share|improve this answer


























                      • Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

                        – James T Snell
                        Sep 24 '15 at 18:16














                      15












                      15








                      15







                      If none of the above work, keep it mind that Ubuntu appends a tail file to the resolv.conf file that it generates.



                      Try this:



                      sudo nano /etc/resolvconf/resolv.conf.d/tail


                      Which will open a blank resolv.conf.d file in the nano text editor. You will need to place your DNS server address on the first line of this file and remember to end the line with a carriage return (hit enter) as seen below:




                      nameserver 10.20.1.2



                      Editing the tail file instead of the actual resolv.conf file will prevent your change from being lost upon a system reboot.



                      You will need to run sudo resolvconf -u to activate the change. You should be able to ping google.com after this. Good luck!






                      share|improve this answer















                      If none of the above work, keep it mind that Ubuntu appends a tail file to the resolv.conf file that it generates.



                      Try this:



                      sudo nano /etc/resolvconf/resolv.conf.d/tail


                      Which will open a blank resolv.conf.d file in the nano text editor. You will need to place your DNS server address on the first line of this file and remember to end the line with a carriage return (hit enter) as seen below:




                      nameserver 10.20.1.2



                      Editing the tail file instead of the actual resolv.conf file will prevent your change from being lost upon a system reboot.



                      You will need to run sudo resolvconf -u to activate the change. You should be able to ping google.com after this. Good luck!







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jul 10 '13 at 17:50









                      jdthood

                      10.5k14163




                      10.5k14163










                      answered Jul 4 '13 at 6:41









                      Sean HuggansSean Huggans

                      15112




                      15112













                      • Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

                        – James T Snell
                        Sep 24 '15 at 18:16



















                      • Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

                        – James T Snell
                        Sep 24 '15 at 18:16

















                      Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

                      – James T Snell
                      Sep 24 '15 at 18:16





                      Sounds good, but my Ubuntu 14.04 system didn't use this tail file. So this isn't a solution in my case. Thanks though.

                      – James T Snell
                      Sep 24 '15 at 18:16











                      10














                      Command line version:



                      You should add your nameserver(s) to /etc/resolvconf/resolv.conf.d/base file this way:



                      nameserver 66.212.63.228 
                      nameserver 66.212.48.10





                      share|improve this answer


























                      • I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

                        – dottedquad
                        May 29 '12 at 20:15








                      • 1





                        You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

                        – pl1nk
                        May 29 '12 at 22:05








                      • 1





                        @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

                        – pl1nk
                        May 30 '12 at 0:17








                      • 1





                        It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

                        – jdthood
                        Oct 30 '12 at 8:21






                      • 1





                        @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

                        – pl1nk
                        Nov 1 '12 at 13:19
















                      10














                      Command line version:



                      You should add your nameserver(s) to /etc/resolvconf/resolv.conf.d/base file this way:



                      nameserver 66.212.63.228 
                      nameserver 66.212.48.10





                      share|improve this answer


























                      • I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

                        – dottedquad
                        May 29 '12 at 20:15








                      • 1





                        You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

                        – pl1nk
                        May 29 '12 at 22:05








                      • 1





                        @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

                        – pl1nk
                        May 30 '12 at 0:17








                      • 1





                        It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

                        – jdthood
                        Oct 30 '12 at 8:21






                      • 1





                        @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

                        – pl1nk
                        Nov 1 '12 at 13:19














                      10












                      10








                      10







                      Command line version:



                      You should add your nameserver(s) to /etc/resolvconf/resolv.conf.d/base file this way:



                      nameserver 66.212.63.228 
                      nameserver 66.212.48.10





                      share|improve this answer















                      Command line version:



                      You should add your nameserver(s) to /etc/resolvconf/resolv.conf.d/base file this way:



                      nameserver 66.212.63.228 
                      nameserver 66.212.48.10






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 2 '15 at 9:53









                      muru

                      1




                      1










                      answered May 29 '12 at 19:02









                      pl1nkpl1nk

                      4,41852143




                      4,41852143













                      • I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

                        – dottedquad
                        May 29 '12 at 20:15








                      • 1





                        You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

                        – pl1nk
                        May 29 '12 at 22:05








                      • 1





                        @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

                        – pl1nk
                        May 30 '12 at 0:17








                      • 1





                        It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

                        – jdthood
                        Oct 30 '12 at 8:21






                      • 1





                        @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

                        – pl1nk
                        Nov 1 '12 at 13:19



















                      • I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

                        – dottedquad
                        May 29 '12 at 20:15








                      • 1





                        You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

                        – pl1nk
                        May 29 '12 at 22:05








                      • 1





                        @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

                        – pl1nk
                        May 30 '12 at 0:17








                      • 1





                        It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

                        – jdthood
                        Oct 30 '12 at 8:21






                      • 1





                        @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

                        – pl1nk
                        Nov 1 '12 at 13:19

















                      I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

                      – dottedquad
                      May 29 '12 at 20:15







                      I will have to try this method in a few hours and get back to you. Do you know why I am receiving the deprecated message and the failed to bring up eth0 message?

                      – dottedquad
                      May 29 '12 at 20:15






                      1




                      1





                      You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

                      – pl1nk
                      May 29 '12 at 22:05







                      You could use this:$ ifdown eth0 && ifup eth0 Read more about this issue here.

                      – pl1nk
                      May 29 '12 at 22:05






                      1




                      1





                      @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

                      – pl1nk
                      May 30 '12 at 0:17







                      @dottedquad what is you change the /etc/network/interfaces file to this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.58 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Take care that this: auto eth0 iface eth0 inet staticis two lines

                      – pl1nk
                      May 30 '12 at 0:17






                      1




                      1





                      It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

                      – jdthood
                      Oct 30 '12 at 8:21





                      It is better to add nameserver information to NetworkManager connections (if you are using NetworkManager) as described by bodhi.zazen, or to interface definitions in /etc/network/interfaces (if you are using ifup) than to add the information statically and globally to /etc/resolvconf/resolv.conf.d/base.

                      – jdthood
                      Oct 30 '12 at 8:21




                      1




                      1





                      @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

                      – pl1nk
                      Nov 1 '12 at 13:19





                      @jdthood It seems that you have seen my comments and the question as well as the other answers! Some comments up [..] "You could use this:$ ifdown eth0 && ifup eth0"[..]

                      – pl1nk
                      Nov 1 '12 at 13:19











                      9














                      All of the answers which relate to /etc/network/interfaces incorrectly state dns-nameservers rather than dns-nameserver - below should work:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameserver 8.8.8.8
                      dns-nameserver 8.8.4.4
                      dns-search something.network.com


                      (tested on Ubuntu 15.04)






                      share|improve this answer



















                      • 4





                        Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

                        – evadeflow
                        Feb 5 '17 at 22:24






                      • 2





                        Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

                        – jla
                        Oct 19 '17 at 3:57











                      • dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

                        – Thufir
                        Nov 29 '17 at 10:20
















                      9














                      All of the answers which relate to /etc/network/interfaces incorrectly state dns-nameservers rather than dns-nameserver - below should work:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameserver 8.8.8.8
                      dns-nameserver 8.8.4.4
                      dns-search something.network.com


                      (tested on Ubuntu 15.04)






                      share|improve this answer



















                      • 4





                        Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

                        – evadeflow
                        Feb 5 '17 at 22:24






                      • 2





                        Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

                        – jla
                        Oct 19 '17 at 3:57











                      • dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

                        – Thufir
                        Nov 29 '17 at 10:20














                      9












                      9








                      9







                      All of the answers which relate to /etc/network/interfaces incorrectly state dns-nameservers rather than dns-nameserver - below should work:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameserver 8.8.8.8
                      dns-nameserver 8.8.4.4
                      dns-search something.network.com


                      (tested on Ubuntu 15.04)






                      share|improve this answer













                      All of the answers which relate to /etc/network/interfaces incorrectly state dns-nameservers rather than dns-nameserver - below should work:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameserver 8.8.8.8
                      dns-nameserver 8.8.4.4
                      dns-search something.network.com


                      (tested on Ubuntu 15.04)







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 20 '15 at 7:31









                      babelmonkbabelmonk

                      53955




                      53955








                      • 4





                        Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

                        – evadeflow
                        Feb 5 '17 at 22:24






                      • 2





                        Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

                        – jla
                        Oct 19 '17 at 3:57











                      • dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

                        – Thufir
                        Nov 29 '17 at 10:20














                      • 4





                        Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

                        – evadeflow
                        Feb 5 '17 at 22:24






                      • 2





                        Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

                        – jla
                        Oct 19 '17 at 3:57











                      • dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

                        – Thufir
                        Nov 29 '17 at 10:20








                      4




                      4





                      Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

                      – evadeflow
                      Feb 5 '17 at 22:24





                      Careful. I just confirmed that dns-nameserver (singular) does not work on RaspberryPi + Raspian Jesse. I found that I had to use dns-nameservers (plural). YMMV and all that, just trying to help out the next person...

                      – evadeflow
                      Feb 5 '17 at 22:24




                      2




                      2





                      Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

                      – jla
                      Oct 19 '17 at 3:57





                      Check your resolvconf(8) man page for usage and options. On Ubuntu 16.04.3 LTS it says you either use one or more dns-nameserver lines with a single IP address per line, or you can use dns-nameservers and a space separated list of IP addresses.

                      – jla
                      Oct 19 '17 at 3:57













                      dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

                      – Thufir
                      Nov 29 '17 at 10:20





                      dns-nameserver or dns-nameservers? because wiki.ubuntu.com/KvmWithBridge says "servers"...

                      – Thufir
                      Nov 29 '17 at 10:20











                      6














                      Easiest method of configuring your DNS servers is to use NetworkManager



                      Under IPv4, fill in your dns server(s)



                      enter image description here






                      share|improve this answer



















                      • 2





                        I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

                        – dottedquad
                        May 29 '12 at 20:13











                      • It wont let me save this down. why might that be?

                        – josh
                        Dec 20 '18 at 16:37
















                      6














                      Easiest method of configuring your DNS servers is to use NetworkManager



                      Under IPv4, fill in your dns server(s)



                      enter image description here






                      share|improve this answer



















                      • 2





                        I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

                        – dottedquad
                        May 29 '12 at 20:13











                      • It wont let me save this down. why might that be?

                        – josh
                        Dec 20 '18 at 16:37














                      6












                      6








                      6







                      Easiest method of configuring your DNS servers is to use NetworkManager



                      Under IPv4, fill in your dns server(s)



                      enter image description here






                      share|improve this answer













                      Easiest method of configuring your DNS servers is to use NetworkManager



                      Under IPv4, fill in your dns server(s)



                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 29 '12 at 19:02









                      PantherPanther

                      79.1k14157259




                      79.1k14157259








                      • 2





                        I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

                        – dottedquad
                        May 29 '12 at 20:13











                      • It wont let me save this down. why might that be?

                        – josh
                        Dec 20 '18 at 16:37














                      • 2





                        I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

                        – dottedquad
                        May 29 '12 at 20:13











                      • It wont let me save this down. why might that be?

                        – josh
                        Dec 20 '18 at 16:37








                      2




                      2





                      I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

                      – dottedquad
                      May 29 '12 at 20:13





                      I forgot to mention that i do not have unity or gnome installed. Gnome installatio is my next project.

                      – dottedquad
                      May 29 '12 at 20:13













                      It wont let me save this down. why might that be?

                      – josh
                      Dec 20 '18 at 16:37





                      It wont let me save this down. why might that be?

                      – josh
                      Dec 20 '18 at 16:37











                      4














                      I was able to work around this on a headless ubuntu server install by adding



                      nameserver 8.8.8.8


                      ...after the relevant interface stuff in /etc/network/interfaces:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameservers 8.8.8.8
                      dns-nameservers 8.8.4.4


                      Hope this helps later users!






                      share|improve this answer
























                      • for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

                        – Thufir
                        Nov 29 '17 at 10:22











                      • @Thufir spaces wiki.debian.org/NetworkConfiguration

                        – Philippe Gachoud
                        9 hours ago
















                      4














                      I was able to work around this on a headless ubuntu server install by adding



                      nameserver 8.8.8.8


                      ...after the relevant interface stuff in /etc/network/interfaces:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameservers 8.8.8.8
                      dns-nameservers 8.8.4.4


                      Hope this helps later users!






                      share|improve this answer
























                      • for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

                        – Thufir
                        Nov 29 '17 at 10:22











                      • @Thufir spaces wiki.debian.org/NetworkConfiguration

                        – Philippe Gachoud
                        9 hours ago














                      4












                      4








                      4







                      I was able to work around this on a headless ubuntu server install by adding



                      nameserver 8.8.8.8


                      ...after the relevant interface stuff in /etc/network/interfaces:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameservers 8.8.8.8
                      dns-nameservers 8.8.4.4


                      Hope this helps later users!






                      share|improve this answer













                      I was able to work around this on a headless ubuntu server install by adding



                      nameserver 8.8.8.8


                      ...after the relevant interface stuff in /etc/network/interfaces:



                      auto wlan0
                      iface wlan0 inet static
                      address 192.168.1.28
                      netmask 255.255.255.0
                      gateway 192.168.1.1
                      dns-nameservers 8.8.8.8
                      dns-nameservers 8.8.4.4


                      Hope this helps later users!







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Aug 30 '14 at 0:07









                      corqcorq

                      463




                      463













                      • for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

                        – Thufir
                        Nov 29 '17 at 10:22











                      • @Thufir spaces wiki.debian.org/NetworkConfiguration

                        – Philippe Gachoud
                        9 hours ago



















                      • for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

                        – Thufir
                        Nov 29 '17 at 10:22











                      • @Thufir spaces wiki.debian.org/NetworkConfiguration

                        – Philippe Gachoud
                        9 hours ago

















                      for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

                      – Thufir
                      Nov 29 '17 at 10:22





                      for dns-nameservers can you comma seperate 8.8.8.8, 8.8.4.4?

                      – Thufir
                      Nov 29 '17 at 10:22













                      @Thufir spaces wiki.debian.org/NetworkConfiguration

                      – Philippe Gachoud
                      9 hours ago





                      @Thufir spaces wiki.debian.org/NetworkConfiguration

                      – Philippe Gachoud
                      9 hours ago











                      4















                      Note: carefull using without direct access on the machine, this will cut the connection...




                      I use



                      sudo ifdown eth0


                      then



                      sudo ifup eth0


                      It will reset and release everything...



                      If it faces with errors related to configuration, you can use:



                      sudo ifdown eth0 --force





                      share|improve this answer






























                        4















                        Note: carefull using without direct access on the machine, this will cut the connection...




                        I use



                        sudo ifdown eth0


                        then



                        sudo ifup eth0


                        It will reset and release everything...



                        If it faces with errors related to configuration, you can use:



                        sudo ifdown eth0 --force





                        share|improve this answer




























                          4












                          4








                          4








                          Note: carefull using without direct access on the machine, this will cut the connection...




                          I use



                          sudo ifdown eth0


                          then



                          sudo ifup eth0


                          It will reset and release everything...



                          If it faces with errors related to configuration, you can use:



                          sudo ifdown eth0 --force





                          share|improve this answer
















                          Note: carefull using without direct access on the machine, this will cut the connection...




                          I use



                          sudo ifdown eth0


                          then



                          sudo ifup eth0


                          It will reset and release everything...



                          If it faces with errors related to configuration, you can use:



                          sudo ifdown eth0 --force






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 9 hours ago









                          Philippe Gachoud

                          3,2622538




                          3,2622538










                          answered Jun 17 '14 at 3:57









                          user294233user294233

                          411




                          411























                              3














                              This worked for me



                              sudo vi /etc/resolvconf/resolv.conf.d/base


                              and add:



                              nameserver <add your router ip>


                              Run:



                              sudo resolvconf -u


                              I use core install of ubuntu server.






                              share|improve this answer






























                                3














                                This worked for me



                                sudo vi /etc/resolvconf/resolv.conf.d/base


                                and add:



                                nameserver <add your router ip>


                                Run:



                                sudo resolvconf -u


                                I use core install of ubuntu server.






                                share|improve this answer




























                                  3












                                  3








                                  3







                                  This worked for me



                                  sudo vi /etc/resolvconf/resolv.conf.d/base


                                  and add:



                                  nameserver <add your router ip>


                                  Run:



                                  sudo resolvconf -u


                                  I use core install of ubuntu server.






                                  share|improve this answer















                                  This worked for me



                                  sudo vi /etc/resolvconf/resolv.conf.d/base


                                  and add:



                                  nameserver <add your router ip>


                                  Run:



                                  sudo resolvconf -u


                                  I use core install of ubuntu server.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Jun 7 '16 at 11:57









                                  muru

                                  1




                                  1










                                  answered Jun 7 '16 at 11:54









                                  BongoBongo

                                  311




                                  311























                                      2














                                      You are missing a subnet specification in the interfaces file.



                                      Add netmask 255.255.255.0 to /etc/network/interfaces below the network line.






                                      share|improve this answer






























                                        2














                                        You are missing a subnet specification in the interfaces file.



                                        Add netmask 255.255.255.0 to /etc/network/interfaces below the network line.






                                        share|improve this answer




























                                          2












                                          2








                                          2







                                          You are missing a subnet specification in the interfaces file.



                                          Add netmask 255.255.255.0 to /etc/network/interfaces below the network line.






                                          share|improve this answer















                                          You are missing a subnet specification in the interfaces file.



                                          Add netmask 255.255.255.0 to /etc/network/interfaces below the network line.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Oct 30 '12 at 8:30









                                          jdthood

                                          10.5k14163




                                          10.5k14163










                                          answered Oct 11 '12 at 12:46









                                          BrianBrian

                                          291




                                          291























                                              1














                                              For some reason the dns-nameservers statement does nothing in my case. And the other answers are not by the book, as they bypass dnsmasq as it is utilized in Ubuntu.



                                              To do this right, edit /etc/dnsmasq.conf



                                              Add your nameservers to the bottom of the file:



                                              server=8.8.8.8
                                              server=8.8.4.4


                                              Restart dnsmasq to use the new settings:
                                              sudo service dnsmasq restart



                                              Credit: https://unix.stackexchange.com/a/163506/187949






                                              share|improve this answer




























                                                1














                                                For some reason the dns-nameservers statement does nothing in my case. And the other answers are not by the book, as they bypass dnsmasq as it is utilized in Ubuntu.



                                                To do this right, edit /etc/dnsmasq.conf



                                                Add your nameservers to the bottom of the file:



                                                server=8.8.8.8
                                                server=8.8.4.4


                                                Restart dnsmasq to use the new settings:
                                                sudo service dnsmasq restart



                                                Credit: https://unix.stackexchange.com/a/163506/187949






                                                share|improve this answer


























                                                  1












                                                  1








                                                  1







                                                  For some reason the dns-nameservers statement does nothing in my case. And the other answers are not by the book, as they bypass dnsmasq as it is utilized in Ubuntu.



                                                  To do this right, edit /etc/dnsmasq.conf



                                                  Add your nameservers to the bottom of the file:



                                                  server=8.8.8.8
                                                  server=8.8.4.4


                                                  Restart dnsmasq to use the new settings:
                                                  sudo service dnsmasq restart



                                                  Credit: https://unix.stackexchange.com/a/163506/187949






                                                  share|improve this answer













                                                  For some reason the dns-nameservers statement does nothing in my case. And the other answers are not by the book, as they bypass dnsmasq as it is utilized in Ubuntu.



                                                  To do this right, edit /etc/dnsmasq.conf



                                                  Add your nameservers to the bottom of the file:



                                                  server=8.8.8.8
                                                  server=8.8.4.4


                                                  Restart dnsmasq to use the new settings:
                                                  sudo service dnsmasq restart



                                                  Credit: https://unix.stackexchange.com/a/163506/187949







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered May 6 '18 at 12:05









                                                  DustWolfDustWolf

                                                  215210




                                                  215210























                                                      0














                                                      You might configure that interface in an other file too, since you have more gateways.



                                                      Details are here.






                                                      share|improve this answer






























                                                        0














                                                        You might configure that interface in an other file too, since you have more gateways.



                                                        Details are here.






                                                        share|improve this answer




























                                                          0












                                                          0








                                                          0







                                                          You might configure that interface in an other file too, since you have more gateways.



                                                          Details are here.






                                                          share|improve this answer















                                                          You might configure that interface in an other file too, since you have more gateways.



                                                          Details are here.







                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited Apr 13 '17 at 12:56









                                                          Community

                                                          1




                                                          1










                                                          answered Apr 2 '16 at 20:22









                                                          antivirtelantivirtel

                                                          2,72742546




                                                          2,72742546






























                                                              draft saved

                                                              draft discarded




















































                                                              Thanks for contributing an answer to Ask Ubuntu!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid



                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.


                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f143819%2fhow-do-i-configure-my-static-dns-in-interfaces%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              數位音樂下載

                                                              When can things happen in Etherscan, such as the picture below?

                                                              格利澤436b