User Tools

Site Tools


routeros

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
routeros [2024/05/13 08:09] – created protocolrouteros [2026/06/11 11:01] (current) – [something about wifi reg tables] protocol
Line 1: Line 1:
 +===== Known your IP =====
 +<code>
 +/tool fetch https://wtfismyip.com/text output=user
 +</code>
 +
 +
 +===== Balance =====
 +
 +[[balance]]
 +
 +
 +===== OSPF watchdog when default route vanishes, set your variables! =====
 +
 <code> <code>
 :local HOSTNAME ([/system identity get name]) :local HOSTNAME ([/system identity get name])
Line 4: Line 17:
  /routing ospf instance set 0 disabled=yes  /routing ospf instance set 0 disabled=yes
  /routing ospf instance set 0 disabled=no  /routing ospf instance set 0 disabled=no
- /log error "$HOSTNAME SEM OSPF"+ /log error "$HOSTNAME NO OSPF"
  :delay 4000ms;  :delay 4000ms;
  /tool fetch url="https://api.telegram.org/bot$BOT_ID/sendMessage?chat_id=$CHAT_ID&text=$HOSTNAME NO OSPF, OSPF RESTARTING" keep-result=no  /tool fetch url="https://api.telegram.org/bot$BOT_ID/sendMessage?chat_id=$CHAT_ID&text=$HOSTNAME NO OSPF, OSPF RESTARTING" keep-result=no
 }</code> }</code>
 +
 +===== something about wifi reg tables =====
 +<code>
 +
 +
 +:foreach ITEM in=[/interface wireless registration-table print] do={
 +  :local COMMENT [/interface wireless registration-table get $ITEM comment];
 +  :put "$COMMENT";
 +}
 +
 +:foreach a in=[/interface wireless registration-table] do={
 +  :put [interface wireless registration-table get $a comment]
 +}
 +
 +
 +:foreach i in [/interface wireless registration-table find] do={
 +  :find [/interface wireless registration-table get $i comment]
 +:put "$i"
 +  }
 +}
 +
 +{
 + :local registration [/interface wireless registration-table print where interface=wlan2 count-only];
 +  :if ($registration > 0) do={
 +/tool fetch url="https://api.telegram.org/xx/sendMessage?chat_id=866143904&text=wlan2 up" keep-result=no
 + }
 +}
 +
 +</code>
routeros.1715598588.txt.gz · Last modified: by protocol