No blue0 interface anymore after core 155 update

Perhaps someone can give me a hint. After updating from 154 to 155 there is no blue0 interface anymore. blue0 is missing.
System has two physical NICs, green and red, blue0 is mapped on green0 as VLAN10.
“Zone configuration” shows the correct config, network CLI setup for blue is correct (and didn’t change)

/var/log/messages gives a dhcpd warning that there is no subnet declaration for blue0 (no IPv4 addresses), which is correct cause the interface isn’t created.
No other warning ablut blue0.

On another machine with four NICs but the same blue0 VLAN10 config everything went fine with the update.

/var/ipfire/ethernet/settings is pretty much standard:

ORANGE_MODE=
RED_BROADCAST=255.255.255.255
GREEN_STP=
BLUE_STP=
RED_MACADDR=74:d4:35:13:27:f3
RED_DEV=red0
GREEN_DRIVER=r8169
BLUE_NETADDRESS=10.0.0.0
RED_TYPE=PPPOE
BLUE_DRIVER=r8169
RED_DHCP_HOSTNAME=ipfire
GREEN_MACADDR=74:d4:35:13:28:13
GREEN_DESCRIPTION=‘“pci: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)”’
RED_DHCP_FORCE_MTU=
RED_DRIVER=r8169
BLUE_ADDRESS=10.0.0.1
BLUE_SLAVES=
GREEN_NETADDRESS=192.168.1.0
BLUE_DESCRIPTION=‘“pci: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)”’
BLUE_NETMASK=255.255.255.0
ORANGE_SLAVES=
GREEN_MODE=
BLUE_DEV=blue0
RED_DESCRIPTION=‘“pci: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)”’
GREEN_BROADCAST=192.168.1.255
BLUE_BROADCAST=10.0.0.255
BLUE_MODE=
GREEN_SLAVES=
GREEN_DEV=green0
RED_SLAVES=
RED_NETADDRESS=0.0.0.0
ORANGE_MACADDR=
RED_ADDRESS=0.0.0.0
RED_MODE=
GREEN_ADDRESS=192.168.1.1
CONFIG_TYPE=3
ORANGE_STP=
RED_NETMASK=0.0.0.0
GREEN_NETMASK=255.255.255.0
BLUE_MACADDR=

and the according VLANs:

RED_VLAN_ID=
GREEN_VLAN_ID=
BLUE_VLAN_ID=10
RED_PARENT_DEV=
ORANGE_VLAN_ID=
ORANGE_MAC_ADDRESS=
BLUE_MAC_ADDRESS=02:73:b1:0f:ad:8c
GREEN_PARENT_DEV=
ORANGE_PARENT_DEV=
RED_MAC_ADDRESS=
GREEN_MAC_ADDRESS=
BLUE_PARENT_DEV=74:d4:35:13:28:13

Did you ever figure out this issue? I just realized I’m also experiencing this issue on 3 different ipfire devices, where my guest wifi dhcp (blue network) won’t issue ip addresses and I get the same error “No subnet declaration for blue0 (no IPv4 addresses)”. Like you, everything looks normal for me and I’ve touched nothing (except for updating).

Spent a lot of time on this yesterday, and confirmed that because the Blue0 interface is not tied directly to a nic via ‘setup’, and is only configured to a vlan, it’s not starting the interface. Ran the below command to manually start the blue network and got the following output.
“/etc/rc.d/init.d/networking/blue start”

Bringing up the blue0 interface…
Interface blue0 doesn’t exist. [FAIL]

These settings have been like this for years and have worked right up till recently. I don’t personally use the guest network and due to covid I haven’t had a lot of guests over, but my guess is that the issue started back on (or around) update 155.

I’m not 100% sure if this is a “bug” or if a change happened and I just need to update my configuration somehow, but I’d love to have @ms or one of the other developers take a look. :slight_smile:

DHCP/settings file

