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.
To obtain IP address from DHCP server manually you can run
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: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/
.