Community discussions

MUM Europe 2020
 
alaqmar2013
just joined
Topic Author
Posts: 5
Joined: Thu Feb 14, 2019 9:43 am

tx rx fp rx dropped pppoe account

Sun Aug 25, 2019 4:00 pm

Hello All. I'm running into an issue which is the tx rx fp rx dropped to 0. The solution to fix that is by press disable and enable the pppoe account. Is there any work around script to automatically disable pppoe account and enable it again once dropped?
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Tue Aug 27, 2019 2:05 am

Few solutions but always Build In are the best.
/tool traffic-monitor add name=CheckPPPoE interface=pppoe-out1 traffic=received trigger=always threshold=0 on-event=SystemScriptNameToRun comment="ThanxToSiB" disabled=no
and in System Scripts this name=SystemScriptNameToRun:
/interface pppoe-client enable pppoe-out1;
This is ReEnable means create new connection.

All this can be more complicated but I hope this method will be good.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Sun Dec 22, 2019 3:41 pm

Thank you I will test it and report
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Mon Dec 23, 2019 7:14 am

Tested. When the threshold 0, the trigger hit run time 298 times, until I disable the script, re-enable manually and the pppoe connected and back to normal. Any advice please?
You do not have the required permissions to view the files attached to this post.
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Mon Dec 23, 2019 7:23 am

Again happened this morning
You do not have the required permissions to view the files attached to this post.
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Mon Dec 23, 2019 5:30 pm

Single/One pppoe with ISP in standard situation newer reach 0 and the traffic monitor is good idea to check if problem exist.
You situation I think is other. When you not have a "big transfer" as normal traffic then you should change a checking way. Before, I answer you a generic information to generic question.
When the threshold 0, the trigger hit run time 298 times
This mean the 0 at Rx is your normal behavior and you not gave many traffic/customers behind your device and then TrafficMonitor generate 298 fail-possitive check's I assume.
re-enable manually and the pppoe connected and back to normal. Any advice please?
Re-enable TrafficMonitor script or ppppoe interface?
I think the pppoe interface - this means the TrafficMonitor generate failse possitive re-enable and ROS cannot do connection?
Maybe the proper way to re-enabled in ROS is disable and separate enable the pppoe interface to do re-connection.
Again happened this morning
Maybe you should change your request.
This Rx=0 show at pppoe even when he works well and you have "not use of internet" - this give you info that way of checking interface are bad and you need other way.

Please write more about you situation.

Maybe you should have something like
* Netwatch who will be checking accessibility to remote host?
* Recursive Routing who will be checking this pppoe as accessibility to remote host?
* Own script who will be checking traffic via this pppoe and do action if no-internet will be detected by this intereface.

Many ways but you must write more about your situation.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Tue Dec 24, 2019 2:19 pm

My situation the PPPoE Status (Connected) and FP Rx 0 OR Rx 0, when i served internet there is no internet until I Disable and Re-enable PPPoE account, What I'm looking for If I got the FP Rx 0 or Rx 0 Then the Script or built-in configuration disconnect the PPPoE account and enable. Appreciate your support in advance my friend.

Yes I think of that, Rx 0, I try to navigate to youtube or any website to have transfer and see if it changed from 0, All my tries failed. The only way disable the PPPoE account and enable it again to have the internet back

I don't know why the TrafficMonitor generate that big failed check, I just Disable the TM to avoid disconnect-Connect fail request and as usual disable the account and enable it manually.
Single/One pppoe with ISP in standard situation newer reach 0 and the traffic monitor is good idea to check if problem exist.
You situation I think is other. When you not have a "big transfer" as normal traffic then you should change a checking way. Before, I answer you a generic information to generic question.
When the threshold 0, the trigger hit run time 298 times
This mean the 0 at Rx is your normal behavior and you not gave many traffic/customers behind your device and then TrafficMonitor generate 298 fail-possitive check's I assume.
re-enable manually and the pppoe connected and back to normal. Any advice please?
Re-enable TrafficMonitor script or ppppoe interface?
I think the pppoe interface - this means the TrafficMonitor generate failse possitive re-enable and ROS cannot do connection?
Maybe the proper way to re-enabled in ROS is disable and separate enable the pppoe interface to do re-connection.
Again happened this morning
Maybe you should change your request.
This Rx=0 show at pppoe even when he works well and you have "not use of internet" - this give you info that way of checking interface are bad and you need other way.

