Community discussions

MikroTik App
 
nikolasc
just joined
Topic Author
Posts: 11
Joined: Wed Jun 04, 2008 10:30 am

Link performances vs frequency

Fri Feb 28, 2014 11:10 am

The challenge is to find the best frequency to works a point to point link.

Factors that influence may be the same antenna system, noise, interference from other link to the same point or at the other end.

The solution to do some tests on our own at various frequencies are guaranteed but quite time to spent.

The idea
A script that automatically change the frequency in the access point, waiting for the client to connect and then do and records some bandwidth tests, ccq, signal, data rate, flood ping.
Deactivating bgp peer during the test.
Check if the client connected in the time provided by.
If not connected, informs and still waiting 10 sec more.
It checks the up-time of the link and if found less than the duration of bw-test informs that "link unstable" during the measurements.
Calculates the time taken to connect the client and automatically readjusts new connection time +10 sec.
At the end of the process turns the link to the original frequency and activate the bgp peer.

The result is to have a table of the link performances by frequency.

At a glance shows which frequencies have the worst behavior, many lost packets and should be avoided.
Instead, you usually see groups of channels with better performance, more balanced Tx / Rx and low lag which should be preferred.

The results are written to a txt file, it can be open with a worksheet (libreoffice calc or excel) and compare the results.

HOW TO USE IT
To write the txt file from new terminal
/system logging action
add disk-file-name=scriptlog name=action1 target=disk
/system logging
add action=action1 topics=script
Open the script.txt, select it all and copy to make a new script in mikrotik and apply.

At the top of the script has to change ...
the name of the interface
the remote ip
bgp peer name
the minimum – maximum frequencies that we want to try and step by eg 5, 10, 20 MHz
frequency that will turn the link when finished.
user & pass if authenticate the bw-test
and below the “Print Labels at txt” a text to know what tests we do.

Adjust and Access point and client in super channel
On the client, scan list from to where we want to do testing and data rate or mcs is good to be default or all selected.

Run the script only from the access point.

When finished, pull the file that creates and open with libre office or excel, delimited with spaces as separator.
Logically it should be all aligned and correctly.
You do not have the required permissions to view the files attached to this post.
 
nikolasc
just joined
Topic Author
Posts: 11
Joined: Wed Jun 04, 2008 10:30 am

Re: Link performances vs frequency

Wed Mar 05, 2014 8:46 pm

Major changes to ...
Controls when the client was connected within a designated time instead of waiting a predetermined time to check if connected. (faster)

The bw test are 2 groups (both & one way)
If there is no answer at tcp/ip bypassed the whole group (faster, less likely to hang the script)

Record the time it took to connect the client, the uptime and the loop time taken for each frequency.

Automatic testing with more than one protocols (802.11 nstream nv2) if we want.

Debug Level
Record all the steps that make the script along with the wireless info and logs to a different file and have a clean record with only the measurements.
/system logging action
add disk-file-count=3 disk-file-name=scriptlog name=action1 target=disk
add disk-file-count=3 disk-file-name=debuglog name=debug target=disk
/system logging
add action=action1 topics=script,info
add action=debug topics=script,debug
add action=debug topics=wireless
add action=debug topics=script,warning
add action=debug topics=script,info
More Warning massage in faulty connection
if can not connect
if not received reply from the flood ping
if link lost connection during time of measurement

Added recording the time required to complete the sampling with 3 flood ping
Typically be a few ms but because counting sec = 1
If we do not receive any reply would be ~ 15 sec
Added limit to the above time (sensitivity) if eg > 2, 3 - to reject the measure as unstable.

Plane text
The script in plain text copy paste in the script

Export
Contains all of the settings for logging and script.
We can do copy paste in New Terminal
or to put it in the file and do import

script is tested at ver. 5 & 6
[       @rb911] > import file-name=script_final.rsc 
Opening script file script_final.rsc

Script file loaded and executed successfully
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 14 guests