Mikrotik RouterOS Jitter Problem

Excessive Jitter on RouterOS

Updated for RouterOS 6.47.3 on 5-Sep-2020

Updated for RouterOS 6.46.7 on 14-Sep-2020

Willem A. Schreüder, Benjamin Matthews, Tracy Helhold, John Maxwell and Joey Stanford

Abstract

Mikrotik RouterOS 6.46.2 introduced a change that has lead to excessive jitter. The problem persisted to various degree thoroughout the 6.46.3 to 6.47.1 verions, but appears to have been resolved in 6.47.2. The problem appears to reccur to a lesser extent in 6.47.3

Introduction

Rocky Mountain Ham Radio (RMHAM) operates a network of more than 500 devices extending primarily over Wyoming, Colorado and New Mexico. The devices are primarily Mikrotik RB2011 routers, but larger cites have CCR1009 routers. Most microwave links are Netmetal 5HP radios operating in the 5GHz amateur band. The network is primarily used to connect amateur repeaters using AllStarLink for analog and DMR, P25, D-Star and Fusion digital repeaters.

Starting in the spring of 2020, RMHAM NetOps started to notice excessive jitter on the network when the network was upgraded RouterOS 4.46. The jitter was particularly noticable on the P25 repeaters. Reverting some of the microwave links to RouterOS 6.45.9 significantly reduced jitter.

Further investigation shows that in addition to increased jitter on the microwave links, there is also significantly increased jitter on routers connected by ethernet. The exact source of the jitter remains unknown but it appears to have been introduced in RouterOS 6.46.2 and persists to various degrees until 6.47.1. RouterOS 6.47.3 results appear similar to 6.47.1.

Routeros 6.46.7 replaced Routeros 6.45.9 as the new Long Term Stable release on September 14, 2020. The jitter observed in this version is similar to RouterOS 6.47.3 and except for VPN connections is lower than that of 6.45.9.

Materials and Methods

In order to eliminate variable traffic loads, the evaluation was performed on the RMHAM NetLab. The NetLab consists of 32 routers: one ten port RB2011 and thirty one RB750/RB751/RB951 five port routers. Each router is individually powered by 12V DC and routers are interconnected by short ethernet cables. The configuration mirrors the actual mountain top topology except that instead of microwave links the links are simply ethernet cables.


Figure 1. RMHAM Netlab

Figure 1 is a photograph of the NetLab. Purple cables represent direct connections between routers. Red cables represent indirect connections between routers via the RB2011 which represents commercial internet links. The NetLab is normally used for training, demonstration and testing.

Two Raspberry Pi 3B computers are connected part of the NetLab. One is used to provide NTP, DNS and similar services. The other is connected to the RB2011 and is used for penetration testing of firewalls and similar functions.

Every router in the NetLab was configured with the same version of RouterOS. The Routerboard firmware was updated to match to RouterOS version. All routing was performed using OSPF. A separate subnet was created for every link between routers. Routers connected via the RB2011 runs a PPTP VPN with a high OSPF weight. These VPN connections were not selected because the direct connections provided a lower cost. During the experiments, no Dijkstras were run on any of the routers because the networks was stable and no packets wer lost.

Timing was generated using the cping program. The cping program sends one ICMP packet per second to each router in the network and measures the round trip time. Measurements were made from a Raspberry Pi 3B computer connected near the center of the network. The identical hardware configuration was used for all measurements.

For each experiment, the appropriate NPK was downloaded to each router. All routers were then rebooted twice, once to install the appropriate packages, and once to update the Routerboard firmware. The identical configuration was used on each router for all experiments.

The last experiment attempted to use RouterOS 7.1beta2, but the system failed to route appropriately with the existing configuration.

Ping times were recorded over a six hour period commencing withing a few minutes of rebooting all NetLab routers. Individual ping times were recorded to a file for 21600 pings (one ping per second for 6 hours). No packets were lost during any of the experiments.