Please write more about you situation.

Maybe you should have something like
* Netwatch who will be checking accessibility to remote host?
* Recursive Routing who will be checking this pppoe as accessibility to remote host?
* Own script who will be checking traffic via this pppoe and do action if no-internet will be detected by this intereface.

Many ways but you must write more about your situation.
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Tue Dec 24, 2019 2:21 pm

Used script below but not working when I lost the internet written by rextended viewtopic.php?f=9&t=83132
/system scheduler
add disabled=no interval=20m name=check-ppp-client on-event=":log info message=\"*** start check any ppp client connection ***\";\r\
    \n:local pppTest value=[/ppp active find];\r\
    \n:local pingNumber value=2;\r\
    \n:local pingMin value=1;\r\
    \n:foreach userTest in=\$pppTest do={\r\
    \n :local pingOk value=[:ping [/ppp active get \$userTest value-name=address] count=\$pingNumber]\r\
    \n :if ( \$pingOk < \$pingMin) do={\r\
    \n  :log warning message=([/ppp active get \$userTest value-name=service] . \" auto disconnected: \". \$pingOk . \" ping ok over \" . \$pingNumber . \" \" . [/ppp active get \$userTest value-name=name] . \" \" . [/ppp active get \$userTest value-\
    name=address])\r\
    \n  /ppp active remove \$userTest\r\
    \n }\r\
    \n};\r\
    \n:log info message=\"*** end check any ppp client connection ***\";\r\
    \n" policy=ftp,read,write,test start-date=jan/01/2002 start-time=00:20:00
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Tue Dec 24, 2019 2:28 pm

I think the pppoe interface - this means the TrafficMonitor generate failse possitive re-enable and ROS cannot do connection?
Re-enable manually the PPPoE, because the TM generate big false re enable.
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Mon Dec 30, 2019 5:42 pm

I have explained my situation, please your kind support
Single/One pppoe with ISP in standard situation newer reach 0 and the traffic monitor is good idea to check if problem exist.
You situation I think is other. When you not have a "big transfer" as normal traffic then you should change a checking way. Before, I answer you a generic information to generic question.
When the threshold 0, the trigger hit run time 298 times
This mean the 0 at Rx is your normal behavior and you not gave many traffic/customers behind your device and then TrafficMonitor generate 298 fail-possitive check's I assume.
re-enable manually and the pppoe connected and back to normal. Any advice please?
Re-enable TrafficMonitor script or ppppoe interface?
I think the pppoe interface - this means the TrafficMonitor generate failse possitive re-enable and ROS cannot do connection?
Maybe the proper way to re-enabled in ROS is disable and separate enable the pppoe interface to do re-connection.
Again happened this morning
Maybe you should change your request.
This Rx=0 show at pppoe even when he works well and you have "not use of internet" - this give you info that way of checking interface are bad and you need other way.

Please write more about you situation.

Maybe you should have something like
* Netwatch who will be checking accessibility to remote host?
* Recursive Routing who will be checking this pppoe as accessibility to remote host?
* Own script who will be checking traffic via this pppoe and do action if no-internet will be detected by this intereface.

Many ways but you must write more about your situation.
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Thu Jan 02, 2020 3:44 am

Hello again,
Give me materials to work, means.

*) What do a proper re-connection?
.
/interface pppoe-client enable pppoe-out1;
# or
/interface pppoe-client disable pppoe-out1; /interface pppoe-client enable pppoe-out1;
.
*) Internet Detection.
You have internet only from pppoe-out1 and when it's have Rx=0 and Tx=0 then what is a status of this connection?
Provide me a cli print without login/pass:
interface pppoe-client print detail
put [interface pppoe-client monitor pppoe-out1 once as-value ]
.
and/or screenshot from Status tab.

We can connect TrafficMonitor with one of those status infrormation to do proper checking and restarting pppoe.
Alternative will be scheduler and netwatch since.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Thu Jan 02, 2020 8:06 am

Hello again,
Give me materials to work, means.

*) What do a proper re-connection?
.
/interface pppoe-client enable pppoe-out1;
# or
/interface pppoe-client disable pppoe-out1; /interface pppoe-client enable pppoe-out1;
.
- Yes disable and enable pppoe1

