Mwan3 use command completely broken?

RUTX11 on Firmware 7.10… only mobile connection (no wan cable).

I cannot use mwan3 use [cmd] at all. It appears to be an issue with the interface binding, because the commands work fine when not wrapped by mwan3.

Fails

root@r2-rnhq:~# mwan3 use mob1s1a1 ping -4 -c5 -W1 8.8.8.8
Running 'ping -4 -c5 -W1 8.8.8.8' with DEVICE=wwan0 SRCIP=25.247.27.159 FWMARK=0x3f00 FAMILY=ipv4
PING 8.8.8.8 (8.8.8.8): 56 data bytes

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

Succeeds

root@r2-rnhq:~# ping -4 -c5 -W1 -I qmimux0 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=54 time=57.220 ms
64 bytes from 8.8.8.8: seq=1 ttl=54 time=29.580 ms
64 bytes from 8.8.8.8: seq=2 ttl=54 time=29.315 ms
64 bytes from 8.8.8.8: seq=3 ttl=54 time=29.112 ms
64 bytes from 8.8.8.8: seq=4 ttl=54 time=28.943 ms

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 28.943/34.834/57.220 ms

mwan3 status

root@r2-rnhq:~# mwan3 status
Interface status:
 interface wan is offline and tracking is not enabled
 interface mob1s1a1 is online 00h:09m:33s, uptime 00h:09m:46s and tracking is active
 interface mob1s2a1 is offline and tracking is not enabled

Current ipv4 policies:
balance_default:
 mob1s1a1 (100%)
mwan_default:
 mob1s1a1 (100%)

Current ipv6 policies:
balance_default:
 unreachable
mwan_default:
 unreachable

Directly connected ipv4 networks:
127.0.0.0/8
224.0.0.0/3
192.168.20.0/24
172.16.40.0/24
192.168.138.0/24
25.247.27.159
192.168.191.0/24

Directly connected ipv6 networks:
fe80::/64
fd7a:115c:a1e0::6e01:3c34
2604:fb61:2120:1d56:f1e7:949d:407c:4a5d

Active ipv4 user rules:
  179 12075 - mwan_default  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Active ipv6 user rules:

Hello,

Sorry for the late reply.

Please use mob1s1a1_4 instead of mob1s1a1.

Hope this helps!

Best regards,

Yes it helps! Thank you. I would say it’s confusing though that mwan3 interfaces or mwan3 status report the interface name as just mob1s1a1.

Hello,

It’s good to hear that it helped!

Unfortunately, there are no plans to update this command. However, if you want to use just mob1s1a1, you can modify the use() function and add two lines to the script:

  1. Open the file with vi /usr/sbin/mwan3/
  2. Press “i” to edit the file and scroll down to the use() function.
  3. Under network_get_device device $interface, add the following two lines:
`network_get_protocol proto $interface`
`[ "$proto" = "wwan" ] && network_get_device device ${interface}_4`
  • Press Esc, then type :wq to save the file and press Enter.
  • After these steps, you should be able to execute: mwan3 use mob1s1a1 ping -4 -c5 -W1 8.8.8.8.

Please let me know if there is anything else I can assist you with.

Best regards,

Not sure why you would say that. But, ok. As long as I know where the sharp edges are, I can avoid cutting myself. I won’t be editing this file on dozens of routers, seems a recipe for disaster…

This topic was automatically closed after 15 days. New replies are no longer allowed.