Experiments were run for RouterOS 6.45.9, the last long term stable verion of the RouterOS 6.45 series, all stable verions of the RouterOS 6.46 and 6.47 series. The NPK for each version of RouterOS was downloaded from the https://download.mikrotik.com/routeros/XXX/routeros-mipsbe-XXX.npk where XXX represents the version of RouterOS.

Results

The results are shown in Figure 2. Individual ping times to each of the 32 routers are shown as blue lines. The arithmetic average ping time for all 32 routers computed for each one second interval is shown as a red line.


Figure 2a. ICMP ping times RouterOS 6.45.9


Figure 2b. ICMP ping times RouterOS 6.46


Figure 2c. ICMP ping times RouterOS 6.46.1


Figure 2d. ICMP ping times RouterOS 6.46.2


Figure 2e. ICMP ping times RouterOS 6.46.3


Figure 2f. ICMP ping times RouterOS 6.46.4


Figure 2g. ICMP ping times RouterOS 6.46.5


Figure 2h. ICMP ping times RouterOS 6.46.6


Figure 2h. ICMP ping times RouterOS 6.46.7


Figure 2i. ICMP ping times RouterOS 6.47


Figure 2j. ICMP ping times RouterOS 6.47.1


Figure 2k. ICMP ping times RouterOS 6.47.2


Figure 2l. ICMP ping times RouterOS 6.47.3

Average ping times are during normal operation is on the order of 1ms. The number of hops from the device recording the pings to each of the routers in the NetLab vary from 1 to 8.

The key result observed in Figure 2 is that starting with RouterOS 6.46.2, the jitter increased significantly. The median ping time remains about 1ms, but the at seemingly random intervals, ping times spike dramatically. No pings were lost, but times periodically spiked by one or two orders of magnitude.

To illustrate this behavior, Figure 3 shows a subset of the data from second 10000 for 10500.


Figure 3a. ICMP ping times RouterOS 6.45.9


Figure 3b. ICMP ping times RouterOS 6.46


Figure 3c. ICMP ping times RouterOS 6.46.1


Figure 3d. ICMP ping times RouterOS 6.46.2


Figure 3e. ICMP ping times RouterOS 6.46.3


Figure 3f. ICMP ping times RouterOS 6.46.4


Figure 3g. ICMP ping times RouterOS 6.46.5


Figure 3h. ICMP ping times RouterOS 6.46.6


Figure 3h. ICMP ping times RouterOS 6.46.7


Figure 3i. ICMP ping times RouterOS 6.47


Figure 3j. ICMP ping times RouterOS 6.47.1


Figure 3k. ICMP ping times RouterOS 6.47.2


Figure 3l. ICMP ping times RouterOS 6.47.3

Figure 3 shows that until RouterOS 6.46.1, the occasional ping is delayed by a few milliseconds, but on average the ping times remain around 1ms. However, starting with RouterOS 6.46.2, average ping times occasionally spike significantly into the tens of milliseconds to 100 millisecond range.

Another interesting observation is that this behavior does not start immediately on rebooting the router. Figure 4 shows the first 30 minutes of each experiment.


Figure 4a. ICMP ping times RouterOS 6.45.9


Figure 4b. ICMP ping times RouterOS 6.46


Figure 4c. ICMP ping times RouterOS 6.46.1


Figure 4d. ICMP ping times RouterOS 6.46.2


Figure 4e. ICMP ping times RouterOS 6.46.3


Figure 4f. ICMP ping times RouterOS 6.46.4


Figure 4g. ICMP ping times RouterOS 6.46.5


Figure 4h. ICMP ping times RouterOS 6.46.6


Figure 4h. ICMP ping times RouterOS 6.46.7


Figure 4i. ICMP ping times RouterOS 6.47


Figure 4j. ICMP ping times RouterOS 6.47.1


Figure 4k. ICMP ping times RouterOS 6.47.2


Figure 4l. ICMP ping times RouterOS 6.47.3

Figure 4 illustrates that in the problematic versions of RouterOS, the high jitter does not immediately start, but occurs after the experiment has been running for about 10 minutes. The start of the experiment was not timed precisely from the last reboot of the routers, but this result may suggest that there is some resource like memory that becomes exhausted leadingg to the observed increase in jitter.