*) Internet Detection.
You have internet only from pppoe-out1 and when it's have Rx=0 and Tx=0 then what is a status of this connection?
-Yes I have internet only from pppoe1. When Rx=0 The connection status = Connected
Provide me a cli print without login/pass:
interface pppoe-client print detail
put [interface pppoe-client monitor pppoe-out1 once as-value ]
.
and/or screenshot from Status tab.

We can connect TrafficMonitor with one of those status infrormation to do proper checking and restarting pppoe.
Alternative will be scheduler and netwatch since.
You do not have the required permissions to view the files attached to this post.
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Thu Jan 02, 2020 8:11 am

status connection
You do not have the required permissions to view the files attached to this post.
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Thu Jan 02, 2020 11:14 am

And main question. In Status Tab is a different value when internet is online?
I know Rx=0 but I search some additional who is other in offline and online mode.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Sat Jan 04, 2020 11:36 am

And main question. In Status Tab is a different value when internet is online?
-- I guess yes
I know Rx=0 but I search some additional who is other in offline and online mode.
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Sun Jan 05, 2020 11:06 am

Alaqmar12121
SiB
And main question. In Status Tab is a different value when internet is online?
-- I guess yes
But you not share both screenshot to compare.

In this scenario, with all screenshot you provide I think that the best ways will be for you use from Netwatch+Scheduler to monitor internet and do reconnection when off-line will be x minutes.
I Describe this way with one ISP in this post: viewtopic.php?f=9&t=118075&p=746693&hil ... ht#p746693
Your version are like this:

1. Create NetWatch -> only it will do ping testing of target host and run up/down-script.
/tool netwatch add host=1.1.1.1 interval=10s timeout=500ms disabled=no comment=InternetWatchDog
*) 2. Add UP-script -> Remove future fix action because ISP is up.
Do Nothing more.
/system scheduler remove [find where name~"SiBexInternetWatchDog_"];
/log warning "RESET Netwatch scheduled DOWN-script... ISP WORKS";
*) 3a. Add DOWN-script -> ReCreate future jobs before DeadLine came true in 1m and last hope do reboot in 2m.
log error "start Netwatch DOWN-script...";

# ################ MAIN PROGRAM BELOW, NOT HERE ##############
# ################ DEFINE FUNCTION SOLVING Crossing Midnight ###########################

# Fix Crossing 24:00:00=00:00:00
/local SiBFixDateTime do={
/local SiBTimeToChange "23:45:00";
/local SiBTimeToChange $2;
/local SiBTimeDiffToAdd "60m2s"; # diff time < 24h
/local SiBTimeDiffToAdd $3; # diff time < 24h
#/local SiBDate "dec/31/2020"
/local SiBDate $1
/local SiBDateCorrected;

#log warning ("Source: ".$SiBDate." ".$SiBTimeToChange." + ".$SiBTimeDiffToAdd);
#put ("Source: ".$SiBDate." ".$SiBTimeToChange." + ".$SiBTimeDiffToAdd);

# Add diff time <=24h
/local SiBTimeAndDiffTime ($SiBTimeToChange + $SiBTimeDiffToAdd );
/if ([/len $SiBTimeAndDiffTime]=8) do={/set $SiBDateCorrected ($SiBDate." ".$SiBTimeAndDiffTime); };
/if ([/len $SiBTimeAndDiffTime]>8) do={
  /set $SiBTimeAndDiffTime ($SiBTimeAndDiffTime-1d);

  ## Add 24h to date, copy time if exist.
  set $SiBDateCorrected ($SiBDate." ".$SiBTimeAndDiffTime);

  # Days: 01-27
  local SiBDayToChange [/pick $SiBDateCorrected 4 6;];
  if ($SiBDayToChange<=27) do={
      set $SiBDayToChange ($SiBDayToChange+1);
      if ([/len $SiBDayToChange]=1) do={set $SiBDayToChange ("0".$SiBDayToChange)}
      set $SiBDateCorrected ( [/pick $SiBDateCorrected 0 4].$SiBDayToChange.[/pick $SiBDateCorrected 6 20] );
    } else={
      if ($SiBDayToChange!=31) do={

          # Days: 28..30; Main magic do internal scheduler.
          /system scheduler remove [find name=SiBTempScheduler2qw34er5v78bn90m];
          /system scheduler add name=SiBTempScheduler2qw34er5v78bn90m on-event={nothing } start-time=00:00:01 start-date=( [/pick $SiBDateCorrected 0 4].($SiBDayToChange+1).[/pick $SiBDateCorrected 6 11 ] );
          set $SiBDateCorrected ([system scheduler get [find name=SiBTempScheduler2qw34er5v78bn90m] start-date].[/pick $SiBDateCorrected 11 20 ]);
          /system scheduler remove [find name=SiBTempScheduler2qw34er5v78bn90m];
        } else={

          # Day 31 for Jan..Nov
          /local SiBMonths ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
          /local SiBMounthToChange [/pick $SiBDateCorrected 0 3];
          for x from=0 to=10 do={if ([/pick $SiBMonths $x]=$SiBMounthToChange) do={ set $SiBDateCorrected ([pick $SiBMonths ($x+1)]."/01".[/pick $SiBDateCorrected 6 20 ]) }}

          # Day 31 for Dec
          if ($SiBMounthToChange="dec") do={ set $SiBDateCorrected ("jan/01/".([/pick $SiBDateCorrected 7 11]+1).[/pick $SiBDateCorrected 11 20] )}
      };
    };
};

#log warning ("New date time: ".$SiBDateCorrected);
#put ("New date time: ".$SiBDateCorrected);
:return $SiBDateCorrected
};

