Can DHCP server manage a subnet on a client router?

I have a friend who is planning to set up a new network that asked for my help. He wants to make sure this is possible before buying the hardware.

The goal is to have a network that looks like this:

He plans on following this guide to set up his network similar to mine. Each of the "OpenWrt Client X" routers are in Client mode and connect wirelessly to "OpenWrt AP".

Thanks to help I received from a previous post, I think I'm confident I can set this up, except for one requirement. He wants all of the subnets to be issued DHCP leases by a DHCP server on "OpenWrt AP". He wants this so that he can manage static DHCP IPs in one location.

From what I read, it sounds like the DHCP servers for the lan interfaces on each Client can easily be disabled by checking Network -> Interfaces -> lan -> DHCP Server -> General Setup -> Ignore interface. The problem is, I don't know how to make the "OpenWrt AP" router take over this responsibility instead.

From testing it out on my own network I can see that creating a static DHCP lease on "OpenWrt AP" for an IP in a subnet it does not control would give an error: "The IP address is outside of any DHCP pool address range". I assume I need to add each subnet (e.g. 192.168.3.0/24) to the pool, but I don't know how.

Can this be done in LuCI? Thanks!

Do the "client" routers have to be in the 182.168.1.0 network?

It would be easier to configure one interface for each "client", and configure them as dumb repeaters.

1 Like

No, they necessarily need to be on the 192.168.1.0/24 subnet.

Yea, a dumb repeater would definitely simplify things. He was planning to use Client mode because he did not want the wireless rebroadcasted due to a bandwidth issue. He has a use case involving bursty high bandwidth and I guess the wireless bandwidth had been a problem in the past when using a WDS repeater. (I don't understand why a repeater would cause a bandwidth issue though. Maybe he was wrong about the cause?)

Eventually this equipment will be moved and everything will be wired, but until then he's stuck with this awkward limitation.

Main AP could have 3 different ssids. The client routers could connect to it using relayd. Only works with ipv4 but that shouldn’t be a big problem unless you need ipv6 for something specific.

Broadcasts could be blocked pr. subnet on the main ap. (I wouldn’t bother but it’s not my decision)

1 Like

IPv4 is fine, but relayd seems to have a lot of issues (e.g. I think all devices share 1 MAC address). He also doesn't want to extend the wifi range.

Is it possible to keep Client mode, but just change where DHCP leases are issued? (If it's possible but very difficult, then I'll probably just tell him to use a relay and buy a higher bandwidth router.)

Use mesh with gre tunnel for the same function but possibility of having unique macs (I think).

Or just use mesh with batman and use batman’s built-in vlan-esque functionality. This comes with more overhead than client mode. You can also lock the mesh to specific bssid or use different ssids for each client router.

1 Like

Ok thanks, I'll let him know!

Afaik dynamic subnet allocation is not possible with dhcpv4, but requests from a client can be relayed to a "central" server.
But as others have noted, if the whole network is a bunch of bridged vlans then you don't need it. But if you want to/need to have actual layer 3 boundaries then DHCP relay could be your favored choice.

1 Like

Maybe it’s as easy as this, and you avoid the overhead of running a batman mesh:

1 Like

If all (dump) AP are connected with a wire to a switch then there is no need for Batman. It would still be adviseable to enable Spanning Tree Protocol but no need for a wireless mesh protocol.

1 Like

They were not connected to wire, that was the whole point.

1 Like

Yes, then use batman-adv (but disable STP). (But again, this is only needed for meshed (switched) layer-2. As far as you schema from post 1 looks, you even could set up client 1..3 as wireless clients and don't need to setup a dedicated wireless mesh. If how ever for coverage you have client A to C wirelessly interconnected then yes you would want to have a wireless mesh. But then still the question stands: is it layer-2 or plain layer-3?)
For (routed) layer-3 you either use static routing or a (wireless) dynamic routing protocol, like babel, or olsr2.
Anyhow: If it's layer-3 and you want to have a (single) central dhcp server, then configure client A to C to act as an dhcp relay and forward to "OpenWrt AP".

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.