The jitter was quantified by calculating the standard deviation of the ping times to each of the 32 routers. The results are shown in Figure 5.


Figure 5a. Standard Deviation of ICMP ping times for all versions.


Figure 5b. Standard Deviation of ICMP ping times for all LTS and latest verions.

Figure 5a shows that the dramatic increase in jutter for versions 6.46.2, 6.46.3 and 6.46.4 by router. Figure 5b shows just the two Long Term Stable versions 6.45.9 and 6.46.7 and the latest version 6.47.3. Figure 5b densonstartes that for many routers, teh standard deviation is significantly lower in version 6.46.7 than in 6.45.9. The Genoa router is connected over an SSTP VPN instead of a direct connection. This connection showed significantly more jitter than directly connected links, although the average ping time is essentially the same.

Detailed statistics are shown in Appendix 1.

Discussion and Conclusions

Although all versions of the RouterOS evaluated were from the Stable branch, the 6.46.2 through 6.46.5 introduced significant jitter. While no packets were lost, the jitter was sufficiently sever to create significant problems for UDP based radio linking systems. This was particularly sever for P25 systems, although all systems are effected to some degree.

A search of the Mikrotik forums showed no reports of the problem as detailed above. The source of the problem is not understood, but appears to have been resolved by RouterOS 6.47.2. The problem does appear to have resurfaced to a lesser extent in RouterOS 6.47.3 as it seems similar to 6.47.1.

The problem was readily apparrent when the production network was upgraded to RouterOS 6.46.6, but only by testing all versions in a controlled environment could this problem be isolated and evaluated.

Based on this experience, we recommend that the RMHAM network should only deploy the long term stable branch of RouterOS on the production network. The Long Term Stable branch receives security updates and therefore is as secure as later versions from the stable branch. There does not appear to be any advantages to using more recent versions of RouterOS 6.

The updated long term stable (LTS) RouterOS 6.46.7 appears to be well behaved and is an appropriate candidate for overwinter conditions 2020-2021.

Initial evaluation of RouterOS 7 did not go well. These problems may well be resolved by the time RouterOS 7 reaches Stable status, but significant testing should be performed before transitioning the network to RouterOS 7.

Appendix 1. Detailed Statistics