# ################ MAIN PROGRAM ###########################

# Select a proper Netwatch
local LocNetWatchHost 1.1.1.1;
local LocNetWatchHostComment "InternetWatchDog";

# Still is status down?
local LocStatus [/tool netwatch get [find host=$LocNetWatchHost comment=$LocNetWatchHostComment ] status];
if ($LocStatus != "down") do={/quit;}

# Convert the Netwatch SINCE to separate date and time of current down-time.
local LocSince  [/tool netwatch get [find host=$LocNetWatchHost comment=$LocNetWatchHostComment status=down ] since];
local LocSinceDate ([/pick $LocSince 0 11]);
local LocSinceTime ([/pick $LocSince 12 20]);

# Add action to future via scheduler
/system scheduler remove [find where name~"SiBexInternetWatchDog_v"];

# Try MAIN ACTION 1 - PPPoE ReEnable after 1m

local SiBCrossMid [$SiBFixDateTime $LocSinceDate $LocSinceTime 1m ];
local SiBStartDate [pick $SiBCrossMid 0 11];
local SiBStartTime [pick $SiBCrossMid 12 20];
/system scheduler add name=SiBexInternetWatchDog_v1 on-event={/interface pppoe-client disable pppoe-out1; /interface pppoe-client enable pppoe-out1;} start-date=$SiBStartDate start-time=$SiBStartTime;

# Try MAIN ACTION 2 - Reboot after 2m

local SiBCrossMid [$SiBFixDateTime $LocSinceDate $LocSinceTime 2m ];
local SiBStartDate [pick $SiBCrossMid 0 11];
local SiBStartTime [pick $SiBCrossMid 12 20];
/system scheduler add name=SiBexInternetWatchDog_2 on-event={/system reboot;} start-date=$SiBStartDate start-time=$SiBStartTime;

log error "stop Netwatch DOWN-script, Future action are scheduled";
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Sun Jan 05, 2020 2:04 pm

Sorry for not attached the screenshot. Please check attached.

The script provided should I run it using system ---> scripts?
3a. Add DOWN-script -> ReCreate future jobs before DeadLine came true in 1m and last hope do reboot in 2m.
Code: Select all
log error "start Netwatch DOWN-script...";

# ################ MAIN PROGRAM BELOW, NOT HERE ##############
# ################ DEFINE FUNCTION SOLVING Crossing Midnight ###########################

