Community discussions

MikroTik App
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Detect 1Mbps data rate

Tue Sep 26, 2017 4:08 pm

Occasionally when customers complain about slow service it can caused by 1Mbps date rate being used and a reset and reflash solves the issue, but is someway I can locate from the AP any CPE's that are using 1Mbps rather than manually open each one?
You do not have the required permissions to view the files attached to this post.
Last edited by n21roadie on Wed Dec 13, 2017 9:10 pm, edited 1 time in total.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: Detect 1Mbps data rate

Wed Sep 27, 2017 10:19 pm

Hello,

I would suggest that you disable 1mbps to 12mbps rates in basic-rates and supported-rates.

That way, nobody uses them and you avoid sticky clients that are too far away from slowing down the network.

Sent from Tapatalk
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Thu Sep 28, 2017 1:49 am

Listed Data rates start at 6 Mbps and not 1Mbps, somehow a faulty CPE lists 1Mbps and as mentioned reset then reflash fixes the issue !
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Detect 1Mbps data rate

Wed Dec 13, 2017 9:49 pm

Hi n21roadie
please can you tell me how "reset then reflash fixes the issue !" in winbox
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Wed Dec 13, 2017 10:00 pm

Hi n21roadie
please can you tell me how "reset then reflash fixes the issue !" in winbox
I tried a simple reboot but this did not solve the issue long term so had to revisit customers CPE, /system reset and reapply our custom configuration script and this solved the issue, maybe the custom configuration script when originally added to the CPE did not apply fully?

So my aim is to have CPE's detect when 1Mbps data rate is being used and then email, so that before a customer complains we are already aware of the issue.
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Detect 1Mbps data rate

Thu Dec 14, 2017 8:21 am

first step: script for check in 1Mbps is listed in Signal Strength Table, then log warning.
{
global found false; 
:foreach SS in=[/interface wireless registration-table get 0 strength-at-rates] do={
            :local rate [:pick $SS ([:find $SS "@"]+1) ([:find $SS "M"])];
            #:log warning $rate; 
            :if ( $rate=1 ) do={ :set found true; }
}
:if ( $found=true ) do={ :log warning "Found 1Mbps in Signal Strengths Table" }; 
:do { /system script environment remove found }; 
} 

Test it and give me your opinion.
Best Regards
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Thu Dec 14, 2017 11:31 pm

