Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #247675 > unrolled thread

Unwanted route appears at every reboot...

Started bynimrod <nimrod@paralog.it>
First post2022-04-27 23:00 +0200
Last post2022-04-29 14:40 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Unwanted route appears at every reboot... nimrod <nimrod@paralog.it> - 2022-04-27 23:00 +0200
    Re: Unwanted route appears at every reboot... Jeremy Ardley <jeremy@ardley.org> - 2022-04-27 23:30 +0200
    Re: Unwanted route appears at every reboot... Charles Curley <charlescurley@charlescurley.com> - 2022-04-27 23:40 +0200
    Re: Unwanted route appears at every reboot... David Wright <deblis@lionunicorn.co.uk> - 2022-04-28 18:10 +0200
      [SOLVED] Re: Unwanted route appears at every reboot... nimrod <nimrod@paralog.it> - 2022-04-29 14:40 +0200

#247675 — Unwanted route appears at every reboot...

Fromnimrod <nimrod@paralog.it>
Date2022-04-27 23:00 +0200
SubjectUnwanted route appears at every reboot...
Message-ID<EgWVr-bCvG-9@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi,

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.

Any hint will be much appreciated.

Best regards.

[toc] | [next] | [standalone]


#247678

FromJeremy Ardley <jeremy@ardley.org>
Date2022-04-27 23:30 +0200
Message-ID<EgXot-bCWE-3@gated-at.bofh.it>
In reply to#247675

[Multipart message — attachments visible in raw view] — view raw

On 28/4/22 4:49 am, nimrod wrote:
> default dev eno1 scope link src 169.254.30.62 metric 202
>
>
the 169.254 address is Used for link-local addresses between two hosts 
on a single link when no IP address is otherwise specified, such as 
would have normally been retrieved from a DHCP server.

So something is stopping your system from assigning the static address.

When it is booted and in  the bad state what does 'ip a' show?

What does it show in syslog?

One suspicion is that another host on the LAN has  the same address?


-- 
Jeremy

[toc] | [prev] | [next] | [standalone]


#247680

FromCharles Curley <charlescurley@charlescurley.com>
Date2022-04-27 23:40 +0200
Message-ID<EgXy9-bCZU-1@gated-at.bofh.it>
In reply to#247675
On Wed, 27 Apr 2022 22:49:59 +0200
nimrod <nimrod@paralog.it> wrote:

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

Check that NM didn't somehow acquire a spurious route. Edit Connections
-> Your connection, little gear wheel in the lower left. IPv4 Settings
-> Routes.

Are you sure you aren't getting that spurious route from the DHCP
server? To check on that, add a short script to
/etc/NetworkManager/dispatcher.d, called, say, 50environment. It should
look something like

--------------------------------------------------
#!/bin/bash
LOG=/var/log/NetworkManager

{
  echo "Environment is:"
  printenv
  route -n
} >> "${LOG}" 2>&1
--------------------------------------------------

Somewhere in that log file you should find a variable that specifies
extra routes, if any.

You can also check to be sure you are getting the correct
address. That should be in $IP4_ADDRESS. Mine looks like:

IP4_ADDRESS_0=192.168.100.44/24 192.168.100.31

I think the second address is either the DHCP server, or the DNS server.

The variables NM uses are detailed in man 8 networkmanager.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

[toc] | [prev] | [next] | [standalone]


#247708

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-04-28 18:10 +0200
Message-ID<EheSl-bOaD-9@gated-at.bofh.it>
In reply to#247675
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.

[toc] | [prev] | [next] | [standalone]


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

Fromnimrod <nimrod@paralog.it>
Date2022-04-29 14:40 +0200
Subject[SOLVED] Re: Unwanted route appears at every reboot...
Message-ID<Ehy4F-bZUg-7@gated-at.bofh.it>
In reply to#247708

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web