# Fix Crossing 24:00:00=00:00:00
/local SiBFixDateTime do={
/local SiBTimeToChange "23:45:00";
/local SiBTimeToChange $2;
/local SiBTimeDiffToAdd "60m2s"; # diff time < 24h
/local SiBTimeDiffToAdd $3; # diff time < 24h
#/local SiBDate "dec/31/2020"
You do not have the required permissions to view the files attached to this post.
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Sun Jan 05, 2020 6:26 pm

Can we just ignore the rebooting please? Just want to Disable the pppoe and enable it after 25 second
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Sun Jan 05, 2020 9:10 pm

Can we just ignore the rebooting please? Just want to Disable the pppoe and enable it after 25 second
WinBox > Tools > NetWatch - here a place with 3 tabs, up and down tab are two script who are running when access to remote host change to up (work) or down (failure).
Host 1.1.1.1 and Comment are important because they are use to check a result of proper netwatch.

Please setup Netwatch to 00:00:05 (check 1.1.1.1 every 5s).
In Down-script, the action "after 20 second do reconnection" without reboot, this will be done in 20-25s from internet failure.

Final script:
1. Create NetWatch -> only it will do ping testing of target host and run up/down-script.
.
/tool netwatch add host=1.1.1.1 interval=5s timeout=500ms disabled=no comment=InternetWatchDog
.
*) 2. Add UP-script -> Remove future fix action because ISP is up. Do Nothing more.
.
/system scheduler remove [find where name~"SiBexInternetWatchDog_"];
/log warning "RESET Netwatch scheduled DOWN-script... ISP WORKS";
.
*) 3a. Add DOWN-script -> ReCreate future jobs before DeadLine came true in 20s.
.
log error "start Netwatch DOWN-script...";

# ################ MAIN PROGRAM BELOW, NOT HERE ##############
# ################ DEFINE FUNCTION SOLVING Crossing Midnight ###########################

# Fix Crossing 24:00:00=00:00:00
/local SiBFixDateTime do={
/local SiBTimeToChange "23:45:00";
/local SiBTimeToChange $2;
/local SiBTimeDiffToAdd "60m2s"; # diff time < 24h
/local SiBTimeDiffToAdd $3; # diff time < 24h
#/local SiBDate "dec/31/2020"
/local SiBDate $1
/local SiBDateCorrected;

#log warning ("Source: ".$SiBDate." ".$SiBTimeToChange." + ".$SiBTimeDiffToAdd);
#put ("Source: ".$SiBDate." ".$SiBTimeToChange." + ".$SiBTimeDiffToAdd);

# Add diff time <=24h
/local SiBTimeAndDiffTime ($SiBTimeToChange + $SiBTimeDiffToAdd );
/if ([/len $SiBTimeAndDiffTime]=8) do={/set $SiBDateCorrected ($SiBDate." ".$SiBTimeAndDiffTime); };
/if ([/len $SiBTimeAndDiffTime]>8) do={
  /set $SiBTimeAndDiffTime ($SiBTimeAndDiffTime-1d);

  ## Add 24h to date, copy time if exist.
  set $SiBDateCorrected ($SiBDate." ".$SiBTimeAndDiffTime);

  # Days: 01-27
  local SiBDayToChange [/pick $SiBDateCorrected 4 6;];
  if ($SiBDayToChange<=27) do={
      set $SiBDayToChange ($SiBDayToChange+1);
      if ([/len $SiBDayToChange]=1) do={set $SiBDayToChange ("0".$SiBDayToChange)}
      set $SiBDateCorrected ( [/pick $SiBDateCorrected 0 4].$SiBDayToChange.[/pick $SiBDateCorrected 6 20] );
    } else={
      if ($SiBDayToChange!=31) do={

          # Days: 28..30; Main magic do internal scheduler.
          /system scheduler remove [find name=SiBTempScheduler2qw34er5v78bn90m];
          /system scheduler add name=SiBTempScheduler2qw34er5v78bn90m on-event={nothing } start-time=00:00:01 start-date=( [/pick $SiBDateCorrected 0 4].($SiBDayToChange+1).[/pick $SiBDateCorrected 6 11 ] );
          set $SiBDateCorrected ([system scheduler get [find name=SiBTempScheduler2qw34er5v78bn90m] start-date].[/pick $SiBDateCorrected 11 20 ]);
          /system scheduler remove [find name=SiBTempScheduler2qw34er5v78bn90m];
        } else={

          # Day 31 for Jan..Nov
          /local SiBMonths ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
          /local SiBMounthToChange [/pick $SiBDateCorrected 0 3];
          for x from=0 to=10 do={if ([/pick $SiBMonths $x]=$SiBMounthToChange) do={ set $SiBDateCorrected ([pick $SiBMonths ($x+1)]."/01".[/pick $SiBDateCorrected 6 20 ]) }}

          # Day 31 for Dec
          if ($SiBMounthToChange="dec") do={ set $SiBDateCorrected ("jan/01/".([/pick $SiBDateCorrected 7 11]+1).[/pick $SiBDateCorrected 11 20] )}
      };
    };
};

#log warning ("New date time: ".$SiBDateCorrected);
#put ("New date time: ".$SiBDateCorrected);
:return $SiBDateCorrected
};

