0

strong textI am not very experienced, but I am trying to run Ubuntu Server on an old laptop for practice as I am studying to work in a data center and want more familiarity working with linux. I have installed Ubuntu Server 20.04 and I am able to log in and access the terminal. If it matters, the laptop is a Microsoft Surface Laptop 3.

The laptop is using a USB 3.0 to Ethernet adapter, I'm unsure if that could be related to the problem, but during the installation the laptop was able to check the ubuntu mirrors just fine, which requires an internet connection. I had this plugged in during installation so the installer should have set up DHCP automatically based on my ethernet connection, if I'm not mistaken.

When running "ping www.google.com" I get "Temporary failure in name resolution". I have tried everything I can find in more than 10 posts on askubuntu, as well as general searches and also ChatGPT, which includes the following:

  • Pinging '8.8.8.8' results in 'Network is unreachable'
  • Manually adding google nameservers to /etc/resolv.conf (8.8.8.8, 8.8.4.4)
  • Restarting network service using sudo systemctl restart networking
  • Manually adding nameservers to /etc/netplan/*.yaml
  • Applying netplan using sudo netplan apply
  • Restarting systemd-resolved using sudo systemctl restart systemd-resolved
  • Manually flushing DNS cache using sudo resolvectl flush-caches
  • sudo systemctl status systemd-resolved shows that the service is active with no errors
  • The command 'ip route' does not return anything, so I tried adding one manually using 'sudo ip route add default via (router ip)', but get the error 'Nexthop has invalid gateway'
  • The command 'dig google.com @8.8.8.8' results in the following error: 'UDP Setup with 8.8.8.8#53 (8.8.8.8) for google.com failed: network unreachable. no servers could be reached'
  • On fresh install, there is only one file in /etc/netplan/, it is "50-cloud-init.yaml" and it contains the following (manually typed while I had it open on the other screen):
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an >instance.
# To disable cloud-init's network configuration capabilities, >write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network
    ethernets:
        eth0:
            dhcp4: true
    version: 2
    wifis: {}
  • I have also tried renaming 'eth0' in the file above to the logical name of the adapter that is used with 'ip a' which is 'enx7cc2c646b86a', and re-applying netplan, but this has not helped either.

I realize that you may need some logs, but I'm not sure about how to get those logs from that PC to this PC to post them here, so if logs are needed can somebody assist me with steps on how I can make that happen? I also do not have a GUI and am not familiar with how to transfer logs to a USB drive using only the terminal.

I hope I have included enough information for assistance with starting the troubleshooting process.

A post was suggested that refers to troubleshooting wireless networking problems, however, I am not worried about wireless networking at the moment and would prefer to keep the system connected via ethernet. My current issues are via ethernet connection. I did go ahead and try to run the script listed in that post to gather data if it would help, but the command cannot run, wget command to access GitHub will not work as I do not have an internet connection on the PC in question. A suggestion inside of the post also provides a link to a method for running the script without any internet connection, but it is only for a GUI. I do not have a GUI and only have access to a terminal, so the post does not help me 1) Because it is discussing wireless networking issues and 2) Because I cannot follow the steps listed in the post, even if I wanted to due to the fact it requires either an active connection or a GUI, of which I have neither.

Results of ip link list :

enter image description here

Update: Following the guide located here I was able to connect to WI-FI (so I thought) and I now have a stable connection, so I thought my problem was solved. However, when I disconnected the ethernet adapter my connection was gone. I was able to discover that running "sudo netplan --debug apply" seems to fix my ethernet adapter issue, allowing me to connect via ethernet, however it only works when --debug is applied. I still am stuck as to why this is happening, and do not want to need to run this command every time I start up the system.

0 Answers0