4

I just finished installing the new Ubuntu 19.04 Server on my downstairs server, but it doesn't appear to have an internet connection despite being wired to the router using a cat-6 cable.

All pings fail, including ping 8.8.8.8 with the same error message. I've tried using ifconfig to set the state to up, but this didn't help.

ip a reveals that the server doesn't seem to have an IP address.

Pictures below: Ubuntu Server

  • 1
    Did you tried to use sudo dhclient enp0s25? Just curious why do you use 9 month-supported Ubuntu on server instead of LTS with 5 years of support? – N0rbert Apr 26 at 19:13
  • It could be a DHCP issue, but I would honestly start bare bones here and check the back of the server for a link light. It should be gree, not amber. Let us know what you find. – jwcooper Apr 26 at 19:40
  • @N0rbert This is just for my backup server. I didn't really care although I probably should have used the LTS release. I'm not doing anything serious. It just has to stay functional for a month while I'm gone for backups. I guess I'll replace it with 18.04LTS since that has been debugged better. – Sarah Szabo Apr 26 at 20:00
  • @N0rbert Your solution fixed the issue. It now has an IP address. I don't know why it didn't set up that way though. I'm not really knowledgeable about networking yet. If you post your solution as an answer, I'll upvote and accept it :] – Sarah Szabo Apr 26 at 20:02
3

To obtain IP address from DHCP server manually you can run

sudo dhclient enp0s25 

To make this solution permanent you should use the corresponding configuration file inside 19.04 for Netplan (see server guide, p. 43) - /etc/netplan/01-netcfg.yaml with the following contents:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s25:
      dhcp4: yes

then apply the configuration with sudo netplan apply.

The file contents of /etc/netplan/01-netcfg.yaml above is modified variant of /usr/share/doc/netplan/examples/dhcp.yaml configuration file.
More examples of Netplan configuration are shown in /usr/share/doc/netplan/examples/.

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.