# ################ MAIN PROGRAM ###########################

# Select a proper Netwatch who is ENABLE and have:
local LocNetWatchHost 1.1.1.1;
local LocNetWatchHostComment "InternetWatchDog";

# Still is status down?
local LocStatus [/tool netwatch get [find host=$LocNetWatchHost comment=$LocNetWatchHostComment disabled=no] status];
if ($LocStatus != "down") do={/quit;}

# Convert the Netwatch SINCE to separate date and time of current down-time.
local LocSince  [/tool netwatch get [find host=$LocNetWatchHost comment=$LocNetWatchHostComment status=down disabled=no] since];
local LocSinceDate ([/pick $LocSince 0 11]);
local LocSinceTime ([/pick $LocSince 12 20]);

# Add action to future via scheduler
/system scheduler remove [find where name~"SiBexInternetWatchDog_v"];

# Try MAIN ACTION 1 - PPPoE ReEnable after 20s

local SiBCrossMid [$SiBFixDateTime $LocSinceDate $LocSinceTime 20s ];
local SiBStartDate [pick $SiBCrossMid 0 11];
local SiBStartTime [pick $SiBCrossMid 12 20];
/system scheduler add name=SiBexInternetWatchDog_v1 on-event={/interface pppoe-client disable pppoe-out1; /interface pppoe-client enable pppoe-out1;} start-date=$SiBStartDate start-time=$SiBStartTime;

log error "stop Netwatch DOWN-script, Future action are scheduled";
Last edited by SiB on Sun Jan 12, 2020 2:44 pm, edited 1 time in total.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Znevna
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Mon Sep 23, 2019 1:04 pm

Re: tx rx fp rx dropped pppoe account

Tue Jan 07, 2020 11:57 pm

Tried to understand something out of this "issues" but I just don't get it.
What is the initial issue?
The FP Tx = 0 ?
That's normal.
While connected to a router which is mostly idle, from outside.:
/interface monitor-traffic ppp-wan once
name: ppp-wan
rx-packets-per-second: 8
rx-bits-per-second: 5.2kbps
fp-rx-packets-per-second: 8
fp-rx-bits-per-second: 5.2kbps
rx-drops-per-second: 0
rx-errors-per-second: 0
tx-packets-per-second: 11
tx-bits-per-second: 101.3kbps
fp-tx-packets-per-second: 0
fp-tx-bits-per-second: 0bps
tx-drops-per-second: 0
tx-queue-drops-per-second: 0
tx-errors-per-second: 0
And after beeing connected also to a device behind it so the firewall has to forward a few packets:
/interface monitor-traffic ppp-wan once
name: ppp-wan
rx-packets-per-second: 15
rx-bits-per-second: 9.8kbps
fp-rx-packets-per-second: 15
fp-rx-bits-per-second: 9.8kbps
rx-drops-per-second: 0
rx-errors-per-second: 0
tx-packets-per-second: 18
tx-bits-per-second: 166.4kbps
fp-tx-packets-per-second: 5
fp-tx-bits-per-second: 54.2kbps
tx-drops-per-second: 0
tx-queue-drops-per-second: 0
tx-errors-per-second: 0
No issue.
ppp-wan wasn't reconnected since boot. (link downs = 0).
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Wed Jan 08, 2020 2:08 am

Znevna
Tried to understand something out of this "issues" but I just don't get it.
What is the initial issue?
Stop traffic on pppoe-out1 who stuck on be running but not transfer any traffic. Similar situation is at l2tp tunnels, after reboot the one direction is not work and tunnel must be re-enabled and this can be happend with low probably but I see this in few mth again for years.
.
The FP Tx = 0 ?
It's symptom. Autor of post cannot write other difference on working and stuck connection without this Rx=0.
.
That's normal.
On links who have small traffic yes but not if you have got constancy traffic. You mean main optic links in ocean have got sometimes Rx=0 ?
.
While connected to a router which is mostly idle, from outside.:
And after being connected also to a device behind it so the firewall has to forward a few packets:
No issue.
ppp-wan wasn't reconnected since boot. (link downs = 0).
Congratulation. Not every ROS and RB works well, I hope your luck will be permanent.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Znevna
Frequent Visitor
Frequent Visitor
Posts: 65
Joined: Mon Sep 23, 2019 1:04 pm

Re: tx rx fp rx dropped pppoe account

Wed Jan 08, 2020 3:02 am

