Hi, I’m troubleshooting an issue with my RUT240.
The mobile connection drops every 2 hours. The router is about 30 seconds off line, about the time to re-register with the ISP. Getting also a new ISP Public IP address.
The 2 hour time is set after a reboot and keeps on repeating every 2 hours.
Put the SIM in my iPhone and no single dropping in 24h with ping monitoring tool.
So I believe the disconnection is caused somehow by the RUT240.
The event logs shows: mobile data disconnected (internal modem)
Tried several settings but it keeps disconnecting.
Updated the firmware to the latest version and put RUT240 in factory defaults but the issue remains, without changing the default settings.
Any idea why or what could cause this?
Hello,
- Could you please specify if the issue was present from the beginning, or if it occurred after specific configuration changes?
- Please ensure that both mobile antennas are properly connected at a 90-degree angle.
- What is the signal strength of your mobile connection? Could you please share a screenshot from Status → Network → Mobile? You can find information about the recommended signal strength here.
- In System → Maintenance → Troubleshoot, if you click on “Show” next to System Logs, you can find more detailed logs about events that happened on your RUT240, which could help determine the cause of the issue.
Best regards,
Hi Marija,
- I believe the issue started already since the SIM was activated in March.
I notice this strange behaviour this summer because of some interruptions in streaming services.
To troubleshoot I turn on the service event reporting send SMS when the Mobile connection was disconneced. First I notice that the provider/operator (Vodafone) was collecting the user data usage around the same time as the mobile data connection. When contacting the help desk of the provider they ruled this out and advised me to put the SIM in another phone.
I found out the the phone’s hotspot didn’t disconnect in 24h (ping monitor to google). So a RUT240 issue. - Was already the case
- On 14:20 I rebooted the RUT240 on 16:21:50 the mob1s1a1 lost his connection.
Hello,
As we can see from the signal metrics you provided, the signal quality is fair poor (SINR) there ir no signal (RSRP), which is likely causing these disconnections. For a stable connection, the signal strength and quality should be higher. Improving the signal, such as by relocating the router, may help stabilize your connection and reduce the frequency of disconnections.
Best regards,
Hi Marija,
I don’t think this issue has anything to do with the unstable connection because the will cause a random moment of the disconnects. The interval of 2 hour are somehow caused by some setting.
I found in the systemlogs this:
Tue Oct 29 14:21:30 2024 daemon.notice netifd: mob1s1a1_4 (3806): udhcpc: broadcasting select for 10.223.220.32, server 10.223.220.33
Tue Oct 29 14:21:30 2024 daemon.notice netifd: mob1s1a1_4 (3806): udhcpc: lease of 10.223.220.32 obtained from 10.223.220.33, lease time 7200
Tue Oct 29 14:21:30 2024 kern.info kernel: [ 111.715480] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
I believe this udhcp lease time of 7200 match with 2 hours.
What is the udhcp and could this be the reason of this issue?
Also I looked at the gsm.log and found an error that could be related:
get_dhcp_pkt_fltr:
{
“request”: “AT+QCFG="dhcppktfltr"\r”,
“response”: “\r\nERROR\r\n”,
“errno”: 5,
“error”: “Invalid response”
}
We see the exact same 2 hours disconnect behavior with RUTM50. I am seeing this on multiple carriers (T-Mobile, ATT, and Verizon) and all with very good signal strength. Systems are deployed in very different geographies, meaning the disconnect issue is something isolated to the Teltonika router software itself. I’ll be look to escalate this issue, as it is impacting system operations at this point in time.
The proposed idea that udhcp may be causing this issues seems likely. I see in logs that the DHCP lease on the wan (mobile) interface expires each time the problem occurs. When the lease expires, the connection is completely lost until a new lease is obtain. It appears as though this may take several minutes to occur. Is there a way to adjust the lease time to test this theory?
Hello @Rovie @mtk_matrix ,
Please ensure your device is operating on the latest firmware version:
- For RUT240, the latest version is 7.06.16, available here: RUT240 Firmware Downloads.
- For RUTM50, the latest version is 7.10.2, available here: RUTM50 Firmware Downloads.
If you’re experiencing the same issue on the latest RutOS firmware, please go to System → Firmware → Update firmware in the WebUI and provide a screenshot of this page.
Best regards,
Hi Marija,
Not solved, with the new FW 7.06.16.
Still the same issue also after reboot, RUT240 keeps disconnecting after 2 hours!
The same problem exists on the RUTM50 on the latest firmware.
I have actually fixed the issue with a local patch of a script used to request DHCP leases from the network carrier. The problem is that a DHCP lease length is not specified, and it appears as though most carriers use a default of 2 hours if the client doesn’t request one. With a lease time of 2 hours (7200s), the network carrier terminates the lease immediately at the expiration time and kills the connection on the backend. In order to communicate, a new lease must be established, and the DHCP client on the router handles this by cycling the interface to establish a new lease.
To fix the issue, the user should be allow to specify a longer lease time that would be permitted by their network carrier. In my case I am now using 604800s (7 days). I have proven already that multiple system are able to stay online longer than 2 hours today.
The fix is to apply a patch to /lib/netifd/proto/dhcp.sh to specify the “-x lease:604800” option (replace 604800 with a configurable time in a formal fix please).
Hello @Rovie @mtk_matrix ,
I’ve consulted with our developers regarding this issue, and they suggested adding the line option dhcp '0'
to the config interface 'mob1s1a1'
section to resolve it. Here are the steps to make this change:
- Log in to your router via CLI (more details here: Command Line Interfaces)
- Run the command
vi /etc/config/network
- Locate
config interface 'mob1s1a1'
and press “i” to enter edit mode - Add the line
option dhcp '0'
under the mobile configuration section - Press “Esc”, then type
:wq
and hit Enter to save and close the file
Please let me know if this resolves the issue!
Best regards,
Hi Marija,
I change the netwerk config file as proposed but the issue remains.
It keeps disconnecting every 2 hours.
Best Regards,
Hans
Make sure you reboot the router after changing the config. I applied the recommend change to my RUTM50s and it seems to be working. The change makes the interface use the swan protocol instead of DHCP.
Hi mtk_matrix,
Could you help me out where in the my config file below I need to add this lease “-x lease:604800”.
root@RUT240:~# cat /lib/netifd/proto/dhcp.sh
#!/bin/sh
[ -L /sbin/udhcpc ] || exit 0
. /lib/functions.sh
. …/netifd-proto.sh
init_proto “$@”
proto_dhcp_init_config() {
renew_handler=1
proto_config_add_string 'ipaddr:ipaddr'
proto_config_add_string 'hostname:hostname'
proto_config_add_string clientid
proto_config_add_string vendorid
proto_config_add_boolean 'broadcast:bool'
proto_config_add_boolean 'norelease:bool'
proto_config_add_string 'reqopts:list(string)'
proto_config_add_boolean 'defaultreqopts:bool'
proto_config_add_string iface6rd
proto_config_add_array 'sendopts:list(string)'
proto_config_add_boolean delegate
proto_config_add_string zone6rd
proto_config_add_string zone
proto_config_add_string mtu6rd
proto_config_add_string customroutes
proto_config_add_boolean classlessroute
proto_config_add_string script
proto_config_add_boolean ismobile
}
proto_dhcp_add_sendopts() {
[ -n “$1” ] && append “$3” “-x $1”
}
proto_dhcp_setup() {
local config=“$1”
local iface=“$2”
local ipaddr hostname clientid vendorid broadcast norelease reqopts defaultreqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes classlessroute script ismobile
json_get_vars ipaddr hostname clientid vendorid broadcast norelease reqopts defaultreqopts iface6rd delegate zone6rd zone mtu6rd customroutes classlessroute script ismobile
local opt dhcpopts
for opt in $reqopts; do
append dhcpopts "-O $opt"
done
json_for_each_item proto_dhcp_add_sendopts sendopts dhcpopts
[ -z "$hostname" ] && hostname="$(cat /proc/sys/kernel/hostname)"
[ "$hostname" = "*" ] && hostname=
[ "$defaultreqopts" = 0 ] && defaultreqopts="-o" || defaultreqopts=
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
[ "$norelease" = 1 ] && norelease="" || norelease="-R"
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
[ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts "-O 212"
[ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd"
[ -n "$zone" ] && proto_export "ZONE=$zone"
[ -n "$mtu6rd" ] && proto_export "MTU6RD=$mtu6rd"
[ -n "$customroutes" ] && proto_export "CUSTOMROUTES=$customroutes"
[ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
# Request classless route option (see RFC 3442) by default
[ "$classlessroute" = "0" ] || append dhcpopts "-O 121"
[ "$ismobile" = "1" ] && append dhcpopts "-M"
proto_export "INTERFACE=$config"
proto_run_command "$config" udhcpc \
-p /var/run/udhcpc-$iface.pid \
-s ${script:-/lib/netifd/dhcp.script} \
-f -t 0 -i "$iface" \
${ipaddr:+-r ${ipaddr/\/*/}} \
${hostname:+-x "hostname:$hostname"} \
${vendorid:+-V "$vendorid"} \
$clientid $defaultreqopts $broadcast $norelease $dhcpopts
}
proto_dhcp_renew() {
local interface=“$1”
# SIGUSR1 forces udhcpc to renew its lease
local sigusr1=“$(kill -l SIGUSR1)”
[ -n “$sigusr1” ] && proto_kill_command “$interface” $sigusr1
}
proto_dhcp_teardown() {
local interface=“$1”
proto_kill_command “$interface”
}
add_protocol dhcp
Hello @Rovie ,
Please execute /etc/init.d/network restart
to apply the changes and restart the configurations. Let me know if it works!
Best regards,
Hello Marija,
I did what you ask but still the connection got lost.
In the attachment the result in the system log of the network restart at 9:46.
At 10:03 still the connection was lost after the 2 hour of the last disconnect.
I notice that at 09:02 a udhcpc: broadcasting renew message was send. This message was send to renew the lease time according dhcp. However still the connection disconnected after 2 hours. I rebooted RUT240 but still the issue is still there 2 hours after reboot time.
part system after restart network.zip (6.7 KB)
I have sent you a form to fill out. Once it’s completed, I will contact you privately so you can send me the troubleshoot file. Please use ‘10091’ as the ticket ID.
Best regards,