My home network consists of an E8450 router (running OpenWrt 23.05 latest snapshot), a switch, and several APs, with the network topology as shown in the diagram.
The E8450 has three VLANs (10/20/30) configured for IoT, Guest, and Home networks respectively. The LAN1 port is tagged with VLANs 10/20/30.
The E8450's LAN1 port connects to the switch, with corresponding switch ports also tagged for VLANs 10/20/30. The APs' connected switch ports are similarly configured with tagged VLANs 10/20/30.
Configuration files:
/etc/config/network
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
config bridge-vlan
option device 'br-lan'
option vlan '10'
list ports 'lan1:t'
config bridge-vlan
option device 'br-lan'
option vlan '20'
list ports 'lan1:t'
config bridge-vlan
option device 'br-lan'
option vlan '30'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:u*'
config interface 'IoT'
option proto 'static'
option device 'br-lan.10'
option ipaddr '10.100.10.254'
option netmask '255.255.255.0'
config interface 'Guest'
option proto 'static'
option device 'br-lan.20'
option ipaddr '10.100.20.254'
option netmask '255.255.255.0'
config interface 'lan'
option device 'br-lan.30'
option proto 'static'
option ipaddr '10.100.30.254'
option netmask '255.255.0.0'
option ip6assign '60'
/etc/config/dhcp
config dhcp 'lan'
option interface 'lan'
option start '7681'
option limit '100'
option leasetime '3m'
option dhcpv6 'hybrid'
option ra 'hybrid'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option netmask '255.255.0.0'
option ndp 'hybrid'
option ra_management '1'
config dhcp 'IoT'
option interface 'IoT'
option start '1'
option limit '200'
option leasetime '3m'
option netmask '255.255.255.0'
config dhcp 'Guest'
option interface 'Guest'
option start '1'
option limit '200'
option leasetime '3m'
option netmask '255.255.255.0'
option dhcpv6 'hybrid'
option ndp 'hybrid'
option ra 'hybrid'
list ra_flags 'managed-config'
list ra_flags 'other-config'
With the above configuration, I expected IoT devices to receive 10.100.10.xxx addresses, but they actually get assigned 10.100.30.xxx addresses.
However, if I reorder the DHCP pools in /etc/config/dhcp as follows:
config dhcp 'IoT'
...
config dhcp 'Guest'
...
config dhcp 'lan'
...
Then IoT devices correctly receive 10.100.10.xxx addresses, Guest devices get 10.100.20.xxx, and Home devices obtain 10.100.30.xxx as intended.
This makes me wonder: Does the order of DHCP pool configurations in /etc/config/dhcp actually matter?