Assigning from a DHCP range based on SSID

Greetings! I have an access point mesh providing a hidden wifi primary network, and broadcasting a guest wifi network. It's hooked up to my OpenWrt router (which is not providing any wifi) and connectivity is fine. However, I'd like to provide separate dhcp ranges depending on the network you connect to. The only thing I could find on the topic was Give dhcp leace from subnet based on ssid - #3 by diversity however I could only find how to enable vlan tagging for a specific interface, which I'm not entirely sure is what I'm after. Is there any further reading material on this, and is this still the right solution for separating wifi networks by dhcp range?

It is not entirely clear what you are asking...

  1. unique DHCP ranges for the guest vs primary network (which would be different SSIDs)?
  2. different DHCP ranges based on the specific AP that is being used (assuming you have multiple APs, each with 2 SSIDs to support your two networks)?

To answer #1: You do need to use VLANs for this purpose (to separate the primary and guest wifi networks). Do you already have that configured?

On #2, you cannot do this, nor would you want to. If you did setup a scenario like this, roaming would not work properly as the client devices would need to obtain a new address when they move from one AP to the next. Roaming is fast because clients don't need to obtain a new DHCP lease... requiring a new lease every time the AP changes would be slow and would break the client's active connections on the network/internet.

It is not entirely clear what you are asking...

  1. unique DHCP ranges for the guest vs primary network (which would be different SSIDs)?

Sorry, yes I mean the first one. So all of the mesh nodes are configured to host ssid A (hidden) and ssid B (broadcasted, guest). No matter which access point you're connected to, I want my router (currently doing dhcp) to provide 10.42.13.0/24 to ssid A, and 10.42.14.0/24 to ssid B.

To answer #1: You do need to use VLANs for this purpose (to separate the primary and guest wifi networks). Do you already have that configured?

I'll admit I have a very shallow understanding of VLANs. What would be the proper way to configure them for my interface[1], and once I have it configured, how will they help differentiate between the two wifi ssids?

[1] I've looked through the wiki article https://openwrt.org/docs/guide-user/network/vlan/switch_configuration#assigning_vlan_ids_on_vlan-enabled_switch_hardware and this seems like the configuration I might want to use but I'm not sure.