[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SOLVED] Re: Unwanted route appears at every reboot...



On Thu, 2022-04-28 at 11:08 -0500, David Wright wrote:
On Wed 27 Apr 2022 at 22:49:59 (+0200), nimrod wrote:

yesterday afternoon, after working all day at office without any
(network) problem, I decided to reboot my machine. Suddenly I could not
navigate on the web. But I could ping the gateway, I could resolve
names... just cannot reach the network (most commands just issued the
classic "network is unreachable" message).

thinking it was a route problem, I issued "ip route" on the terminal
and got this default route:

default dev eno1 scope link src 169.254.30.62 metric 202

I deleted it and add the good one:

ip route add default via 192.168.1.113 dev eno1

and I could navigate again immediately. Nevertheless, after every
reboot the wrong default route is there again. I couldn't find any file
or directory in which this could be configured, nor I found a command
that could create somehow implicitly such a default route.

How can prevent it to come back after reboot? I could add some kind of
/etc/rc.local or a systemd target to remove the wrong one and add the
right one at every boot, but i would prefer to understand why it
happens. At least, since a 169.254 route is always on, I wish to
undestand why it becomes the default one, preventing me from reach the
internet.

Please note that I only use Network Manager from the Gnome GUI with a
static address, and I didn't modify the configuration in several
months. Never touched /etc/network* dirs and files, nor
/etc/systemd/network.

It sounds as if your computer failed to find the DHCP server when you
rebooted "yesterday" afternoon, which could have made it autoconfigure
the interface with 169.254 (called ?mDNS), and add a route. There
doesn't seem to be a problem having these interfaces around unless
they get a default route.

I would look in /var/lib/avahi-autoipd/ and see if there's a file
called <your-eno1's-MAC> containing 169.254.30.62. If so, remove
it and, next time you reboot, it shouldn't happen. (That is, unless
you have a recurrence of the same problem as "yesterday" afternoon.)

I even removed AVAHI, so that file is missing. But anyway it was not AVAHI's fault, see below.


I can simulate the same effect on a laptop by tapping its rfkill
switch when it boots, preventing the wifi from configuring.
Because /e/n/i still has a DHCP ethernet configuration festering
there as well as the wifi one, it sets an ethernet route that
obstructs the wifi's getting one when I un-rfkill the wifi.

As for the original cause, take a look at /var/log/daemon.log*
for "yesterday" afternoon with   zgrep -i -e dhcp -e dhclient

I already had a look at dhclient lines in the logs, but didn't see anything suspect. But when I issued the above grep I found lots of lines like this:

Apr 29 09:19:20 dhcpcd[982]: eno1: adding route to 169.254.0.0/16
Apr 29 09:19:20 dhcpcd[982]: eno1: adding default route

I just purged the dhcpcd5 package, rebooted, et voila, the default route is the good one, no other intervention needed.

I can't even remember why I installed that package, sorry for having all of you to loose your time. But surely it was that. Most likey it can't be installed without a minimum of customization, at least when one has interfaces created by LXD or such. I had LXD on my laptop too, but I didn't install dhcpcd5 on it, and it never had the same problem.

Your suggestions were very interesting and useful, thanks you all!


Cheers,
David.



Reply to: