Configuring Separate DHCP Server for Wi-Fi on OpenWRT-19.07.0: Is It Possible?

Device: BL201
Firmware: MiWiFi Mini / OpenWRT-19.07.0

By default, the configuration of OpenWRT would resemble the image below.

However, I would like to have a separate DHCP server for Wi-Fi from the LAN/Router, similar to the configuration shown in the image below.

Is it possible to achieve this configuration?

1 Like

You are using an old, eol, and unsupported version of OpenWrt. You should upgrade your device to the latest OpenWrt, especially because the version you are using has many known security vulnerabilities (and is unsupported with many significant differences relative to the current version).

Regarding your general question - yes it is possible, but it means that your WiFi network will be a different subnet than the main lan.

You can do this by following the guest wifi tutorial.

1 Like

I would make two interfaces with each dhcp server with different subnets as your second picture.

But place both interfaces in the same firewall zone with forward=allow. Then they are the same happy family and can talk to each other.

@psherman & @flygarn12,

Thanks, but that's not what I want. My goal is to separate the DHCP server and the Wi-Fi subnet interface from the LAN/router.

However, the Wi-Fi interface does not get internet from the WAN interface, but from the LAN interface by providing an IP address from the LAN subnet interface to the Wi-Fi interface.

I remember this mechanism on my old D-Link DIR-612 router (also on this bl201). There was a client/wifi repeater feature where the router acts as a client connected to another Wi-Fi source (getting an IP from that Wi-Fi subnet), and at the same time, the router also spreads the internet back through Wi-Fi but with a different subnet from the source Wi-Fi.

So, it's more or less the same as what I want now.

The difference here is that I'm not using Wi-Fi to get internet, but through the LAN interface.

It may seem a bit impossible and may make the router work a little harder.

Also @psherman, my device doesn't officially support openwrt.

However, my hardware is similar to the hardware on the miwifi-mini. The differences are in the:
1. RAM
Mine has 64MB, while miwifi-mini has 128MB.
2. Ports
Mine has 2 ethernet ports, while miwifi-mini has 3.
3. LEDs
Mine has 8. 8 x blue and 5 x red.
4. Buttons
Mine has 2 buttons, 1 x reset and 1 x WPS.

The problem is that I can't use a higher version of the openwrt miwifi-mini firmware than openwrt-19.07.3, or my device won't boot.

I don't have a PC or the ability to build firmware, so I'm just using what's available.

You will want to follow the guest WiFi on a dumb ap. That is not what your diagram shows, but if you are getting internet on your lan interface, this is the tutorial to use:

2 Likes

Follow the guest WiFi guide that @psherman posted above. Then add a NAT rule to rewrite the source IP from the WiFi.

uci add firewall nat
uci set firewall.@nat[-1].name='test'
uci add_list firewall.@nat[-1].proto='all'
uci set firewall.@nat[-1].src='wan'
uci set firewall.@nat[-1].src_ip='192.168.100.0/24'
uci set firewall.@nat[-1].target='SNAT'
uci set firewall.@nat[-1].snat_ip='192.168.1.2'
uci commit firewall
service firewall restart

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