Weird. I have not seen something like this with PPPoE and we mostly have PPPoE around here, almost all ISPs offer PPPoE connections.
A config export wouldn't hurt, before digging more. As for the FP counter you'd have to be sure your fastracking rules are properly set and you don't have your traffic bypassing it
So, yeah, not very reliable to script against it.
Also, your joke about the optical ocean link, RX no, it might not be 0. But he was talking I think of FP Rx (actually I've seen it's FP Tx) which is not the same thing.
But, he didn't give many details. And in the ones he gave I have not seen RX 0, or TX 0, only FP Tx 0 which as i've tested above, can happen in a normal use case.
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Wed Jan 08, 2020 3:21 am

Znevna
Weird.
YES, I agree.
Question please ask to Topic author about export, version his ROS and RB, I try do at all I could.
Topic autor not provide properly data to create right script then I give him my "better Netwatch solution" because he have only one wan interface and this is good way to solve his problem.

P.S. Maybe problem will be solve by upgrade and he have got mAP as main router but all this are "maybe".
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Sun Jan 12, 2020 7:46 am

@Sib tested the code over three days. Please check attached screen. even with netwatch setting, the internet down and back with manual disable and enable the pppoe client account
You do not have the required permissions to view the files attached to this post.
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Sun Jan 12, 2020 7:48 am

Also i refer back to first suggestion by you @Sib
I add below hope it will disable and enable pppoe account once traffic went to 0
/interface set pppoe-out1 disabled=yes
:delay 25
/interface set pppoe-out1 disabled=no
What you think?
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Sun Jan 12, 2020 2:17 pm

First, If you have both netwatch with the same
  • host to check
  • comment
then this stops works because a down-script read and search a proper status since from only one netwatch with upper condition. Now he not work properly.
Please stay only one netwatch with this comment.
Netwatch haven't created a schedulers after DOWN happend and not do a future fix work.
or change the DOWN-sctipt to this one who check additional the ENABLE netwatch:
log error "start Netwatch DOWN-script...";

# ################ MAIN PROGRAM BELOW, NOT HERE ##############
# ################ DEFINE FUNCTION SOLVING Crossing Midnight ###########################

# Fix Crossing 24:00:00=00:00:00
/local SiBFixDateTime do={
/local SiBTimeToChange "23:45:00";
/local SiBTimeToChange $2;
/local SiBTimeDiffToAdd "60m2s"; # diff time < 24h
/local SiBTimeDiffToAdd $3; # diff time < 24h
#/local SiBDate "dec/31/2020"
/local SiBDate $1
/local SiBDateCorrected;

#log warning ("Source: ".$SiBDate." ".$SiBTimeToChange." + ".$SiBTimeDiffToAdd);
#put ("Source: ".$SiBDate." ".$SiBTimeToChange." + ".$SiBTimeDiffToAdd);

# Add diff time <=24h
/local SiBTimeAndDiffTime ($SiBTimeToChange + $SiBTimeDiffToAdd );
/if ([/len $SiBTimeAndDiffTime]=8) do={/set $SiBDateCorrected ($SiBDate." ".$SiBTimeAndDiffTime); };
/if ([/len $SiBTimeAndDiffTime]>8) do={
  /set $SiBTimeAndDiffTime ($SiBTimeAndDiffTime-1d);

  ## Add 24h to date, copy time if exist.
  set $SiBDateCorrected ($SiBDate." ".$SiBTimeAndDiffTime);

  # Days: 01-27
  local SiBDayToChange [/pick $SiBDateCorrected 4 6;];
  if ($SiBDayToChange<=27) do={
      set $SiBDayToChange ($SiBDayToChange+1);
      if ([/len $SiBDayToChange]=1) do={set $SiBDayToChange ("0".$SiBDayToChange)}
      set $SiBDateCorrected ( [/pick $SiBDateCorrected 0 4].$SiBDayToChange.[/pick $SiBDateCorrected 6 20] );
    } else={
      if ($SiBDayToChange!=31) do={

          # Days: 28..30; Main magic do internal scheduler.
          /system scheduler remove [find name=SiBTempScheduler2qw34er5v78bn90m];
          /system scheduler add name=SiBTempScheduler2qw34er5v78bn90m on-event={nothing } start-time=00:00:01 start-date=( [/pick $SiBDateCorrected 0 4].($SiBDayToChange+1).[/pick $SiBDateCorrected 6 11 ] );
          set $SiBDateCorrected ([system scheduler get [find name=SiBTempScheduler2qw34er5v78bn90m] start-date].[/pick $SiBDateCorrected 11 20 ]);
          /system scheduler remove [find name=SiBTempScheduler2qw34er5v78bn90m];
        } else={

          # Day 31 for Jan..Nov
          /local SiBMonths ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
          /local SiBMounthToChange [/pick $SiBDateCorrected 0 3];
          for x from=0 to=10 do={if ([/pick $SiBMonths $x]=$SiBMounthToChange) do={ set $SiBDateCorrected ([pick $SiBMonths ($x+1)]."/01".[/pick $SiBDateCorrected 6 20 ]) }}

          # Day 31 for Dec
          if ($SiBMounthToChange="dec") do={ set $SiBDateCorrected ("jan/01/".([/pick $SiBDateCorrected 7 11]+1).[/pick $SiBDateCorrected 11 20] )}
      };
    };
};

#log warning ("New date time: ".$SiBDateCorrected);
#put ("New date time: ".$SiBDateCorrected);
:return $SiBDateCorrected
};

