I have been trying to configure my wifi connection so that the DNS values are correct according to what my ISP had provided. To do this I used the network configuration GUI from Ubuntu 14.04 panel and the connection works perfectly:

enter image description here

It might also be of importance to publish the ifconfig's output when the wi-fi connection was alive and working:

wlan0     Link encap:Ethernet  HWaddr 70:1a:04:a4:f0:31  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::721a:4ff:fea4:f031/64 Scope:Link
          RX packets:4658 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5685 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1534231 (1.5 MB)  TX bytes:1228569 (1.2 MB)

My problem occurred when out of curiosity, I tried to set the values provided by the ISP by editing /etc/network/interfaces. I deleted the numbers from the dialog box shown above and put the below information in the interfaces file:

auto wlan0
  iface wlan0 inet static

Unfortunately after running sudo service network-manager restart in the terminal, I saw that the wi-fi connection has dropped and there is no networks available anymore.

Would you please help me understand what has been incorrect in either the process I've taken or the data I have entered into the interfaces file ?


First of all, your interfaces file needs a gateway address; not broadcast. Second, every wireless interface needs to be directed to connect to a specific SSID and provide a password. I suggest that you amend your file to:

auto wlan0
  iface wlan0 inet static
  wpa-ssid <your_network>
  wpa-psk <your_secret_key>

Finally, Network Manager needs to be directed to NOT manage any interfaces declared in /etc/network/interfaces. Please do:

gksudo gedit /etc/NetworkManager/NetworkManager.conf

Use nano or kate or leafpad if you don't have the text editor gedit. Make certain that managed=false. If it is, simply close the text editor. If not, change it, proofread carefully, save and close the text editor.

Reboot and check:

ping -c3 www.ubuntu.com
  • Thank you very much. But now the problem is that although I am connected to the Internet, I have neither no access to other wi-fi networks nor I can disconnect from this network easily whenever I want. Many of the options in the panel are now disabled !!
    – Tower
    Oct 25 '16 at 21:31
  • That's the choice you make; either the interfaces file or Network Manager. If yours is a stay-at-home computer, then interfaces is perfectly acceptable. If you need to go to work or the university or the coffee shop, then I recommend you clear out the wlan settings from interfaces and let NM do the work.
    – chili555
    Oct 25 '16 at 21:37
  • Thanks, This is what I just did. Thank you very much for your help. I am very new to the networking idea in Linux and it was awesome to be guided by you.
    – Tower
    Oct 25 '16 at 21:46
  • I was very happy to help. I'm glad it's all working.
    – chili555
    Oct 25 '16 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.