RouterOS
Version
StatisticMtnBBCSUBudweiserBuckhornUNCHorsetooth
NCARC
Horsetooth
RMHAM
FirestoneLee
Hill
ThorodinSaddlebackSquawMethodistDevilsheadAlmagreCheyenne
Mountain
Black
Forest
FremontK0JSCBadgerCripple
Creek
WestcreekMosquito
Pass
Upper
Dowd
CedarwoodPuebloCentennial
Cone
AC0KQGenoaNamaquaCritchellQRV2
6.45.9Minimum0.50.60.70.60.60.60.50.50.40.40.50.50.60.50.60.60.60.60.70.50.60.50.60.60.70.70.50.51.10.70.60.7
Average0.61.00.90.80.80.70.70.70.60.60.60.70.90.70.70.80.80.80.90.70.80.70.70.80.90.90.70.61.61.00.80.9
Maximum24.813.313.213.032.513.213.013.312.212.411.912.412.839.239.338.236.935.834.633.332.130.929.728.627.326.224.923.772.821.320.118.9
StdDev0.40.30.30.30.40.30.30.30.30.30.30.30.30.40.40.40.40.40.40.40.40.40.30.30.30.30.30.31.50.30.30.3
6.46Minimum0.50.70.70.60.60.60.60.50.50.40.50.50.70.50.60.60.60.60.70.50.60.50.60.60.70.70.50.51.10.80.60.7
Average0.61.00.90.80.80.80.70.70.60.60.60.71.00.70.70.80.80.80.90.70.80.70.70.80.90.90.70.61.61.00.80.9
Maximum55.654.653.452.251.049.748.547.346.141.643.742.641.540.239.037.936.635.534.333.031.830.629.428.327.125.924.523.336.421.019.818.7
StdDev0.70.50.50.50.50.50.50.50.50.40.40.40.40.40.40.40.40.40.40.40.40.40.30.30.40.40.40.31.30.40.30.3
6.46.1Minimum0.50.70.70.60.60.60.60.50.50.40.40.50.70.50.60.60.60.60.70.50.60.50.60.60.70.70.50.51.10.80.60.8
Average0.61.00.90.80.80.70.70.70.60.60.60.71.00.70.70.80.80.80.90.70.80.70.70.80.90.90.70.61.61.00.80.9
Maximum39.712.613.213.012.412.013.112.411.912.411.413.113.112.213.289.087.786.685.484.182.981.680.579.378.176.975.674.474.772.170.969.7
StdDev0.40.20.20.20.20.20.30.20.20.20.20.20.20.20.20.60.60.60.60.60.60.60.60.60.60.60.50.51.60.50.50.5
6.46.2Minimum0.50.70.70.60.60.60.60.50.50.40.50.50.70.50.60.60.60.60.70.50.60.50.60.60.70.70.50.51.10.80.60.7
Average1.71.61.51.41.41.41.31.31.21.11.31.31.61.31.31.41.41.41.51.41.41.31.41.51.51.61.31.32.71.71.41.6
Maximum153.3108.2108.9108.5107.9108.1107.8108.2107.6106.0107.4107.5107.2107.6107.6107.7107.3107.1107.9107.6106.5107.2106.7107.3106.7106.5106.3105.9191.3107.2106.8807.8
StdDev8.86.66.66.56.56.56.56.56.56.46.66.66.66.66.66.76.76.76.86.86.86.96.86.96.96.96.86.79.06.66.68.6
6.46.3Minimum0.50.70.70.60.60.60.60.50.50.40.50.50.70.50.60.60.60.60.70.60.60.60.60.60.70.70.50.51.10.80.60.8
Average1.01.00.90.80.80.80.70.70.60.60.60.71.00.70.70.80.80.80.90.70.80.70.70.80.90.90.70.62.01.00.80.9
Maximum105.184.182.981.680.479.277.976.775.571.773.171.970.969.568.467.266.064.863.762.361.259.958.757.656.455.253.857.2107.650.349.047.9
StdDev5.20.70.70.70.60.60.60.60.60.60.60.60.60.50.50.50.50.50.50.50.50.50.40.40.40.40.40.55.90.40.40.4
6.46.4Minimum0.50.70.70.60.60.60.50.50.50.40.50.50.60.50.50.60.60.60.70.50.60.50.60.60.70.70.50.51.10.80.60.7
Average1.81.81.71.61.61.51.51.51.41.31.41.41.71.41.51.61.61.51.71.51.61.51.51.61.71.71.41.42.81.91.61.7
Maximum163.1108.2107.1107.5108.2108.2108.4107.4108.1106.0108.2107.7106.9107.4107.4106.6107.0107.3107.0107.3106.9107.0106.8107.2106.9106.9107.4106.5129.8108.2107.0107.5
StdDev9.27.67.57.67.57.57.57.57.77.47.67.57.67.57.67.57.57.47.57.57.67.57.77.67.77.67.67.69.67.77.77.7
6.46.5Minimum0.50.70.70.60.60.60.60.50.50.40.50.50.70.50.60.60.60.60.60.50.60.50.60.60.70.70.50.51.10.80.60.7
Average1.71.71.61.51.51.41.41.41.31.21.31.31.61.41.41.51.51.41.61.41.41.41.41.51.51.61.31.32.71.71.41.6
Maximum130.4108.7107.4108.4107.2106.4107.5108.2107.3105.4107.5108.1107.9107.2106.9107.3107.2106.8107.3106.5105.4107.1106.2106.3106.5106.6106.9106.3111.1106.5106.6107.4
StdDev8.97.07.07.06.96.86.86.97.06.76.96.97.07.06.96.96.96.96.96.86.76.96.96.96.96.96.96.98.96.86.86.8
6.46.6Minimum0.50.70.70.60.60.60.60.50.50.40.50.50.60.50.60.60.60.60.70.50.60.50.60.60.70.70.50.51.10.80.60.7
Average1.11.00.90.80.80.80.70.70.60.60.60.71.00.70.70.80.80.80.90.70.80.70.70.80.90.90.70.62.11.10.80.9
Maximum105.367.266.064.863.662.361.159.958.653.556.355.192.692.891.690.589.288.086.885.584.383.081.980.779.578.377.075.7105.473.472.171.0
StdDev5.70.70.70.70.70.70.70.60.60.60.60.60.80.80.80.80.80.80.80.70.70.70.70.70.70.60.60.65.80.60.60.6
6.46.7Minimum0.50.70.70.60.60.60.60.50.50.40.50.50.70.50.60.60.60.60.70.50.60.50.60.60.60.70.50.51.10.80.60.7
Average0.61.00.90.80.80.70.70.70.60.60.60.71.00.70.70.80.80.80.90.70.80.70.70.80.90.90.70.61.91.10.80.9
Maximum63.53.46.62.62.73.01.99.811.19.96.04.83.511.310.08.77.46.24.93.53.12.93.14.84.74.74.03.777.53.92.64.4
StdDev0.50.10.10.00.00.00.00.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.13.20.10.10.1
6.47Minimum0.50.70.70.60.60.60.50.50.50.40.50.50.60.50.50.60.60.60.70.50.60.50.60.60.60.70.50.51.10.70.60.7
Average0.61.00.90.80.80.70.70.60.60.60.60.70.90.70.70.80.80.70.80.70.80.70.70.80.80.90.60.61.91.00.80.9
Maximum12.913.213.112.812.912.313.012.312.111.511.512.413.012.412.213.012.911.712.912.812.912.811.810.69.412.611.612.339.412.712.212.5
StdDev0.30.30.30.20.20.20.20.30.20.20.20.20.20.20.20.20.20.20.20.20.30.30.20.20.20.20.20.23.10.20.20.2
6.47.1Minimum0.50.70.70.60.60.60.50.50.50.40.50.50.60.50.50.60.60.60.60.50.60.50.60.60.60.70.50.51.10.70.60.7
Average0.61.00.80.80.80.70.70.60.60.60.60.70.90.70.70.80.80.70.80.70.70.70.70.80.80.90.60.61.91.00.80.9
Maximum11.59.88.67.36.15.25.64.33.12.810.39.07.76.55.34.15.34.13.72.53.410.08.87.66.45.24.04.538.89.42.43.5
StdDev0.20.10.10.10.10.10.10.10.00.00.10.10.10.10.10.10.10.10.10.00.00.10.10.10.10.10.10.13.20.10.00.1
6.47.2Minimum0.40.60.70.60.60.60.50.50.50.40.50.50.60.50.50.60.60.60.60.50.60.50.60.60.60.70.50.51.00.70.60.7
Average0.61.00.90.80.80.70.70.70.60.60.60.70.90.70.70.80.80.70.80.70.80.70.70.80.80.90.60.61.61.00.80.9
Maximum12.412.812.812.413.013.312.412.512.812.112.512.513.212.412.312.712.512.512.612.612.912.512.612.712.812.210.812.435.912.812.512.7
StdDev0.40.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.30.20.31.30.30.30.3
6.47.3Minimum0.40.60.70.60.60.60.50.50.40.40.40.50.60.50.50.60.60.60.60.50.60.50.50.60.60.70.50.51.10.70.60.6
Average0.61.00.80.80.80.70.70.60.60.50.60.60.90.60.70.80.80.70.80.70.80.70.70.80.90.90.70.61.91.00.80.9
Maximum10.56.34.93.63.56.03.23.11.92.84.63.32.93.22.23.34.06.07.57.86.75.44.54.213.111.810.59.239.77.15.84.6
StdDev0.20.10.10.00.10.10.00.00.00.00.00.00.10.00.00.00.10.10.10.10.10.10.10.10.20.20.20.12.90.10.10.1