Ethernet network interface down at each boot; need to run '$ sudo dhclient' after each boot to get Ethernet running

Pas de réponses
Hors ligne
A rejoint: 02/24/2022

I could no longer connect to the internet via Ethernet after I reinstalled Trisquel Nabia 10.0.1 on a X220.

I found that running '$ sudo dhclient' do something that fixes the issue (see below), however, at each reboot, I have to run '$ sudo dhclient' to connect to the internet via Ethernet.

So I have a temporary fix, but, I am still trying to find a permanent fix.

Please, let me know if you have any hint.

Below is some information of what I have tried so far (before I found the 'dhclient temporary fix').

I first tried to access the internet via an Ethernet cable on the same laptop with Trisquel from a USB-live. I accessed the internet. No problem. I assume the issue then is not with the hardware (the cable, the router, or the hardware of the laptop).

Back on the Trisquel that is installed on the laptop, I ran '$ ip addr' which showed that the network interface 'enp0s25' is down (and always down at boot.)

I found various suggestions of fixes for a down network interface at boot. Some mentioned editing (or adding?) /etc/network/interfaces which, I understand, is obsolete. Some more recent posts (about Ubuntu) suggest editing /etc/netplan/*.yaml, however, I am confused, because when I run Trisquel from a USB-live, where I can connect to internet via an Ethernet cable, the directory /etc/netplan/ is empty. The solutions suggests *editing* /etc/netplan/*yaml which my operating system does not have. On my OS, /etc/netplan/ is empty. I would have to *add* this file, and I am a bit skeptical about adding a (configuration?) file.

So, I tried another path. I run '$ sudo ip link set enp0s25 up' to see if setting the network interface 'up' would help me establish an internet connection. No luck. The output of '$ ip addr show enp0s25' shows that the network interface is 'up' but no IP address.

Then I looked around to figure why no IP address showed up under enp0s25. I found some suggestions and tried to run '$ ip route show default' which output was empty which, according to, suggests that the routing table is "corrupted". '$ route -n' returned a table with headers, but no rows or columns below the headers.

As I was pursuing the route of trying to figure why '$ ip route show default' returns nothing, and why the table returned by '$ route -n' is empty, I found this which suggest to check whether "the dhcdbd client [is] installed" by running '$ dhclient' "which may or may not give you an ip address". After looking up '$ man dhclient', I ran '$ dhclient' which returned 'RTNETLINK answers: Operations not permitted'. I tried '$ sudo dhclient' (which returned no output), but "gave me" an IP address. I could access the internet via Ethernet.

However, after reboot, the ethernet interface is (still) down. I have to run '$ sudo dhclient' to get whatever has to get fixed, fixed (I don't know what it is), to get connected to the internet.

After searching for 'dhclient' through the book 'How Linux Works' I understand dhclient is a program that serves as a "network manage system" "to get internet layer configuration tools and scheme attached to the physical network" -- so I would think that dhclient needs to start running at boot. I tried adding 'dhclient' as a startup program (Control Center > Startup Applications > Add > entered 'dhclient as a command 'Network Manager' as name > Add. Then I rebooted. Ran '$ ping'. No luck. I still have to run '$ sudo dhclient' after boot to set things up. (I also tried adding 'sudo dhclient'.)

I will continue troubleshooting to figure why the Ethernet interface is down at start (and whether dhclient not starting at boot is the issue) and will post an update below if I find something. Please let me know if you have hints.