FILE_GREEN=
NTP2_GREEN=
END_ADDR_BLUE=192.168.10.250
DNS_UPDATE_KEY_SECRET_GREEN=
WINS1_BLUE=
DNS2_BLUE=
ENABLE_BLUE=on
SORT_FLEASELIST=FIPADDR
NTP1_BLUE=192.168.10.1
DOMAIN_NAME_GREEN=
ENABLEBOOTP_GREEN=off
WINS2_BLUE=
NEXT_GREEN=
DNS1_GREEN=192.168.0.1
ENABLE_GREEN=on
DENY_KNOWN_CLIENTS_GREEN=off
DENY_KNOWN_CLIENTS_BLUE=off
START_ADDR_GREEN=192.168.0.100
DNS_UPDATE_KEY_ALGO_BLUE=
END_ADDR_GREEN=192.168.0.149
DEFAULT_LEASE_TIME_GREEN=60
DEFAULT_LEASE_TIME_BLUE=60
DNS_UPDATE_KEY_NAME_BLUE=
DNS_UPDATE_ENABLED=off
DNS1_BLUE=192.168.10.1
NEXT_BLUE=
WINS1_GREEN=
ENABLEBOOTP_BLUE=off
START_ADDR_BLUE=192.168.10.10
DOMAIN_NAME_BLUE=
NTP1_GREEN=192.168.0.1
MAX_LEASE_TIME_BLUE=120
SORT_LEASELIST=IPADDR
DNS2_GREEN=
MAX_LEASE_TIME_GREEN=120
DNS_UPDATE_KEY_ALGO_GREEN=hmac-md5
WINS2_GREEN=
DNS_UPDATE_KEY_SECRET_BLUE=
NTP2_BLUE=
FILE_BLUE=
DNS_UPDATE_KEY_NAME_GREEN=

dhcpd.conf file

subnet 192.168.10.0 netmask 255.255.255.0 #BLUE
{
pool {
	range 192.168.10.10 192.168.10.250;
     }
	option subnet-mask 255.255.255.0;
	option domain-name "";
	option routers 192.168.10.1;
	option domain-name-servers 192.168.10.1;
	option ntp-servers 192.168.10.1;
	default-lease-time 3600;
	max-lease-time 7200;
	option wpad "http://192.168.10.1:81/wpad.dat";
} #BLUE

ethernet/vlans file

GREEN_MAC_ADDRESS=
BLUE_PARENT_DEV=00:0d:b9:49:be:dc
GREEN_PARENT_DEV=
RED_VLAN_ID=
BLUE_VLAN_ID=1003
RED_PARENT_DEV=
RED_MAC_ADDRESS=
ORANGE_MAC_ADDRESS=
BLUE_MAC_ADDRESS=02:1b:96:5a:8e:81
GREEN_VLAN_ID=
ORANGE_PARENT_DEV=
ORANGE_VLAN_ID=

ethernet/settings file

RED_NETMASK=0.0.0.0
CONFIG_TYPE=3
ORANGE_SLAVES=
RED_DHCP_FORCE_MTU=
RED_SLAVES=
RED_DEV=red0
GREEN_MACADDR=00:0d:b9:49:be:dc
RED_TYPE=DHCP
GREEN_DESCRIPTION='"pci: Intel Corporation I210 Gigabit Network Connection (rev 03)"'
BLUE_MODE=
GREEN_SLAVES=
GREEN_STP=
RED_MACADDR=00:0d:b9:49:be:de
BLUE_DESCRIPTION='"pci: Intel Corporation I210 Gigabit Network Connection (rev 03)"'
GREEN_MODE=
GREEN_DEV=green0
BLUE_STP=
RED_ADDRESS=0.0.0.0
BLUE_NETMASK=255.255.255.0
RED_DHCP_HOSTNAME=ipfire
BLUE_NETADDRESS=192.168.10.0
GREEN_BROADCAST=192.168.0.255
RED_MODE=
BLUE_ADDRESS=192.168.10.1
RED_BROADCAST=255.255.255.255
BLUE_SLAVES=
GREEN_NETMASK=255.255.255.0
ORANGE_STP=
RED_DESCRIPTION='"pci: Intel Corporation I210 Gigabit Network Connection (rev 03)"'
GREEN_NETADDRESS=192.168.0.0
ORANGE_MODE=
BLUE_MACADDR=
BLUE_BROADCAST=192.168.10.255
GREEN_DRIVER=igb
BLUE_DEV=blue0
RED_NETADDRESS=0.0.0.0
ORANGE_MACADDR=
RED_STP=
BLUE_DRIVER=igb
GREEN_ADDRESS=192.168.0.1
RED_DRIVER=igb

I am no expert on this and I have no idea why it would have worked before but looking at your zone config I see that you have both the Green and the Blue zone lined up with eth0 with Green on Native and Blue on VLAN. As far as I am aware to make two zones work on one interface you have to have one of them in bridge mode but you have them both in Default mode.

