VLANs for beginners and Guest Wifi DHCP problem

What is the device that you are trying to connect to the guest network? Is it able to connect to the wifi SSID properly but then fails to get a DHCP lease? Does it display an error or show a self-assigned IP?


I tried with several devices. For example, my iPhone appears as an associated station, but it doesn't get a valid IP. Gain IP in range 169.xxx

You've got a mesh... is the guest network expected to be available across multiple APs, or or just the single device we're working on?

I would be satisfied if the guest network only worked on the main router (onHub). One problem at a time.

Is the guest SSID being broadcast from any of the other mesh nodes?

No. For now This configuration is being done only on the main router.

I'm trying to keep it as simple as possible with your guidance.

maybe try disabling the mesh entirely? I don't really see any other reasons why this wouldn't work.

I'll try to do that. But looking deeper into the forum, there are other colleagues with the same problem in the guest's DHCP setup. I really don't believe it's interference from the mesh, because I'm using another radio and on the 5GHz frequency.
Anyway, even if it doesn't work I'll be happier, because if you, who are an Openwrt genius don't see the error, I might feel less stupid for not knowing what to do either. hahahaha.
Jokes aside, I've been suffering with this problem for weeks now, trying many possible solutions, but I'm not giving up. That's how you learn, isn't it.
I'll keep trying here. If I find something useful I'll get back to you. Thank you very much for your kindness.

Would you be willing to make a backup and then reset to defaults. Let’s try building the guest interface from a near default state. I expect it should work.

Ok, my friend, that's what I'm going to do. Thank you again. Have a nice weekend.

PS.: It seems that I found a solution here by setting a bridge in the guest interface. Now I go to the access point configuration.

credit: Guest network clients do not get IP address from DHCP - #15 by mirodin

config interface 'guest'
        option proto 'static'
        option device 'br-guest'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
        option type 'bridge'

Actually, this should not work. It is invalid to put the bridge type inside a network interface stanza, starting with 19.07 (iirc). (Certainly invalid for 21.02 and later).

We could try this:

Remove the guest_dev from the config device line. So that line is just “config device” with nothing else.
I

Two reasons for this change: inconsistent naming (br-guest and guest_dev) and also because underscores can be problematic in certain places in the config files. This might cause a parsing issue.

Combine this with removing the bridge type line from the network interface.

1 Like

OK. I'll do that and come back later

I'm returning to give feedback, as promised. When I removed the "bridge" it stopped working. I returned the bridge to the configuration and it started working again. So I don't know exactly what happens. But the guest is operating under these terms, including obeying the firewall rules.

I removed the "guest_device" name. So what seems to make the difference is the bridge.

Did you also fix the potential issues with the guest bridge?

It should look like this:

config device
        option type 'bridge'
        option name 'br-guest'
        option bridge_empty '1'
1 Like

Exactly. As you said.

This just doesn't make sense to me... I'm not sure why bridge is working in place -- it's actually more often the cause of issues than resolutions.

That said... I found this which is an older discussion about this very topic:

I had forgotten about this because in every other case I can remember, removing the option type bridge line fixes issues... but (as we see in @pavelgl's comments), I also must concede that, for whatever technical reason, it is clearly working. But it's important to consider @mk24's comment that the syntax has been deprecated and may fail at anytime in the future.

All of that aside, 2 more thoughts:

  1. If you're only connecting this to a single radio (and no physical ethernet ports), you could actually drop the bridges entirely (both in the network stanza and the extra line at issue here).
  2. We could try a 'fresh' configuration -- make a backup, reset to defaults, add the guest network using the bridge configuration that I would expect to work. Then, if that doesn't work, add the bridge line to the network stanza and see if that fixes it as it has here.

Since your config works now, you don't actually need to do anything else. The rest all depends on your curiosity (and if you're willing to indulge mine :laughing: ).

I think exactly like that at the moment. Because it's working. But I'm still going to do the configuration from scratch when my Mini PC arrives. So I'll come back and tell you.

1 Like

Thank you again. You were tireless in trying to help and I record my gratitude here.
Sorry for the poorly written English, because it's not my native language.

You're welcome. FWIW, I never noticed any issues with your English (and I'm a native English speaker)... so no worries there at all!

And, kudos to you for experimenting and figuring out that the option type bridge line actually fixed the issue in your situation.

1 Like