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

Re: Unwanted route appears at every reboot...



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 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

Cheers,
David.


Reply to: