Inability to connect to the internet on any Linux boot

Sherry-

New Member
Joined
May 6, 2022
Messages
3
Reaction score
0
Credits
50
I can't seem to be able to connect to the internet. Void Linux is my main boot and "Temporary failure in name resolution" shows up whenever trying to ping any sites. My browser doesn't work either. I assumed it was a problem with the DNS, especially after checking on /etc/resolv.conf and realizing that it's empty and that resolvconf keeps clearing the file, so I attempted to fix it like I did many times before, but failed to do so. I ended up putting 127.0.0.1, 8.8.8.8 and 8.8.4.4 in resolvconf.conf if it's of any importance. It didn't work, so I tried different combinations and solutions of localhost + Google's DNS, only localhost or putting the DNS addresses in resolv.conf itself, preceded by 'nameserver'. Obviously I did try to restart NetworkManager, regenerating the file with 'resolvconf -u', etc. but the problem persisted. Booting up an older kernel through GRUB didn't work. I tried to boot the Live USB of my Void Linux and to my surprise, it didn't work either. The same goes to my ArcoLinux Live USB. Contrary to that, my secondary boot (Windows 10) works perfectly well, and I'm using it right now to post this. Not really sure what to do now that none of the Linux boots work and only Windows does. Everything seems to be okay with the Ethernet cable, since I tested another one, and there's nothing wrong with the Live USBs as they worked perfectly well on another PC.

It's worth noting that when booting the Live USBs I noticed that NetworkManager keeps disconnecting and connecting, which results in a spam of notifications.

Systemctl logs for NetworkManager:
Code:
● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
             └─NetworkManager-ovs.conf
     Active: active (running) since Fri 2022-05-06 12:13:53 UTC; 3min 27s ago
       Docs: man:NetworkManager(8)
   Main PID: 653 (NetworkManager)
      Tasks: 3 (limit: 4576)
     Memory: 7.2M
        CPU: 430ms
     CGroup: /system.slice/NetworkManager.service
             └─653 /usr/bin/NetworkManager --no-daemon

May 06 12:17:09 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839429.9400] manager: NetworkManager state is now DISCONNECTED
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0518] device (enp3s0): carrier: link connected
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0521] device (enp3s0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0527] policy: auto-activating connection 'Wired connection 1' (60495377-2394-3da8-b8fa-f333c31630e7)
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0530] device (enp3s0): Activation: starting connection 'Wired connection 1' (60495377-2394-3da8-b8fa-f333c31630e7)
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0531] device (enp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0533] manager: NetworkManager state is now CONNECTING
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0533] device (enp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0536] device (enp3s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
May 06 12:17:20 ArcoLinuxB-qtile NetworkManager[653]: <info>  [1651839440.0539] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)

Journalctl of ArcoLinux shows this: https://gist.github.com/Scr1ptKid/f37a8d3a39f5c4637db58a1e3ddf9a61


I wasn't sure what to post aside that, so please notify me if there's something I can provide.
 
Last edited:


When putting in a new DNS it should look like this
nameserver 12.34.56.78
then run
Code:
sudo systemctl restart systemd-resolved.service
then check the status
Code:
sudo systemctl status systemd-resolved.service

Alternatively
If you have a Windows machine go to the CMD Prompt and type in
Code:
ipconfig /all
The DNS server info will look something like this :

DNS Servers . . . . . . . . . . . : 12.34.56.78
and add that DNS Server to your Linux DNS as stated above and remove the 8.8.8.8 and 8.8.4.4
generally there should be two nameserver files one your router/modem 168.127.0.1 or something close to that and the other from your ISP

don't forget to run
Code:
sudo resolvconf -u
when finished
 
When putting in a new DNS it should look like this
nameserver 12.34.56.78
then run
Code:
sudo systemctl restart systemd-resolved.service
then check the status
Code:
sudo systemctl status systemd-resolved.service

Alternatively
If you have a Windows machine go to the CMD Prompt and type in
Code:
ipconfig /all
The DNS server info will look something like this :

DNS Servers . . . . . . . . . . . : 12.34.56.78
and add that DNS Server to your Linux DNS as stated above and remove the 8.8.8.8 and 8.8.4.4
generally there should be two nameserver files one your router/modem 168.127.0.1 or something close to that and the other from your ISP

don't forget to run
Code:
sudo resolvconf -u
when finished
Thanks for replying!

