I am trying to setup a custom metric for my QMI 4G LTE modem for use with MWAN3.
I am following this tutorial (https://bbb-solutions.blogspot.com/2015/12/mwan3-setup-for-openwrt.html)
In the tutorial they are using a standard 3G/4G AT modem configuration which has the option to set a custom metric.
I'm using the QMI standard, so the luci-proto-qmi package doesn't have the same options (namely setting the metric).
Is there a way to setup MWAN3 without setting up a custom metric on my wwan0 interface?
I'm only curious because I noticed when the modem grabs an IP it gets it from uDHCP-client as far as I can tell.
However everytime the wwan0 network goes up it is made the default route with a metric of 0..
Any suggestion on how to set the metric for QMI devices via CLI would be greatly appreciated.
I fear that this feature is not implemented however, so I am not sure which area to post this topic under.
If I left any information out that anyone might deem important to trying to figure this out please let me know.
I'm not clear...what's the issue with configuring the metric in the proper place (i.e. under the Interface, with a metric number greater than 0)?
When DHCP receives the route, it should add a metric with a higher number, and your first WAN connection should remain online.
In the proper place?
I am referring to in the Luci interface configuration area for a 'QMI Cellular' device there is no custom metric option like in a DHCP interface.
I'm not sure what other 'proper place' I might find a way to set a metric..
I tried manually adding
option metric '50' inside of my /etc/config/network section for my QMI interface to no avail..
I reverted to 17.01 from LEDE snapshot.
I am now able to manually set a metric in my
/etc/config/network file without messing up my routing table with random non-sense that MWAN3 put there (for example; it was putting my tracking IP's from MWAN3 into my routing table as default routes oddly)..
However now I am having an issue with pinging the gateway (T-Mobile).
I think T-Mobile blocks ICMP packets within and outside of their network, so MWAN3 just sees the gateway is down.
However the actual route works since it is able to ping my tracking IP addresses(126.96.36.199, and 188.8.131.52) using my wwan0 interface.
Here is the output when I click 'Check IP rules' -
Missing both of the required interface IP rules
And the output when I click 'Check routing table' -
Missing required interface routing table 2
As far as I know connection tracking is enabled on both of my WAN's, so I shouldn't be seeing these errors, correct?
I recall that I couldn't
ping the network gateway through a T-Mobile (US) LTE connection. I'm pretty sure that I could
ping out of the network, once into a "real" public IPv4 address space.
Edit: confirming your observation
Sorry, I mis-phrased that..
I meant I couldn't ping the T-Mobile network its self.
Pinging outside of the T-Mobile network is fine.
I am unable to find a proper way to do this via Luci.
However I was able to get MWAN3 working for the most part.
I did this by manually setting a metric inside of the
option metric '10' - metric for QMI interface(must be lower than all other interfaces!)
option metric '20' - metric for Ethernet WAN interface #1
option metric '30' - metric for Ethernet WAN interface #2
Having the QMI interface setup with the lowest metric allows me to use it with MWAN3.
Even though MWAN3 is unable to to ping T-Mobile's default gateways there is a workaround:
When setting up your rules in MWAN3 you must set anything you want to go to your QMI interface to go to the 'default routing table' inside of your custom rules.
You will be unable to use multiple QMI interfaces for MWAN3 as of 17.01 when using T-Mobile's GSM network (as stated before; this is due to T-Mobile blocking ICMP packets to/from their gateway which MWAN3 relies on for checking network health)
The issue is resolved by:
- Downgrading to 17.01 from LEDE snapshot
- Manually entering the metric into your
/etc/config/network file (there is no proper Luci implementation for this feature, yet)
- Deferring any rules which you want to go to your QMI interface to rather go to the 'default routing table' inside of MWAN3
mwan3 could use some options for using something other than ICMP ping packets to the first-hop gateway to determine if the link is up.
Given the mess of scripts I've seen for trying to monitor and restart a wireless-modem connection, I can imagine the two interacting very poorly.
I completely agree.
It would make MWAN3 a lot more usable in a niche scenario like this..
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.