Very good the script appears to function correctly! (cannot test fully until the script is finished and applied to all CPE's!)

Next step if I could suggest is to write to a new file which contents could be cleared (or deleted) once the email alert is sent,as default logs cannot be deleted (log line size reduced maybe)

viewtopic.php?f=13&t=27505&p=593653&hil ... og#p593578

Here is a script I use to detect routing errors from the logs and send a email, not sure if this can be of help ( it also needs to read from separate file and not the default logs?)
:global lastTime;
:local adminmail1 "XXXXXXXXX@gmail.com";
:local adminmail2 "XXXXXXXX@hotmail.com";
:local sub1 ([/system identity get name])
:local sub2 ([/system clock get time])
:local sub3 ([/system clock get date])
:local company ""
:local gmailid xxxxxxx@gmail.com
:local gmailuser xxxxxxxx@gmail.com
:local gmailpwd 
:local gmailport 587
:local gmailsmtp
:set gmailsmtp [:resolve "smtp.gmail.com"]  
:local currentBuf [ :toarray [ /log find message~"new master flag=false" || message~"wrong peer state" || message~"init" || message~"2-WAY" || message~"Full to Down"] ] ;
:local currentLineCount [ :len $currentBuf ] ;
  
if ($currentLineCount > 0) do={
   :local currentTime "$[ /log get [ :pick $currentBuf ($currentLineCount -1) ] time ]";
  
   :if ([:len $currentTime] = 15 ) do={
      :set currentTime [ :pick $currentTime 7 15 ];
   }
    
   :local output "$currentTime $[/log get [ :pick $currentBuf ($currentLineCount-1) ] message ]";
    
   :if (([:len $lastTime] < 1) || (([:len $lastTime] > 0) && ($lastTime != $currentTime))) do={
      :set lastTime $currentTime ;
      /tool e-mail set address=$gmailsmtp port=$gmailport start-tls=yes from=$gmailid user=$gmailuser password=$gmailpwd
	  /tool e-mail send to=$adminmail1 subject="$sub3 $sub2 Router:$sub1 Routing Error "  body="$output" start-tls=yes
	  /tool e-mail send to=$adminmail2 subject="$sub3 $sub2 Router:$sub1 Routing Error "  body="$output" start-tls=yes
	  
	  
   }
}
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Detect 1Mbps data rate

Fri Dec 15, 2017 6:33 pm

....
You do not have the required permissions to view the files attached to this post.
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Detect 1Mbps data rate

Fri Dec 15, 2017 10:10 pm

mmm if you accept my advice: it's better and easier to use Telegram bot
it's direct and simple :wink:
[/tool netwatch] telegram bot example on YouTube https://youtu.be/6sVrUJi9_K8
if you accept, I can help you
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Detect 1Mbps data rate

Sat Dec 16, 2017 7:46 pm

#telegram bot version script
{
:local Btoken "bot token" 
:local chatID "-chat id"

:local found false; 
:local Dname [/system identity get name] 
:local cDT ([/system clock get date] . " " . [/system clock get time]) 
:local msg ($cDT . "%0AFound 1Mbps in Signal Strengths Table%0ADevice Name: " . $Dname);  

:foreach SS in=[/interface wireless registration-table get 0 strength-at-rates] do={
            :local rate [:pick $SS ([:find $SS "@"]+1) ([:find $SS "M"])];
            #:log warning $rate; 
            :if ( $rate=1 ) do={ :set found true; }
}
:if ( $found=true ) do={ 
	:log warning $msg; 
	/tool fetch keep-result=no url=("https://api.telegram.org/bot" . $Btoken . "/sendMessage\?chat_id=" . $chatID . "&text=" . $msg)
	}; 
} 

%0A = \n
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Sun Dec 17, 2017 4:21 pm

At present scripts when searching default logs for keywords have a flaw where repetitive emails are sent about the same issue, for example below will be received every 15mins ( script scheduler )
may/09/2017 23:15:00 Router:XXXX_PTP_XXXX Routing Error
16:40:42 new master flag=false
may/09/2017 23:30:00 Router:XXXX_PTP_XXXX Routing Error
16:40:42 new master flag=false
may/09/2017 23:45:00 Router:XXXX_PTP_XXXX Routing Error
16:40:42 new master flag=false
It looks like I need 2 scripts!
(1) Script to Detect 1Mbps - Done many thanks
(2) Script to search for keywords in default logs and create new log file (say name="keywords") for any keywords found and email,
(2a) this script should compare time stamp on default log and keywords files when duplicate found do not create new entry into file "Keywords" and email,this to prevent loops?
(2b) It doesn't matter that keywords file is overwritten by new keywords found in default logs

Is this a workable solution.
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Detect 1Mbps data rate

Sun Dec 17, 2017 8:28 pm

At present scripts when searching default logs for keywords have a flaw where repetitive emails are sent about the same issue, for example below will be received every 15mins ( script scheduler )
may/09/2017 23:15:00 Router:XXXX_PTP_XXXX Routing Error
16:40:42 new master flag=false
may/09/2017 23:30:00 Router:XXXX_PTP_XXXX Routing Error
16:40:42 new master flag=false
may/09/2017 23:45:00 Router:XXXX_PTP_XXXX Routing Error
16:40:42 new master flag=false
It looks like I need 2 scripts!
(1) Script to Detect 1Mbps - Done many thanks
(2) Script to search for keywords in default logs and create new log file (say name="keywords") for any keywords found and email,
(2a) this script should compare time stamp on default log and keywords files when duplicate found do not create new entry into file "Keywords" and email,this to prevent loops?
(2b) It doesn't matter that keywords file is overwritten by new keywords found in default logs

Is this a workable solution.


I see it is complicate solution.
schedule script every 15 and if detected it will send Message to Telegram, better than Email.
the message format
-------------------------------------------------------
date time
Found 1Mbps in Signal Strengths Table
device name: <mikrotik's identity>
-------------------------------------------------------
 
Resnais
just joined
Posts: 17
Joined: Mon Feb 09, 2015 10:13 pm

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 9:22 am

Thank you guys, great information. Does this 1Mbit problem reoccur often? (after some version upgrades or reboots?)

Looks like i have something similar:
1mbit_thing.png
set [ find default-name=wlan1 ] band=2ghz-g/n basic-rates-a/g=9Mbps \
    basic-rates-b="" bridge-mode=disabled default-authentication=no \
    default-forwarding=no disabled=no disconnect-timeout=2s distance=indoors \
    frequency=2427 guard-interval=long ht-basic-mcs="" ht-supported-mcs="mcs-1\
    ,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-\
    13,mcs-14,mcs-15,mcs-16,mcs-17,mcs-18,mcs-19,mcs-20,mcs-21,mcs-22,mcs-23" \
    hw-protection-threshold=1536 max-station-count=30 mode=ap-bridge \
    multicast-helper=full preamble-mode=short rate-set=configured rx-chains=\
    0,1 ssid=PROOMWLAN supported-rates-a/g=\
    9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps supported-rates-b="" \
    tx-chains=0,1 wireless-protocol=802.11 wmm-support=enabled wps-mode=\
    disabled
You do not have the required permissions to view the files attached to this post.
Last edited by Resnais on Mon Dec 18, 2017 12:06 pm, edited 3 times in total.
 
uldis
MikroTik Support
MikroTik Support
Posts: 3446
Joined: Mon May 31, 2004 2:55 pm

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 10:51 am

please be more specific about this problem.
1Mbps data-rate is valid for B/G/N standard. But in the picture the 1Mbps rate was used 6hours ago with low signal and since then it is not used.
What kind of wireless client it is?
What is the distance setting?
What RouterOS version and wireless settings you have on the AP and the CPE?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 11:54 am

Some clients probably go down to the slowest rate when they have nothing to transmit, to save power or improve reliability or some such.
I have two devices on my network, one is a Raspberry Pi with a 802.11n USB stick, the other is a NEXT THING CHIP single board computer,
and both of them are listed transmit at 1Mbps (Rx column in the MikroTIk) when they are idle. When I transfer some data from them, the
rate increases.
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 12:22 pm

As a WISP we have had CPE's that when a customer complains about a slow service, we call and discover that 1Mbps data rate is listed and true service is slow, our solution has been to (a) reset and (b) reapplying our custom configuration file to the CPE!
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 12:37 pm

edit cut
Last edited by n21roadie on Mon Dec 18, 2017 1:48 pm, edited 1 time in total.
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 1:32 pm

Thank you guys, great information. Does this 1Mbit problem reoccur often? (after some version upgrades or reboots?)

As i wasn't aware of this issue until a customer complained but luckily this has only occurred to very few CPE's, but we need the script to alert us as our concern is that some customers will not complain about a slow service but will instead switch to another provider.
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Mon Dec 18, 2017 1:48 pm

please be more specific about this problem.
1Mbps data-rate is valid for B/G/N standard. But in the picture the 1Mbps rate was used 6hours ago with low signal and since then it is not used.
Uldis how accurate is "last measured",
My guess as the service is slow that there is a mixed up data rate should be either 1, 2, 5.5, and 11 or 6, 9, 12, 18, 24, 36, 48 and 54 but not 1,6, 9, 12, 18, 24, 36, 48 ,54 ?
What kind of wireless client it is?
5Ghz-only N was A/N now all CPe's are N only
What is the distance setting?
8 -12KMs
What RouterOS version and wireless settings you have on the AP and the CPE?
First noticed on V6.35 and since then I check this when a customers complains about streaming is buffering?




[/quote]
 
Resnais
just joined
Posts: 17
Joined: Mon Feb 09, 2015 10:13 pm

Re: Detect 1Mbps data rate

Wed Dec 20, 2017 2:34 pm

Yes, i did a clean reflash (netinstall) + initial configure script (exported previous configuration rsc)
And now no more constant signal_strength@1mbit showing up in the table. Reminds me the good oldschool computer performance boost- windows reinstallation :D
no_more_1mbit_signal_strength.png
some observations-
1) reset configuration[*run configuration after reset*] did not help, needed a reflash with netinstall.
2) performed on two RB711UA-2HnD boards (both AP's showed 1mbit signal strength)
You do not have the required permissions to view the files attached to this post.
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Detect 1Mbps data rate

Wed Dec 20, 2017 6:29 pm

Yes, i did a clean reflash (netinstall) + initial configure script (exported previous configuration rsc)
And now no more constant signal_strength@1mbit showing up in the table. Reminds me the good oldschool computer performance boost- windows reinstallation :D

no_more_1mbit_signal_strength.png

some observations-
1) reset configuration[*run configuration after reset*] did not help, needed a reflash with netinstall.
2) performed on two RB711UA-2HnD boards (both AP's showed 1mbit signal strength)
What board are you using!

Who is online

Users browsing this forum: No registered users and 7 guests