DNS shouldn't be an issue since I was checking it on the official Live USB from ArcoLinux, and it works on other computers. Nevertheless, I did check out your solution and systemd-resolved.service is not present on the device. Placing the DNS addresses in the config + generating with
Code:
sudo resolvconf -u
also didn't solve the problem. Speaking of my Void boot, the DNS addresses are set up correctly via NetworkManager and so far worked without any issues until that issue. Naturally, those are the same as on my Windows 10 boot. So, as mentioned before, it's something more. Normally, you aren't supposed to face such problems when using Live USBs. Bizarre.

Any chances of it being a hardware issue? I noticed the diode of my Ethernet port blinking orange. Before that, it was green and wouldn't blink. Yesterday there was a thunderstorm close to my house, so it's a possibility.
 
Any chances of it being a hardware issue?

to check your ethernet port...

ethtool enp1s0 (or whatever your interface name is)
You should see speed, duplex, and connection status if the interface is good.

You can try pinging your gateway by IP address, this by-passes DNS all-together.

With NetworkManager you can't just edit your /etc/resolv.conf anymore. It may work temporarily
in some cases. You can edit your /etc/hosts file and put a few specific IP in there, but it's not
practical for the entire internet.

resolvconf can query IPs and domains, but it doesn't set them on your system.
It's more like dig or nslookup.

With NetworkManager to see what DNS you are using.
resovlctl

To set DNS in NetworkManager
nmcli con show (this will list your connections by name)
nmcli con mod enp1s0 ipv4.method manual ipv4.dns '8.8.8.8,9.9.9.9'
(Obviously your connnection name will likely be different, and you might want different DNS servers)

I usually have to bounce the interface after this.
nmcli con down enp1s0
nmcli con up enp1s0.

In stubborn cases, I sometimes have to reboot.

Another way to check what DNS you are using (/etc/resolv.conf is unreliable)
nmcli con show enp1s0 | grep ipv4.dns
 
to check your ethernet port...

ethtool enp1s0 (or whatever your interface name is)
You should see speed, duplex, and connection status if the interface is good.

You can try pinging your gateway by IP address, this by-passes DNS all-together.

With NetworkManager you can't just edit your /etc/resolv.conf anymore. It may work temporarily
in some cases. You can edit your /etc/hosts file and put a few specific IP in there, but it's not
practical for the entire internet.

resolvconf can query IPs and domains, but it doesn't set them on your system.
It's more like dig or nslookup.

With NetworkManager to see what DNS you are using.
resovlctl

To set DNS in NetworkManager
nmcli con show (this will list your connections by name)
nmcli con mod enp1s0 ipv4.method manual ipv4.dns '8.8.8.8,9.9.9.9'
(Obviously your connnection name will likely be different, and you might want different DNS servers)

I usually have to bounce the interface after this.
nmcli con down enp1s0
nmcli con up enp1s0.

In stubborn cases, I sometimes have to reboot.

Another way to check what DNS you are using (/etc/resolv.conf is unreliable)
nmcli con show enp1s0 | grep ipv4.dns

It's enp3s0 in my case.
Whenever I enter resolvctl or resovlctl the CLI says that a command like that doesn't exist, meaning that I'm most likely missing a package which I cannot install with my connection being broken.

The output for ethtool enp3s0 looks like this:
Code:
Settings for enp3s0:
    Supported ports: [ TP     MII ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: Unknown!
    Duplex: Unknown! (255)
    Auto-negotiation: on
    master-slave cfg: preferred slave
    master-slave status: unknown
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: external
    MDI-X: Unknown
    Supports Wake-on: pumbg
    Wake-on: d
    Link detected: no

Speed and duplex are unknown, and connection status isn't even present. I have no doubts that something is wrong.
As for the results of nmcli con show, the device rubric keeps switching from enp3s0 to ------ and back if I check it a few times in a row. Because of that, the output of nmcli con mod enp3s0 is Error: unknown connection 'enp3s0' and the rest of the commands don't work.

Another thing is my inability to connect to my router. Usually, typing in 192.168.0.1 in my browser would display a menu and allow me to login into it, but it simply doesn't work on neither of my Linux boots. Weirdly, I'm able to do that through Windows 10.
 
I have no doubts that something is wrong.

So it would seem. A cable is bad or a port or something.

Just curious, can you ping your own IP from yourself?
(not localhost loopback, the actual IP).
 
I had an old Dell machine that would not connect via Ethernet but would connect WiFi - I fixed it by running
Code:
sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
then reboot
 
Because of that, the output of nmcli con mod enp3s0 is Error: unknown connection 'enp3s0' and the rest of the commands don't work.

Sometimes the connection isn't the same as the interface name. Often it is something like 'Wired Connection 1' or something similar.

You can use...

nmcli con show

to list the connection names.
 


Top