FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,229 views 24 comments
by anonymous

Hi,

I have two 5G sim cards with unlimited data plans.

My requirements are;

  • Switch based on "no network" or "network denied"
    • I have enabled "Enable automatic switching" on both sim cards under sim switch
  • I noticed on sim switch on "data connection failed" using ICMP constant switching between the two providers whilst one network was stable as opposed to the other
  • I noticed on sim switch on "weak signal" constant switching between the two providers
    • I may have set the thresholds incorrectly not sure what is optimum or a medium values should be!?
  • Should I also use Network>Failover>with the default rule for 0/0 also!?
    • Do the two conflict Sim Switch & Failover or I should use one only!?
  • Also can the RUTX50 do some kind of latency/packet loss failover on data or is this feature to be introduced in the future?
    • Maybe the signal should catch this at lower layers of the Network OSI model?
    • My fear here is that the failback option in Sim Switch would failback to a worse performance network/sim card?
  • If I don't use Network>Failover does that mean I can use Network>Load Balancing
    • As there is a single modem maybe the answer is no?
  • Under Network>General>Low Signal Reconnect what does this do?

I have attached a picture of the signal from one of the providers which is currently active.

by anonymous
...............
by anonymous
I added the tar file now.
by anonymous

Please ignore the previous since I am lost in the amount of confusing failure scenarios I am getting and I'm losing track, I am trying to configure the best failover policy currently.

I wanted to ask on the following:

Performs a SIM switch when mobile data connection fails. Possible failure determination methods are:

  • LCP echo
  • ICMP echo

If no echo is received, the data connection is considered to be down.

How many ICMP pings does this test send? I have the default timeout for the ping as 3 secs is that 3secs x5 pings or x1 ping?

by anonymous

Hello,

  

ICMP echo sends 3 ping packets with the default timeout of 3 seconds.

This can be verified by monitoring the outgoing packets by connecting to the CLI, and running this command:

tcpdump -i qmimux0 icmp -Q out

Every few seconds you should see 3 requests being made to the specified host.

  

Best regards,
DaumantasG

1 Answer

0 votes
by anonymous

Hello,

    

Since RUTX50 only has a single modem, neither Failover nor Load Balancing can be used between both the SIMs.

In this case, you will need to use SIM Switch. As for the weak signal threshold, there are no "correct" values, and it's basically a guessing game. Since you are connected to LTE B28, this band is used for covering wide areas, so I'd say a weak signal for this band could be -80. But for bands B1 and B3, this value could be much lower.

I noticed on sim switch on "data connection failed" using ICMP constant switching between the two providers whilst one network was stable as opposed to the other

Could you try pinging the specified address on the carrier that keeps failing by navigating to System → Administration → Troubleshoot and scrolling down to the page. This will let us know where the issue could be. Also, make sure the timeout is set high enough.

Should I also use Network>Failover>with the default rule for 0/0 also!? Do the two conflict Sim Switch & Failover or I should use one only!?

SIM Switch should be used. Failover or Load Balancing can also be utilized if you also have wired WAN.

 Also can the RUTX50 do some kind of latency/packet loss failover on data or is this feature to be introduced in the future?

On data connection fail parameter basically checks the same thing. If ping packets are lost, the SIM Switch is initiated.

Under Network>General>Low Signal Reconnect what does this do?

This option reboots the modem in case a very bad signal is detected, in hopes that the modem will connect to a different cell or mitigate other issues.

Let me know if you have any additional questions!

  

Best regards,
DaumantasG 

by anonymous

Hi,

Thanks for your replies.

I have attached a picture of my current setup, so it seems I will only switch on no network or network denied options?

ICMP ping works fine from System → Administration → Troubleshoot 

by anonymous

Hello,

  

Since SIM1 is not your default SIM card, with your current configuration it will switch back to the primary SIM (SIM2) after:

  • Mobile network disconnection;
  • Failure to connect to a network;
  • 1 minute after the switch from the primary SIM;

The timeout option is meant to be used when one SIM is only a backup and, for example, the user gets charged more for the data when the SIM is in use.

As there is only one modem in RUTX50, it cannot use both SIM cards at the came time to check whether the primary SIM has restored the connection, thus a timeout option was added.

    

Best regards,
DaumantasG

by anonymous
Both sim have unlimited data.

The only configuration this doesn't give me is whether one sim network on 5G is degraded or not?

Does the checks include whether 3G/4G/5G is preffered also, is this something I can configure?
by anonymous
SIM Switch mainly checks whether the connection is present. The only thing that could be quite a good indication of network performance would be the signal strength. This could be added in the "On weak signal" option.