However you have a spare interface card at eth1, so I would move the Blue zone to eth1 and set that entry to VLAN 1003.
You might need to go to the setup mode and assign eth1 to the Blue interface.

Hopefully other people can either confirm or correct what I have said.

1 Like

Did you ever figure out this issue?

No, unfortunately I didn’t. The according system is still running without the blue0 interface. Therefore no WLAN in this part of the office.

I don’t have a spare port on the box, so VLAN is necessary in this setup.
Further a lot of other things like Asterisk etc. are running on this machine, so I didn’t have time to reinstall it completely.
Meanwhile it’s updated to core 158, but the problem didn’t disappear.

I should probably explain my topology a little better, my wireless AP runs multiple networks, One wireless network for my green and one for my blue guest (the blue network is on VLAN 1003). The one AP Plugs into my managed switch, and my switch (with all devices) connects to my firewall box where you see the green Network on eth0. Though I could set eth1 to blue, would loose green wifi and blue network would still need to be VLAN’d (so it’s basically the same thing as I have now).

Based on what I see, I would venture to guess that something was changed in the interface startup code, and whether or not they require a physical port to be assigned as part of their startup checks. You have the ability to leave an interface unassigned as part of the “setup” process (which is what we have), but this issue appears to contradict that option as it wont start without one.

The strange thing is, I’m running nearly this same “blue0 as VLAN on green0” setup on four instances, while only one is having this issue.

Ok, went deeper and started looking at the code on github. I’m not 100% sure where the blue interface gets set other than in ‘setup’ as it doesn’t appear that ‘zone config’ checks/cares if it’s set, however, because the networking/any script (see below) checks and does a validation, this fails because the blue interface is not set via the “ip link” command…

https://github.com/ipfire/ipfire-2.x/blob/59ebcaedbd5a1cc2a451c80460f674c312edbcd8/src/initscripts/networking/any

Which is verified with below commands and non-existance of blue0

“ip link show blue0”

Device “blue0” does not exist.

“ip link show green0”

2: green0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:b9:49:be:dc brd ff:ff:ff:ff:ff:ff

“ls /sys/class/net/”

eth1 green0 lo red0

This confirms that failure is due to a network adapter not being configured for the blue interface (which we basically already knew, but at least it’s confirmed).

I spent a few hours going through the commits looking for where the code was changed that could have affected this outcome, and other than a move of some functions to the network-functions.pl file, I’m not seeing anything specific (keep in mind there are a LOT of commits and I have no idea which file(s) is the cause or when it was modified). The Devs know this code inside and out and i’m sure would be able to pinpoint how to either prevent the validation of the vlan network from failing, or to register it as an interface somehow. I’m tempted (and may) modify my config files to force the blue interface into a state where it won’t fail and will launch, but doing so doesn’t mean it’ll work… so… I’m hoping someone with more knowledge of what’s going on can take a look.

Also, as a side-note… I think I found another “bug” (or at least a duplication of code) as part of my poking around ( @ms, @bonnietwin, or others). In same linked file above, lines 30 & 34 (plus additional lines under each other colored interfaces), the “DEVICE=”${******_DEV}" lines are duplicated.

I’ve come to the pretty obvious conclusion that this is an undesired software configuration, so I’ve submitted a bug report for it. Hopefully we can get that functionality restored again.
https://bugzilla.ipfire.org/show_bug.cgi?id=12676

@gitarman94 , thanks a lot for your analysis.
Yes this is a strange bug and as far as I noticed it, it was not directly introduced by an update.
After an update I always do a basic system check and I’m sure I would have noticed a non functional WLAN. It just happend so time after, but it seems related to core 155 and above.
So, I really don’t know what the cause might be, perhaps some kind of race condition during startup.

Hey @marco, I think we may have found and fixed the issue. I’d love to have you test the solution that Michael had me do over in the bug report. You can read the entire thread, but basically, you’ll probably have to replace a file on your system with a fresh copy from the git repository.

So, the contents of the file found (here) needs to replace the contents of the same file on your system. The file in question (“network-hotplug-vlan”) is found in the ‘/lib/udev/’ directory). Once contents replaced, you’ll then need to have one of the lines additionally modified to match the directions Michael gave in comment #3. Once the update has been made, you could start the blue interface manually, or reboot the device (I would probably just reboot it). Your system should now be fixed, but please test and let us know what actually happens so we can confirm if that’s the solution to the issue.

1 Like

Many thanks to @gitarman94 and @ms for resolving this.
Your solution above enabled blue0. I left a comment in bugzilla.