LTE Modem IP passthrough by MAC address

So I know this issue has been beaten to death already:

Just want to double check, so far, even with the newest OpenWRT firmware, there is no easy way (e.g. via LUCI GUI interface) to "pass" the "public IP address" obtain from the wwan0 side (lte modem side) to a device behind LAN by MAC address, correct?

Thank you!

This depends on the modem and its supported operating modes.
With the average Quectel modem you can switch it to ECM mode and then bridge the wwan with either a LAN port or a VLAN on it. See Using a router as "dumb" LTE gateway? - #25 by AndrewZ

Hello Andrew,

Thank you very much for your reply, the link you provided below I actually read it too (I've been reading alot of these, but still a bit confusing).

I am using Quectel EP06-A modem. Can yo elaborate a bit more on "switch to ECM mode"? Any url or documentation you can point me to as to how to do that in OpenWRT? I will also go search online a bit more to see if I can find information about this.

Thank you!

Interesting so I just found this

I guess I can try, but have you tried this before? To switch to ECM mode? Currently in my interface

I don't see ECM in this list. I wonder what will happen when switch to ECM, would QMI not work anymore? Or is this "ECM" has nothing to do with QMI?

That has nothing to do with OpenWrt, you need any terminal app to send AT commands to the modem.
Luckily, I've put this example into the wiki: https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle#lte_or_5g_modem_preparation

However the EP06 itself will act as a NAT router by default. I don't currently have a suitable modem to test, but my understanding that it could be switched to passthrough mode from the adb shell.

right, the only reason I ask is that because in alot of .sh (such as qmi.sh) it uses uqmi command to connect the modem to the cellular network, just wondering once switch over the ECM will those command still work? But I guess I will find that out.

But then again, once I switch the modem to use ECM mode, you are saying I then go to the Device and "brdige" like this?

Although how would this work? Because if the user has multiple device behind the LAN (e.g. they hook up a 5 port switch to the LAN port), how would OpenWRT know which device to "map" the public IP of the modem to the device? I have this feature in my old firmware (using Advanced tomato) where you can do IP passthrough by MAC address. In this case, in openwrt I don't see anything like it.

image

In the standard setup you will configure the router as DHCP client as shown here https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_cdc

In the bridged setup you don't need to create a router interface. The modem will establish a connection on its own and wait for DHCP request from the bridge side.

OpenWrt will not be involved at all, it will create a transparent bridge and stay out of the game. The modem itself does have a setting to define the MAC (untested by me).
Unfortunately Quectel forum is down for the 2nd day otherwise you could see the relevant thread there.

ok, thank you very much for all the info... I've treid to switch to ECM, supposely no other action required to connect, but now the OpenWRT doesn't even show the wwan0 being up at all and my LED light keep showing red. But upon send this AT command

sms_tool -d /dev/ttyUSB3 at "AT+CGCONTRDP"

I do see the SIM (or the modem) do get a IP address from the carrier, just not sure how to "make" OpenWRT know that it is connected.... but I guess that is what we get paid to find out how...

Thank you for all the info!

Make sure you're following the wiki, see the link above.

ya, I did, but that wiki link mostly talk about qmi command and interface which I had no problem when I was on QMI-PPP. But since I change the modem to use ECM, (from the doc) it seems no longer on QMI. Because when I do

uqmi -d /dev/cdc-wdm0 xxx, it will tell me device is not there to open.

I do however see a "new" interface call usb0, so I tried to do Unmanaged, that didn't work. So I finally tried DHCP Client, thinking that I am now "DHCP client" and should be getting the public static IP from the carrier (they are the DHCP "server"), but I got this weird IP from it...

The IP of the SIM should be 166.xxx

anyway, more digging I guess....

So what I am trying to say is that, by default, when everything works, my LTE modem is on QMI, and under the interface you can see wwan0

image

But after you send the command to change the LTE modem to be in ECM mode:

sms_tool -d/dev/ttyUSB3 at 'AT+QCFG="usbnet",1'

now the interface no longer show wwan0, it shows this usb0

image

thus not sure how to correctly have openwrt "regconize" this as a LTE interface to show the 166.xxx IP

This is inline with what I wrote earlier:

192.168.225.0 is a "LAN" of the modem. Now the modem needs to be switched to passthrough mode.

You mean to ECM mode? Yes, I did that though... sorry, maybe I mis-understood you ECM mode is NOT passthough mode? there is another command I need to send to make it "passthrough"?

ECM is not passthrough.

ok, so you mean there is another command I probably need to set at quectel modem to make it passthrough. I will refer this to our rep at Quectel to see if they have any idea how...

Thank you!

Ask them about configuring IPPassthrough in mobileap_cfg.xml on the modem.
I hope this is the right topic: https://forums.quectel.com/t/config-ippassthrough-in-mobileap-cfg-xml/19316 (does not work at the moment)

1 Like

sorry, just one more question, once the modem is in "passthrough" mode, in the interface, do I "bridge" the usb0 with the LAN interface and what is the device type? Unmanaged or DHCP Client?

Unmanaged or even no interface is needed.

1 Like

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