0

I have installed Ubuntu Server 18.04 LTS (from here) on my Dell Server. Unfortunately, it seems like it doesn't connect to the internet. One point though - during its installation, the network configuration had failed, and I had to manually put in the IP address, netmask, gateway etc. I gave it the values corresponding to the network my ethernet cable is in. (Using the ethernet cable to connect my server with a wifi router).

I checked various websites, and my issue don't relate to any because, unlike most of them I have an eth interface, my /etc/netplan/01-netcfg.yaml file shows the exact values of IP address etc. that I had filled in at the time of installation. My /etc/network/interfaces file is complete i.e. it mentions lo and eno1 (my ethernet interface). And my /etc/resolv.conf file also has the nameserver similar to the one I filled in at the time of installation.

I suspect the ubuntu server isn't connected to internet because:

  • can't ping to anything except localhost. The error is - No route found.
  • ifconfig and ip addr show don't show any IP addresses.

As a result of this, I can't do sudo apt-get update (fails with couldn't fetch from archive. Based on some stack overflow answers, I realized it is the internet issue but once again, none of their answers helped as I explained above).

To whoever who helps - I owe you big time!

OUTPUTS

ip link Output - all interfaces are DOWN

dmesg | egrep -i 'net|eth' I guess the most important output is eno1 link not ready

sudo lshw -C network output

ls -al /etc/resolv.conf

lrwxrwxrwx 1 root root 39 Aug . 1 06:45 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

cat /etc/resolv.conf

nameserver 127.0.0.53
options edns0

cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
    address 192.168.1.70
    netmask 255.255.255.0
    gateway 192.168.1.254
    broadcast 192.168.1.255

cat /etc/netplan/*.yaml

network:
    version: 2
    renderer: networkd
    ethernets:
      eno1:
        addresses: [192.168.1.70/24]
        gateway4: 192.168.1.254
        nameservers:
          addresses:
            "192.168.1.254"
  • Please provide (as root) the outut of: ip link and dmesg | egrep -i 'net|eth' – zeridon Aug 1 at 15:56
  • @zeridon added them. For some reason it isn't allowing me to embed the image, and I can't exactly copy past output from my server to my laptop – Rahul Kothari Aug 1 at 16:12
  • It sounds like you may have mixed/matched netplan and NetworkManager scripts. Edit your question and show me sudo lshw -C network and ls -al /etc/resolv.conf and cat /etc/resolv.conf and cat /etc/network/interfaces and cat /etc/netplan/*.yaml. Yes... I know that's a lot of info. Please don't place that output into the comments, but rather paste them info your question, select the pasted text, and then hit the {} icon to format the text. Start comments to me with @heynnema or I'll miss them. Thanks! – heynnema Aug 1 at 16:35
  • @heynnema just added! I ignored the comments in some of these files. I hope this helps. The information in network/interfaces and resolv.conf relates to the ethernet cable information I attached to my poweredge! – Rahul Kothari Aug 2 at 9:47
0

All the data that you've provided looks fine, but you have two problems.

  • you've mixed and matched netplan and ifupdown scripts

Your /etc/network/interfaces should only contain this:

auto lo
iface lo inet loopback
  • you have a cabling or hub/switch/router/modem problem, as sudo lshw -C network shows link=no

Revisit your cabling from the computer to the hub/switch/router/modem. Use cat 5e or cat 6 cables. Observe the LED light near the ethernet connection on the computer... it should be green or yellow, indicating a link. Use the lshw command to troubleshoot, until it shows link=yes.

  • Okay interesting. So you think I might need to add an ethernet cable? @heynnema – Rahul Kothari Aug 2 at 12:24
  • @RahulKothari you need to have at least one ethernet cable plugged into en01. – heynnema Aug 2 at 12:25
  • are you familiar with idrac and dell servers @heynnema? I have one ethernet cable from my router to the server, and that gives iDRAC an IP Address. There are two other different looking unconnected ethernet ports on the machine. Do you think those could be the NICs - eno1 and eno2? It just seems weird to me that you would need 2 ethernet cables for this. What are your thoughts? – Rahul Kothari Aug 2 at 12:49
  • @RahulKothari idrac provides console access for the sysadmin. The two ports that you refer to are en01 and en02. After making the changes to /etc/network/interfaces, reboot, and then just plug in an ethernet cable to the en01 jack, run the lshw command as before, and note that link=yes on en01. – heynnema Aug 2 at 12:55
  • @RahulKothari status please... – heynnema Aug 2 at 19:38

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.