etc/network/interface empty no internet connection











up vote
0
down vote

favorite












My internet connection has gone suddenly and I find my /etc/network/interfaces is completely empty, I can't ping my router and ifconfig for eth0 shows no ip address or broadcast address, I tried network manager but it can't find a network, I tried adding eth0 to ip4 with its address and dns address. I'm completely stumped. The last thing I did before I rebooted to find no connection was run this command for sound



sudo alsa force-reload


I don't know if that could've caused, I'm at a loss, if anyone knows the correct way of getting a connection back from scratch I'd be euphoric



thanks



I've got to the stage where if I open etc/network/interface from the command line it's completely blank but if I open the file manually its populated but i can't edit it because it's read only even if I log into root, I'm not sure if there are two files but I can't find a way of finding out their directory addresses, sorry for my lack of knowledge, I guess there's an easy way, I guess the proper one has moved, how can I change permissions if root won't let me and get it back into its proper place










share|improve this question




























    up vote
    0
    down vote

    favorite












    My internet connection has gone suddenly and I find my /etc/network/interfaces is completely empty, I can't ping my router and ifconfig for eth0 shows no ip address or broadcast address, I tried network manager but it can't find a network, I tried adding eth0 to ip4 with its address and dns address. I'm completely stumped. The last thing I did before I rebooted to find no connection was run this command for sound



    sudo alsa force-reload


    I don't know if that could've caused, I'm at a loss, if anyone knows the correct way of getting a connection back from scratch I'd be euphoric



    thanks



    I've got to the stage where if I open etc/network/interface from the command line it's completely blank but if I open the file manually its populated but i can't edit it because it's read only even if I log into root, I'm not sure if there are two files but I can't find a way of finding out their directory addresses, sorry for my lack of knowledge, I guess there's an easy way, I guess the proper one has moved, how can I change permissions if root won't let me and get it back into its proper place










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      My internet connection has gone suddenly and I find my /etc/network/interfaces is completely empty, I can't ping my router and ifconfig for eth0 shows no ip address or broadcast address, I tried network manager but it can't find a network, I tried adding eth0 to ip4 with its address and dns address. I'm completely stumped. The last thing I did before I rebooted to find no connection was run this command for sound



      sudo alsa force-reload


      I don't know if that could've caused, I'm at a loss, if anyone knows the correct way of getting a connection back from scratch I'd be euphoric



      thanks



      I've got to the stage where if I open etc/network/interface from the command line it's completely blank but if I open the file manually its populated but i can't edit it because it's read only even if I log into root, I'm not sure if there are two files but I can't find a way of finding out their directory addresses, sorry for my lack of knowledge, I guess there's an easy way, I guess the proper one has moved, how can I change permissions if root won't let me and get it back into its proper place










      share|improve this question















      My internet connection has gone suddenly and I find my /etc/network/interfaces is completely empty, I can't ping my router and ifconfig for eth0 shows no ip address or broadcast address, I tried network manager but it can't find a network, I tried adding eth0 to ip4 with its address and dns address. I'm completely stumped. The last thing I did before I rebooted to find no connection was run this command for sound



      sudo alsa force-reload


      I don't know if that could've caused, I'm at a loss, if anyone knows the correct way of getting a connection back from scratch I'd be euphoric



      thanks



      I've got to the stage where if I open etc/network/interface from the command line it's completely blank but if I open the file manually its populated but i can't edit it because it's read only even if I log into root, I'm not sure if there are two files but I can't find a way of finding out their directory addresses, sorry for my lack of knowledge, I guess there's an easy way, I guess the proper one has moved, how can I change permissions if root won't let me and get it back into its proper place







      networking internet network-manager






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 25 '15 at 10:32

























      asked Mar 25 '15 at 0:02









      Dave Wold

      625




      625






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          For Desktop versions of Ubuntu (which use NetworkManager) the /etc/network/interfaces file should contain only the following loopback interface definition:



          # interfaces(5) file used by ifup(8) and ifdown(8)
          auto lo
          iface lo inet loopback


          If your /etc/network/interfaces file is really completely empty, then paste the above into it, save and reboot.






          share|improve this answer























          • Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
            – Dave Wold
            Mar 25 '15 at 9:48










          • Did you type etc/interfaces or /etc/interfaces? The leading / is important.
            – steeldriver
            Mar 25 '15 at 12:56


















          up vote
          0
          down vote













          Try



          ifconfig eth0 IP_ADDRESS netmask 255.255.255.0 up


          to see if the network interface is actually available to the system. Just because it is not showing inside the /etc/network/interfaces it does not mean it is gone. Routers usually have some standard IP address like 192.168.1.1, 192.168.2.1 etc. You can also check its manual too see the details if you have not changed the configuration that is. ;)



          I stumbled upon a similar problem here. Although its in a virtual environment it might be able to help you. You can also see a very basic structure of such file and fill the rest as you see fit.



          As for the empty file I'm not sure how this happened. Upon shutdown system might have crashed (go figure why...) and data loss might have occurred, which in your case is unfortunate since this very important file has turned into garbage.






          share|improve this answer























          • Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
            – Dave Wold
            Mar 25 '15 at 9:53










          • You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
            – rbaleksandar
            Mar 25 '15 at 11:44











          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',
          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%2f600918%2fetc-network-interface-empty-no-internet-connection%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          For Desktop versions of Ubuntu (which use NetworkManager) the /etc/network/interfaces file should contain only the following loopback interface definition:



          # interfaces(5) file used by ifup(8) and ifdown(8)
          auto lo
          iface lo inet loopback


          If your /etc/network/interfaces file is really completely empty, then paste the above into it, save and reboot.






          share|improve this answer























          • Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
            – Dave Wold
            Mar 25 '15 at 9:48










          • Did you type etc/interfaces or /etc/interfaces? The leading / is important.
            – steeldriver
            Mar 25 '15 at 12:56















          up vote
          1
          down vote













          For Desktop versions of Ubuntu (which use NetworkManager) the /etc/network/interfaces file should contain only the following loopback interface definition:



          # interfaces(5) file used by ifup(8) and ifdown(8)
          auto lo
          iface lo inet loopback


          If your /etc/network/interfaces file is really completely empty, then paste the above into it, save and reboot.






          share|improve this answer























          • Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
            – Dave Wold
            Mar 25 '15 at 9:48










          • Did you type etc/interfaces or /etc/interfaces? The leading / is important.
            – steeldriver
            Mar 25 '15 at 12:56













          up vote
          1
          down vote










          up vote
          1
          down vote









          For Desktop versions of Ubuntu (which use NetworkManager) the /etc/network/interfaces file should contain only the following loopback interface definition:



          # interfaces(5) file used by ifup(8) and ifdown(8)
          auto lo
          iface lo inet loopback


          If your /etc/network/interfaces file is really completely empty, then paste the above into it, save and reboot.






          share|improve this answer














          For Desktop versions of Ubuntu (which use NetworkManager) the /etc/network/interfaces file should contain only the following loopback interface definition:



          # interfaces(5) file used by ifup(8) and ifdown(8)
          auto lo
          iface lo inet loopback


          If your /etc/network/interfaces file is really completely empty, then paste the above into it, save and reboot.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 25 '15 at 10:37









          heemayl

          65.7k8137210




          65.7k8137210










          answered Mar 25 '15 at 3:25









          steeldriver

          65.3k11104176




          65.3k11104176












          • Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
            – Dave Wold
            Mar 25 '15 at 9:48










          • Did you type etc/interfaces or /etc/interfaces? The leading / is important.
            – steeldriver
            Mar 25 '15 at 12:56


















          • Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
            – Dave Wold
            Mar 25 '15 at 9:48










          • Did you type etc/interfaces or /etc/interfaces? The leading / is important.
            – steeldriver
            Mar 25 '15 at 12:56
















          Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
          – Dave Wold
          Mar 25 '15 at 9:48




          Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
          – Dave Wold
          Mar 25 '15 at 9:48












          Did you type etc/interfaces or /etc/interfaces? The leading / is important.
          – steeldriver
          Mar 25 '15 at 12:56




          Did you type etc/interfaces or /etc/interfaces? The leading / is important.
          – steeldriver
          Mar 25 '15 at 12:56












          up vote
          0
          down vote













          Try



          ifconfig eth0 IP_ADDRESS netmask 255.255.255.0 up


          to see if the network interface is actually available to the system. Just because it is not showing inside the /etc/network/interfaces it does not mean it is gone. Routers usually have some standard IP address like 192.168.1.1, 192.168.2.1 etc. You can also check its manual too see the details if you have not changed the configuration that is. ;)



          I stumbled upon a similar problem here. Although its in a virtual environment it might be able to help you. You can also see a very basic structure of such file and fill the rest as you see fit.



          As for the empty file I'm not sure how this happened. Upon shutdown system might have crashed (go figure why...) and data loss might have occurred, which in your case is unfortunate since this very important file has turned into garbage.






          share|improve this answer























          • Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
            – Dave Wold
            Mar 25 '15 at 9:53










          • You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
            – rbaleksandar
            Mar 25 '15 at 11:44















          up vote
          0
          down vote













          Try



          ifconfig eth0 IP_ADDRESS netmask 255.255.255.0 up


          to see if the network interface is actually available to the system. Just because it is not showing inside the /etc/network/interfaces it does not mean it is gone. Routers usually have some standard IP address like 192.168.1.1, 192.168.2.1 etc. You can also check its manual too see the details if you have not changed the configuration that is. ;)



          I stumbled upon a similar problem here. Although its in a virtual environment it might be able to help you. You can also see a very basic structure of such file and fill the rest as you see fit.



          As for the empty file I'm not sure how this happened. Upon shutdown system might have crashed (go figure why...) and data loss might have occurred, which in your case is unfortunate since this very important file has turned into garbage.






          share|improve this answer























          • Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
            – Dave Wold
            Mar 25 '15 at 9:53










          • You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
            – rbaleksandar
            Mar 25 '15 at 11:44













          up vote
          0
          down vote










          up vote
          0
          down vote









          Try



          ifconfig eth0 IP_ADDRESS netmask 255.255.255.0 up


          to see if the network interface is actually available to the system. Just because it is not showing inside the /etc/network/interfaces it does not mean it is gone. Routers usually have some standard IP address like 192.168.1.1, 192.168.2.1 etc. You can also check its manual too see the details if you have not changed the configuration that is. ;)



          I stumbled upon a similar problem here. Although its in a virtual environment it might be able to help you. You can also see a very basic structure of such file and fill the rest as you see fit.



          As for the empty file I'm not sure how this happened. Upon shutdown system might have crashed (go figure why...) and data loss might have occurred, which in your case is unfortunate since this very important file has turned into garbage.






          share|improve this answer














          Try



          ifconfig eth0 IP_ADDRESS netmask 255.255.255.0 up


          to see if the network interface is actually available to the system. Just because it is not showing inside the /etc/network/interfaces it does not mean it is gone. Routers usually have some standard IP address like 192.168.1.1, 192.168.2.1 etc. You can also check its manual too see the details if you have not changed the configuration that is. ;)



          I stumbled upon a similar problem here. Although its in a virtual environment it might be able to help you. You can also see a very basic structure of such file and fill the rest as you see fit.



          As for the empty file I'm not sure how this happened. Upon shutdown system might have crashed (go figure why...) and data loss might have occurred, which in your case is unfortunate since this very important file has turned into garbage.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:23









          Community

          1




          1










          answered Mar 25 '15 at 0:50









          rbaleksandar

          31517




          31517












          • Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
            – Dave Wold
            Mar 25 '15 at 9:53










          • You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
            – rbaleksandar
            Mar 25 '15 at 11:44


















          • Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
            – Dave Wold
            Mar 25 '15 at 9:53










          • You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
            – rbaleksandar
            Mar 25 '15 at 11:44
















          Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
          – Dave Wold
          Mar 25 '15 at 9:53




          Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
          – Dave Wold
          Mar 25 '15 at 9:53












          You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
          – rbaleksandar
          Mar 25 '15 at 11:44




          You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.
          – rbaleksandar
          Mar 25 '15 at 11:44


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f600918%2fetc-network-interface-empty-no-internet-connection%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

          Quarter-circle Tiles

          build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

          Mont Emei