Unknown network problem

Today I connected my 20.09 machine in another network and had no connectivity. It is again a wired connection. On the same wire other devices work fine - android TV for example. The machine successfully recevies a DHCP address in the same network where the gateway is. The gateway pings OK. However, names are not resolved. I set-up 1.1.1.1 and now sometimes they are resolved, sometimes not. Sometimes nslookup returns Query refused. Then I tried to ping 8.8.8.8 and it didn’t work - I got no response.
Now I am completely not sure what’s going on - if it is not a DNS problem what is it?

1 Like

Maybe it’s related to this issue DNS broke for most programs after recent update on the nixos-unstable channel · Issue #107537 · NixOS/nixpkgs · GitHub ? There seems to be an upstream problem with systemd-resolved. However, you’re on 20.09, so I would expect you not to be affected. If you are, then the problem is a bit more serious than first anticipated.

@Samae thank you very much. I upgraded and the problem is gone. It was very weird and it is great I won’t have to dig into it any longer.

I just found out the root cause. It wasn’t related to the issue in question. A virtual machine had the same IP as my current network gateway.

1 Like

I am trying NixOS from an USB live cd and I keep running in this issue of intermittent internet connection via wired connection.

Sometimes its just for seconds, other are for minutes.

All my other devices in the network have normal access to the internet, even if I use the same cable on my other laptop.

$ nixos-version
20.09.2750.85abeab48b5 (Nightingale)
1 Like

Could it be a DNS problem? You can ping 1.1.1.1 vs some other server to check. If not could it be that other node have the same IP address?

Thanks for your suggestion.

Everything works fine in my network, and my Ubuntu uses 1.1.1.1 and as fallback 9.9.9.9 while my wife computers uses 8.8.8.8, and all of them were working fine.

I am not using static IP addresses in my network, therefore I cannot see I how that could be a problem, but correct me if I am wrong.

To address the network problem with the NIX machine you can first ensure the correct configuration:

networking.useDHCP = false;
networking.interfaces.eno1.useDHCP = true;

Then check if the IP address you get from your router is as expected.

When you loose network access you can try:

  • ping your gateway
  • pinging 1.1.1.1 or similar
  • pinging some known host by name (gnu.org for example)

Why should I need to tweak the installation of the OS, it just should work out of the box, like Ubuntu works or others, unless you are telling me to do that as a debugging mechanism.

The configuration needs to be done at a certain step of the installation as described in the manual NixOS 23.11 manual | Nix & NixOS
I have assumed you got to that stage, haven’t you?

I was using only the live cd from a USB:

I am trying NixOS from an USB live cd and I keep running in this issue of intermittent internet connection via wired connection.

So I have not tried to actually install it, but I assume that if went to install it with the Live CD I would not have to go trough all that manual steps you linked.

Anyway, it should just work from the Live CD, because i never had such issue before when trying Linux distros from a live cd.

What live cd? I’m not aware of it. The typical process is described in the manual. You download an image, burn it to some media, and run the installation process following the steps described. The image in question is not supposed to be used on its own except for an installation.

I was using this:

So I used the image for Gnome from an USB and booted the laptop with it to try out NixOS. Using the USB image to try out an OS is nothing new and is even one of the advantages of Linux distros. I have done in the past with other Linux distros without any issue, and NixOS encourages it to as per the above screenshot:

The graphical installation ISO image contains NixOS installer as well as Desktop Environment and several applications. It’s a live CD , so it allows you to get an impression of NixOS (and the Nix package manager) without installing it.

Now if the ISO cannot work from a USB and if after using it to install NixOS one still needs to go through manual steps, then this doesn’t seem a very good user experience for a beginner evaluating NixOS as a potential replacement for its current OS.

OK, I guess I’ve never tried that.

I’m not saying the ISO shouldn’t work. There are not manual steps required for using it and if you have read the manual you would had known that. While you can ignore the configuration part of my comments for now, the rest are applicable while not complete as debugging any problem requires at least a follow up that is different from “it does not work” or this is “not a good user experience”.

1 Like