You are not logged in.

#1 2023-02-19 23:05:46

mhill8
Member
Registered: 2020-11-10
Posts: 6

[SOLVED] Help! Networking broken after system update

I update and boot my main system once a week, and have been doing so for over a year.  I have not made any configuration changes since the last reboot.  Today I did 'pacman -Syu' and rebooted as usual; there were about 110 packages updated.  On booting, the "waiting for network to start" ran for two minutes before timing out.  When I logged in, I found the network device up with a link, but no route for it.

This system has a single Ethernet interface configured with a static IP, so there's no issue of DHCP or wifi.  No Network Manager or netctl.  The static IP/gateway info is defined in /etc/systemd/network/10-lan.network .

I tried adding the default route two ways and got different errors:

# route add default gw <GW_IP>
SIOCADDRT: Network is unreachable
# ip route add default via <GW_IP>
Error: Nexthop has invalid gateway

I've tried reverting to the previous packages for linux-zen*, linux-firmware*, amd-ucode, and systemd* and rebooting after each change, but it's still failing.

The interface is using driver 'igb'.  I don't see any errors about networking in journalctl; it shows the interface bringing up the link, and then much later it shows the "wait for network" failure.

Unfortunately, this means I can't copy & paste commands and output for debugging; I have to go back and forth between a working laptop and the problem host.

Any help getting the networking back would be greatly appreciated!

Last edited by mhill8 (2023-02-20 01:03:48)

Offline

#2 2023-02-20 00:00:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,465

Re: [SOLVED] Help! Networking broken after system update

Standard static definition via systemd file.

What does this actually mean?

Online

#3 2023-02-20 00:02:58

mhill8
Member
Registered: 2020-11-10
Posts: 6

Re: [SOLVED] Help! Networking broken after system update

Scimmia wrote:

Standard static definition via systemd file.

What does this actually mean?

The static IP/gateway info is defined in /etc/systemd/network/10-lan.network .  Edited OP for clarity.

Last edited by mhill8 (2023-02-20 00:04:32)

Offline

#4 2023-02-20 01:02:03

mhill8
Member
Registered: 2020-11-10
Posts: 6

Re: [SOLVED] Help! Networking broken after system update

I figured it out from an obscure clue in journalctl while looking at the boot-time messages.

systemd-networkd[1100]: /etc/systemd/network/10-lan.network:5: An address '192.168.19.2' is specified without prefix length. Assuming the prefix length is 32.Please specify the prefix length explicitly.

I thought, "Oh, the IP address is a /32, so let's put that in the file to make the warning go away."  I appended "/32" to the IP (because tools always default to doing the Right Thing, right?!  tongue )

I kept coming back to the "Nexthop has invalid gateway", and was looking at the 10-lan.{link,network} files.  And it occurred to me, where was the netmask (/24) defined?  It wasn't.  Hmmmm...  maybe the number after the IP was supposed to be the subnet size.  I changed it to "/24" and just like that, the 'add route' command worked!  I updated the files I'd downgraded and rebooted, and all is well.

After reboot, I went and looked for the exact message to post here, and I see that prior to today's reboot, the message was:

systemd-networkd[1095]: /etc/systemd/network/10-lan.network:5: An address '192.168.19.2' is specified without prefix length. The behavior of parsing addresses without prefix length will be changed in the future release. Please specify prefix length explicitly.

So systemd did change behavior this week, but at the time I downgraded it to the previous working version, I had already made the "/32" change to the file, so systemd-networkd silently used the broken configuration.  neutral

Lesson learned:  "prefix length" means "subnet size" in this context.

Offline

#5 2023-02-20 10:31:03

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Help! Networking broken after system update

Looks a warning for this was introduced 4 years ago after a bug report: https://github.com/systemd/systemd/comm … 77c0068545

mhill8 wrote:

Lesson learned:  "prefix length" means "subnet size" in this context.

Not exactly, although they are related; prefix length corresponds more directly to the subnet mask (for IPv4; IPv6 doesn't use netmasks, only prefixes). The subnet size is the number of addresses that can be formed while keeping the first "prefix length" bits fixed. For /24: size = 2^(32-24) = 2^8 = 256.

Offline

Board footer

Powered by FluxBB