server wont connect to network; cannot find device eth0

5,424

I suggest that you edit the file /etc/network/interfaces to replace the eth0 entry with wlp3s0 and add the SSID and encryption details, like this:

auto lo
iface lo inet loopback

auto wlp3s0
iface wlp3s0 inet dhcp
wpa-ssid <your_router>
wpa-psk <your_wpa_key>

So that you can ssh and ftp into it, I actually recommend a static address, not DHCP, however, let's get connected first and then proceed.

Reboot and tell us if you are connected:

ping -c3 www.ubuntu.com

EDIT:

If you wish to use ethernet as you indicated in your comments, then the sequence is:

auto lo
iface lo inet loopback

auto enp2s0f0
iface enp2s0f0 inet dhcp

Reboot.

Share:
5,424

Related videos on Youtube

user74091
Author by

user74091

merge keep

Updated on September 18, 2022

Comments

  • user74091
    user74091 over 1 year

    ive looked through several of posts here on related issues and the attempts ive made all seem to lead to the same result, that eth0 is not configured or discoverable.

    i have a new 17.04 server, on a laptop which had successful wifi connection. wifi light wont come on. when i ping google, it says 'name or service not known'. have no wired access to connect to until tomorrow. i do have a live usb of the installer available to boot into recovery mode if that would help.

    some results so far;

    sudo ifup eth0
    

    results;

    internet systems consortorium DHCP client 4.3.5.
    .
    .
    .
    can not find device "eth0"
    error getting hardware address for "eth0": no such device
    .
    .
    failed to bring up eth0
    

    also; sudo ifdown eth0 results ifdown:interface eth0 not configured

    also; sudo ifconfig eth0 up result; eth0 error while getting interface flags: no such device

    some shots from other results;

    interfaces file

    also the above photo i added the lines "#the primary network interface, auto eth0 iface eth0 inet dhcp"

    also photo from ifconfig -a

    enter image description here

    also sorry im not knowledgeable of networking really

    • chili555
      chili555 almost 7 years
      As you can see, your ethernet interface is enp2s0f0, not eth0. As ethernet is not available, let's concentrate on wireless.
  • user74091
    user74091 almost 7 years
    ok that makes sense, however if i need my router information i dont have access to that here... am at work. will have to do that tomorrow when i get home i think
  • user74091
    user74091 almost 7 years
    can i use the ssid thing from my home router and it work here on another network? i wouldnt think so, but i only ask because would i need to edit this file ever time i hook up to another network?
  • chili555
    chili555 almost 7 years
    If you are going to be mobile with a server, then yes. If you really need to change locations regularly then I'd suggest a desktop installation, not server, so you can use Network Manager.
  • user74091
    user74091 almost 7 years
    no this is going to be a server that stays at home, i brought it to work only today to get it working and ran into this issue
  • chili555
    chili555 almost 7 years
    If you are using wireless at home, then this is the recommended method. If you are using ethernet at home, then I will edit the answer.
  • user74091
    user74091 almost 7 years
    i will be using ethernet at home, however i do want to understand why the wireless is not working.
  • chili555
    chili555 almost 7 years
    I will edit my answer tomorrow.
  • user74091
    user74091 almost 7 years
    I edited the /etc/network/interfaces to reflect the above and I still am not able to ping, however a "start job is running for Raise network interfaces" that takes like 5 minutes at start up
  • user74091
    user74091 almost 7 years
  • chili555
    chili555 almost 7 years
    If my answer and chat have been useful, please accept it: askubuntu.com/tour