Access Point (AP) with own WAN and second Bridge Repeater network in one router - example with Xiaomi Mi WiFi Mini and Alcatel Link Key IK40 USB

Hello, it is my first post on the OpenWRT forum.
On Xiaomi Mi Mini WiFi is connected to ZBT with main LAN to an SSID as a repeater, it works without any problems.
Also, this router has an internal second LAN network (WiFi) with DHCP with a gateway which is a USB Alcatel Link Key IK40 modem with rndis.
Everything works fine but on this network, the connected devices must have set manually the DNS to the IP of the gateway, also on this network I cannot access the router. Because if was connecting to the router address which is unreachable.

  1. What I should do to connect the route within the second LAN (but it is accessible by the rndis interface IP eg.
  2. Is there any option to do not setting manually of DNS within the second LAN-connected clients?
  3. If I disconnect from the main WLAN network client the gateway is accessible on the second LAN, but not to the Internet (DNS_PROBE_FINISHED_NXDOMAIN), I assume that is something with the DNS server. What I should do with this?
    I tried tracert to the the second hop is which is a repeater client LAN.

Your setup is a bit complicated. A network diagram would help understand the situation.
Also include the following:
Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

Yes, my setup is complicated but I have done it by myself by resetting settings to default on Xiaomi.
Also, I created relayd interfaces as new, and there were two of LAN on Xiaomi router, first main connected to WAN, and the second SATAN client of WLAN, (and LAN_SATAN). These interfaces are relayd bridged REPEATER between LAN_SATAN and SATAN.
A screenshot of the proper configuration (only with Luci) and network scheme is in the attachment.

I created relayd and satan_lan (with dummy unused IP with satan network client and configured the main LAN to the and WAN usb0 DHCP client which is on subnet (default of OpenWRT) also installed relayd, luci-proto-relayd like here and rndis drivers like on this post.
In this case, the satan lan on the main router cannot have because it is used by an LTE modem. It was set at

On the main ZBT router, I set the static DHCP lease to to MAC of Xiaomi, because the router was inaccessible through the extender router. Also, I must set repeater local IP to this IP, and the router is now accessible with LAN_SATAN extended network devices.

Next, I changed the gateway metric I set 20 to SATAN client and 10 to WAN, because the main LAN was connecting through SATAN interface with default settings.

Everything works without any problems and now the Xiaomi LAN was connecting through WAN.IK40 rndis network and the SATAN extended network is connecting through the ZBT Access Point.

1 Like

I'm still not clear what you're trying to do, but there is almost always a better way to implement any routing situation than relayd, which should be considered the absolute last resort.

I think you have the "interconnect two apartments" use case which has come up before.

  • There is an existing network based around a ZBT router with stock firmware. The ZBT router has an integral Internet connection, DSL or 4G.
  • You want to integrate that network with your network consisting of an Xiaomi router with OpenWrt and a USB 4G modem.
  • Devices connected to your Xiaomi router will use your 4G modem for Internet. Devices connected to the ZBT router will continue to use its ISP for Internet.
  • Devices on either LAN must be able to locally reach the other LAN for applications like gaming or to share a printer.
  • The link between the LANs will be via WiFi, with the ZBT as the access point (non WDS, since it is running stock firmware) and the Xiaomi as client.

Is this correct so far?

  • ZBT WG-3526 is OpenWRT based router with a QMI connection with LTE.
  • No, on Xiaomi I want to have one repeater network with the same SSID of ZBT (this is an extension of the network for the garden and some rooms), and the second connected to via USB RNDIS Alcatel IK40 LTE modem in the Xiaomi.
  • Devices connected to the internal network eg. Xiaomi only WLAN SSID and LAN ports are using WAN connection with IK40 modem.
  • Devices connected through Xiaomi, but with the same SSID like ZBT are in one subnet like on repeater article (in the screenshots the interfaces called SATAN, and REPEATER).
  • The repeater network is on WLAN, the Xiaomi connects to ZBT, and it is only a WLAN interface with the same SSID configured with Fast Transition, etc.
  • The Xiaomi has two separate networks, one is a normal LAN connected to the IK40 modem (like on the right on the picture). And second is a link between ZBT WG3526 and Xiaomi is only a client. There are two modems, the first QMI on ZBT, and the second is Xiaomi in USB port (IK40).
  • This works flawlessly, but this structure is a little more complicated, and I now think about how to use multi-wan (mwan3) on Xiaomi's internal network, but...
  1. I don't know how it is possible in this configuration?
  2. Is it possible to use an interface with a LAN firewall zone for mwan3?

With OpenWrt on both ends you can use WDS for a true wifi bridge.

  1. Set the ZBT's AP to AP(WDS). This still allows non-WDS stations to connect.
  2. On the Xiaomi, make a new Unmanaged (in the CLI, proto none) bridge for your repeater. Place a STA(WDS) connected to the ZBT, and a regular local AP (with the same SSID) into this bridge.

You now have a completely independent network that is repeating the ZBT but otherwise has no interaction with the Xiaomi's OS. This can operate separately in parallel with a conventional routing configuration for your other WAN.

mwan3 is for situations where you want to have one network branching to multiple WAN connections based on sharing the speed or replacing one with the other if it fails. So it doesn't apply here.

1 Like

Exactly, I want have connected devices on separate network when the modem wasn't connected internet it should connect with SATAN interface as fail over. Xiaomi and ZBT both have OpenWRT.
Is it possible to have two interfaces with same WLAN connection?

Yes if you give your repeater bridge an IP address (in the ZBT's LAN) then you could forward through it to the ZBT as the primary or alternate WAN.

Is it possible to have mwan3 interface as a LAN firewall zone?

mwan3 is not connected to firewall.
As long as there is a gateway with distinctive metric, the interface can be used in mwan3.
It would be best though to separate the lan from the link to the gateway,