Otherwise, if you are comfortable with shell scripting, a script could be used to periodically run speed tests and switch SIMs based on performance.

  

Best regards,
DaumantasG
by anonymous
Thanks any example of this script if possible?
by anonymous

It would be a little too time-consuming to write the entire script, however, the main commands used would be:

speedtest -s -u <speedtest_server_IP> #runs the speed test to a specified server for consistency

ubus call sim change '{"sim":"<SIM_ID - 1 or 2>"}' #perform the SIM switch

cut, tail, head #commands used for parsing the speedtest output

This script can be placed in the /etc directory, and run using Crontab every few hours. Make sure to assign the correct permissions to the script file using chmod command.

More information about scripting basics can be found in this OpenWRT article (on which RutOS is based).

  

Best regards,
DaumantasG

by anonymous

thanks will look into that.

on no network or network denied and when "1 minute after the switch from the primary SIM" will this interrupt traffic to the internet whilst the modem attempts to switch back after 1min? and if so this would be constant traffic interruption every 1 minute until it's a stable "no network or network denied" condition?

by anonymous
Correct, it will interrupt the connection until the SIM that is being switched to no longer satisfies any of the Switch conditions.
by anonymous
This explanation makes a decision for me not to fail back because it can become disruptive for me in that case.

Can you advise if the signal strength differentiates between 3G/4G and 5G?

Is this option available I believe other models have this feature?
by anonymous
I noticed my -85dBM weak signal failover did not trigger, how many seconds does the software need it to be the threshold amount before a trigger or dBM range?
by anonymous

Hello,

  

Have you enabled this rule on both SIM cards?

The SIM Switch should trigger as soon as the signal reaches this value. As for how the signal strength changes according to the network type used, we have a Wiki article about signal strength here.

  

Best regards,
DaumantasG

by anonymous
Hi,

Sorry for the late reply yes enabled it on both @ -85 and saw it didn't trigger the failover.

Thanks for signal strength wiki page.

I noticed another funny in that let's say

SIM2 was "default" sim in toggle I then enabled SIM1 as "default" sim in toggle and without save & apply this seem to kick me out completely (management via Zerotier) including any internet connectivity and had to get some to login locally to save & apply SIM1 as "default" before connectivity was restored, is this expected behaviour?

I didn't have the switch back to default sim option enabled when this occurred.
by anonymous

also I noticed the sim switch event notification doesn't ever email me (the test works fine and emails me)

attached pics

by anonymous
Hello,
  
  

I've performed some tests but was unable to replicate the behavior. Perhaps you could set up failover with -75dB, remove the antennas, and if the SIM Switch does not trigger, generate a troubleshoot file by navigating to System → Administration → Troubleshoot. This file can be attached to the original post and will only be visible to Teltonika moderators.

EDIT: As for the email, please attach the template of the email.
    

Best regards,
DaumantasG
by anonymous

attached events and email test

by anonymous

so another strange thing happened today logs correspond like this.

LAN2 port unplugged (which connects to wifi router providing the LAN users wifi)

The Teltonika detects this and causes the box to freeze almost and stop the VPN traffic into it thus I could not manage it, logs per below;

566 2023-06-11 21:56:03 Network Operator Connected to operator (internal modem)
565 2023-06-11 21:56:03 Network Type Joined network (internal modem)
564 2023-06-11 21:56:03 Mobile Data Mobile data connected (internal modem)
553 2023-06-11 21:34:35 Switch Events Port link state of port LAN2 changed to DOWN

Event @ 21:34 caused the zerotier interface to also not respond but seems also locked the modem up, it didn't attempt to switch sims with the sim switch policy in place etc etc - just smacks of buggy teltonika code!!

by anonymous

Hello,

  

Without having a troubleshoot file from the device after the issue occurs, there is not much I can comment on here, as only the logs might lead in the right direction.

If the device freezes constantly, in the same troubleshoot menu set the option "Save logs in" to Flash memory, then replicate the issue, if the device freezes it can be restarted, and after booting back up generate the troubleshoot file.

  

Best regards,
DaumantasG

by anonymous
not sure how to attach the troubleshoot tar !?

can you comment on why the email notification doesn't send on sim switch i gave the details above...
by anonymous
Hello,

I cannot comment on either of the issues without looking over the troubleshoot file. It can be attached by editing your original question and will only be visible to Teltonika moderators.

Best regards,
DaumantasG
by anonymous
Nothing seems to be visible from the troubleshoot file. Could you clarify which port you used on the RUTX50 and which on the third-party router (WAN / LAN)?

Your signal also seems very good, please regenerate the file with a poor signal, where the SIM switch rule should trigger (but doesn't).