MF286D: How to bridge LTE-WAN to one of ETH ports to reproduce modem mode of stock firmware?


Now I've finally installed and configured OpenWRT on my MF286D device the way I can use it as LTE router,
But my target is to use in the bridge/modem mode - I want to make MF286D to be transparent and my main router to get LTE IP on its WAN port.

Could someone help me with this, please?
Maybe there is some guide that I didn't find?

Just return to stock firmware, Nordic_MF286D_B12 works like a charm in a bridge mode.

To be honest, if I've already installed OpenWRT I would like to stay with it, specially I have no clue how to return to stock and know even less about installing some Nordic firmware.

Now if someone write some guide how to do something, he assume that the reader is doing nothing else, but flashing routers. So for someone like me who flashes different devices sometimes - when it's needed, but most of time spending doing something completely different - these assumptions are problematic. Something I could do in one day, I have to research, I have to learn the knowledge that probably will never use again :smiley:

I've flashed OpenWRT to that device because it was crashing in modem mode causing internet to slow down and scatter. I have purchased replacement thing, but it has no bridge mode at all. In meantime I'm trying to fix MF286D flashing something else than stock Three branded firmware. Uhh, sorry I don't have good day today.

I have ZTE MF286R, flashed Openwrt 23.05 instead of original ZTE firmware and spent some time to get this modem work as LTE BRIDGE. Personally I didn't like ZTE firmware regarding the LTE Bridge mode, it's slow, clumsy, no flexibility, so decide to go with Openwrt. I did this on Openwrt firmware from but the stock Openwrt should work as well. The biggest problem is as mentioned in other threads that this ncm modem is not fully L2 compliant and modem does not work in bridge mode out of box.

Want to share my setup here, on how to get Openwrt working as lte bridge, step by step. Please notice this is high level howto and you must have knowledge of what you're doing. I won't go into setup details as I did this month ago and I don't want to kill my setup redoing it again for the device which is already hardly accessible on the roof.

  1. Setup modem working as a LTE router, so you have a stable LTE NAT router configuration on Openwrt.

  2. My Openwrt config has wifi disabled, bridge interface does not have an IP address set, so you will loose access to your Openwrt device. If you do not have a console soldered and connected then I recommend to create management vlan over ethernet, or setup a wifi AP with side network as a temporary access, or any other way you like. I use management vlan over LAN/WAN port to access the device and allow it to access internet for updates.

  3. There must be a comgt-ncm package already installed. You need to edit ncm script from this package to make sure that Openwrt does intercept DHCP IP address provided by the LTE modem to itself, but pass it through the bridge to your router. Edit file /lib/netifd/proto/ and change the 2 following lines (diff format):

@@ -187,7 +187,7 @@
 		json_add_string name "${interface}_4"
 		json_add_string ifname "@$interface"
-		json_add_string proto "dhcp"
+		json_add_string proto "none"
 		[ -n "$zone" ] && {
 			json_add_string zone "$zone"
@@ -200,7 +200,7 @@
 		json_add_string name "${interface}_6"
 		json_add_string ifname "@$interface"
-		json_add_string proto "dhcpv6"
+		json_add_string proto "none"
 		json_add_string extendprefix 1
 		[ -n "$zone" ] && {
  1. Another problem to overcome is that NCM modem does not work properly in Openwrt bridge and all outgoing packets from modem interface have destination mac address set to Openwrt usb interface instead of actual sender. Normally for the bridge mode you would use setup like (Your LAN)---cable--(Your LAN router)--cable--(ZTE Openwrt Bridge)--LteNetwork, this means there can only 1 device behind the LTE bridge, which is your Router. You need to lookup your Router's MAC address of the interface which points to the Openwrt/LTE. Edit file /etc/rc.local and append the following lines at the end, before the "exit 0" and replace "74:55:44:33:22:11" wit your Router's MAC address:
# DSTNAT outgoing packets because modem addresses only usb1 interface by default
nft add table bridge nat
nft add chain bridge nat mydnat
nft add chain bridge nat prerouting '{ type filter hook prerouting priority -300; policy accept; }'
nft add rule bridge nat prerouting iifname usb1 jump mydnat
nft add rule bridge nat mydnat ether daddr set 74:55:44:33:22:11

Here "usb1" is the NCM modem interface on Opewrt and "74:55:44:33:22:11" is my mikrotik router behind the ZTE device. I know it's hardcode, but in my case I'm sure my mikrotik will last another decade.
If above nft commands fail, you need to add missing Openwrt packages.

  1. Create an unmanaged bridge device on Openwrt and bridge ports eth0.1 (ethernet) and usb1 (ncm modem). My config excerpt:
config interface 'lte'
	option proto 'ncm'
	option device '/dev/ttyACM0'
	option pdptype 'IPV4V6'
	option apn 'internet'

config device
	option name 'eth0.1'
	option type '8021q'
	option ifname 'eth0'
	option vid '1'
	option macaddr 'C8:EA:F8:D7:72:19'

config device
	option type 'bridge'
	option name 'wan'
	list ports 'eth0.1'
	list ports 'usb1'
	option bridge_empty '1'
	option ipv6 '0'

config interface 'wan'
	option proto 'none'
	option device 'wan'
	option force_link '1'
	option delegate '0'

I wish modifications from steps 3 and 4 gets integrated properly into ncm package and firmware like the one from Btw MF286r LTE modem with the latest firmware update from 2023 is working very stable with Openwrt and there are no unexpected connection drops like frequently mentioned in this forum.
If you have any questions please ask.

This topic is about MF286D. Please find a more suitable topic or create a new one.