# ################ MAIN PROGRAM ###########################

# Select a proper Netwatch who is ENABLE and have:
local LocNetWatchHost 1.1.1.1;
local LocNetWatchHostComment "InternetWatchDog";

# Still is status down?
local LocStatus [/tool netwatch get [find host=$LocNetWatchHost comment=$LocNetWatchHostComment disabled=no] status];
if ($LocStatus != "down") do={/quit;}

# Convert the Netwatch SINCE to separate date and time of current down-time.
local LocSince  [/tool netwatch get [find host=$LocNetWatchHost comment=$LocNetWatchHostComment status=down disabled=no] since];
local LocSinceDate ([/pick $LocSince 0 11]);
local LocSinceTime ([/pick $LocSince 12 20]);

# Add action to future via scheduler
/system scheduler remove [find where name~"SiBexInternetWatchDog_v"];

# Try MAIN ACTION 1 - PPPoE ReEnable after 20s

local SiBCrossMid [$SiBFixDateTime $LocSinceDate $LocSinceTime 20s ];
local SiBStartDate [pick $SiBCrossMid 0 11];
local SiBStartTime [pick $SiBCrossMid 12 20];
/system scheduler add name=SiBexInternetWatchDog_v1 on-event={/interface pppoe-client disable pppoe-out1; /interface pppoe-client enable pppoe-out1;} start-date=$SiBStartDate start-time=$SiBStartTime;

log error "stop Netwatch DOWN-script, Future action are scheduled";
-----
About Rx=0 and action re-enable.
It was a first try but a "Traffic Monitor" detect you a "Rx=0 per 1 second" even when pppoe is working fine. This means this is not good way.
If TM have got option like... 20x happend = 20s with Rx=0 then run script - this will be your solution but TM not have build that counter.

-----
If you fix comment in not active netwatch then you receive one of the best watchdog base on ping in this forum and realy you not must cheat with TM who cannot give you a state UP to reset or dec() external counter.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
Alaqmar12121
just joined
Posts: 19
Joined: Sun Dec 22, 2019 2:19 pm

Re: tx rx fp rx dropped pppoe account

Thu Jan 16, 2020 7:26 am

I have notice when script initiated, there is so many disconnect until authenticated and connected. Is it normal?
You do not have the required permissions to view the files attached to this post.
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Thu Jan 16, 2020 10:53 am

I am not using a PPPoE but with other VPN-s it's common/often.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020
 
sopyan0807
just joined
Posts: 18
Joined: Wed Jan 22, 2020 5:21 pm
Contact:

Re: tx rx fp rx dropped pppoe account

Sun Jan 26, 2020 5:45 am

I think the Traffic Monitor Tool can do it

Image
 
User avatar
SiB
Member
Member
Posts: 367
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: tx rx fp rx dropped pppoe account

Sun Jan 26, 2020 4:51 pm

sopyan0807
I think the Traffic Monitor Tool can do it
TM run's every seconds and it not check past results like NetWatch.
This means your scripts with delay command can be run multiple times. I hope now you know that TM cannot have a any delay in his script. This should be commands who run finish before 1s time.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
I will be at MUMEUROPE Prague on 26-27 march 2020

Who is online

Users browsing this forum: No registered users and 20 guests