After upgrading Deb10 to Deb11 - No ip address on boot   - Wasted 4 hr's - Page 1
Forum section: electronics / general

author: bingo600
author_rank: Super Contributor
timestamp: July 27, 2023, 04:14:55 pm
content: I have just upgraded my last Deb10 machine (The mailserver) , from Deb10 to Deb11.Upgrading went reasonably well, just some minor quirks.Then reboot , and the server wasGONEWent to the console, and the system was booting & running fine.But there were no ipv4 addreses assigned to the network interfacesI had no problem setting the ip address(es) with ifconfig.So something was fishy with reading my config from /etc/network/interfacesI have been upgrading 10+ debians from 10 to 11, and have never had any major issues.Well besides discovering that python2.7 was gone in deb11, and my py scripts were failing. Was prob. listed somewhere in the release notesSo this one was new .....No IPv4 ip addresses assigned to the interfacesAnd nothing in the logs.Everytime i rebooted or restarted the networking service, connection was lost. And only going to the console to "ifconfig" it ,would bring it back.I noticed i had a directory in /etc/networking calledifupdown2, and a it was indicated that the networking service was using it.Code:# systemctl status networking.service● networking.service - Network initializationLoaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)Active: active (exited) since Thu 2023-07-27 15:14:35 CEST; 9min agoDocs: man:interfaces(5)man:ifup(8)man:ifdown(8)Process: 336 ExecStart=/usr/share/ifupdown2/sbin/start-networking start (code=exited, status=0/SUCCESS)Main PID: 336 (code=exited, status=0/SUCCESS)CPU: 3.748sJul 27 15:13:23 server01 networking: networking: Configuring network interfacesJul 27 15:14:35 server01 systemd: Finished Network initialization.Warning: journal has been rotated since unit was started, output may be incomplete.Strange part was that it was not used onANYof my other installsCode:# systemctl status networking.service● networking.service - Raise network interfacesLoaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)Active: active (exited) since Sat 2023-07-22 08:00:20 CEST; 5 days agoDocs: man:interfaces(5)Process: 440 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)Main PID: 440 (code=exited, status=0/SUCCESS)Tasks: 0 (limit: 2272)Memory: 6.4MCPU: 257msAdd ip address with CIDR netmask , and remove netmask , network & broadcast linesCGroup: /system.slice/networking.serviceJul 22 08:00:20 pippin systemd: Starting Raise network interfaces...Jul 22 08:00:20 pippin ifup: ifup: waiting for lock on /run/network/ifstate.enp0s25Jul 22 08:00:20 pippin systemd: Finished Raise network interfaces.After enabling a lot of debugging for interface activation, i just saw a python traceback wo. any usable info.After much headscratching i did a :Code:root@server01:~# ifdown --force -aroot@server01:~# ifup -aerror: netlink: enp2s0: cannot add address 192.168.10.101/24 dev enp2s0: 'str' object has no attribute 'packed'warning: enp2s0: post-up cmd '/sbin/route add -net 10.10.0.0 netmask 255.255.0.0 gw 192.168.10.1' failed: returned 7 (SIOCADDRT: Network is unreachable)warning: enp2s0: post-up cmd '/sbin/route add -net 10.20.0.0 netmask 255.255.0.0 gw 192.168.10.1' failed: returned 7 (SIOCADDRT: Network is unreachable)error: netlink: enp1s0: cannot add address 192.168.20.100/24 dev enp1s0: 'str' object has no attribute 'packed'Note the lines with error:)error: netlink: enp1s0: cannot add address 192.168.20.100/24 dev enp1s0: 'str' object has no attribute 'packedThat is the "super informative" Debian error message you get when usingifupdown2, and use the old ifconfig syntax in the interfaces fileAfter a bit of googling i found the "hint" herehttps://forum.proxmox.com/threads/network-outage-after-apt-dist-upgrade-and-reboot-on-proxmox-6-1-7.72321/I had to make this modification in my /etc/network/interfaces file , for ifupdown2 not to barf:Add ip address with CIDR netmask , and remove netmask , network & broadcast lines.Code:Bad:## server01 inside interface - Connected to local network# IPv4 address#auto enp2s0iface enp2s0 inet staticaddress 192.168.10.101netmask 255.255.255.0network 192.168.10.0broadcast 192.168.10.255# gateway 192.168.10.1dns-nameservers 127.0.0.1dns-search server-lan.org#Good:## server01 inside interface - Connected to local network# IPv4 address#auto enp2s0iface enp2s0 inet staticaddress 192.168.10.101/24# gateway 192.168.10.1dns-nameservers 127.0.0.1dns-search server-lan.org#Bad:## server01 outside interface - DMZ IP# IPv4 address#auto enp1s0iface enp1s0 inet staticaddress 192.168.20.100netmask 255.255.255.0network 192.168.20.0broadcast 192.168.20.255gateway 192.168.20.1dns-nameservers 127.0.0.1dns-search server-lan.orgGood:## server01 outside interface - DMZ IP# IPv4 address#auto enp1s0iface enp1s0 inet staticaddress 192.168.20.100/24gateway 192.168.20.1dns-nameservers 127.0.0.1dns-search server-lan.org#That was 4 hr's of my life, that could have been spent better.Edit:Seems like ifupdown2 was already present on my Deb10 system, but there it worked wo. probs. - Could be a Py3 issue , since Deb11 "killed" Py2.It might have been installed when i installed iproute2, in order to play with VRF lookalike on linux./Bingo