-1

I have a problem with my laptop, because everytime I want to connect to any local network via Ethernet cable or Wifi, then it doesn't assign any Ipv4, so that there is no possibility to have an internet connection. I need to plug reconnect to the internet + use the command below:

dhclient -i wlp3s0 -4

where wlp3s0 is the name of my interface. After shooting it couple of times, it works normally untill I restart my computer. OS is Ubuntu 16.04 and I don't use any VPN connection.

cat /etc/network/interfaces output:

interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
  • 1
    Post output of cat /etc/network/interfaces – Nasir Riley Mar 3 '18 at 17:55
  • @NasirRiley , I have updated my post – Maciej Papurzyński Mar 3 '18 at 18:01
  • 1
    Your interface of wlp3s0 is not in the file and hence won't receive anything via DHCP or at all. Add your interface next to auto and iface with the others and then reboot and you should get an address for it. You need to do that with any interfaces you want to receive addresses via DHCP. – Nasir Riley Mar 3 '18 at 18:12
  • @NasirRiley , After adding, there is no network connection via ethernet as well as none wifi networks are found. – Maciej Papurzyński Mar 3 '18 at 19:10
0

First step is to make your /etc/network/interfaces look like this

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

iface wlp3s0 inet dhcp

The additional line tells the traditional networking scripts to automatically start dhclient for the wlps3s0. Note the top line is a comment and should already start with #; if not, your current file is broken.

If you are running network manager, this may or may not work; I can't help you with network manager.

  • After adding, there is no network connection via ethernet as well as none wifi networks are found. – Maciej Papurzyński Mar 3 '18 at 19:11
  • So the next step is to find out if you are running NetworkManager, and if yes, try to find out what goes wrong with it. – dirkt Mar 3 '18 at 19:55
  • Yes. I am using NM but I have no idea what's more I am able to do with it – Maciej Papurzyński Mar 3 '18 at 20:01

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.