User Tools

Site Tools


routeros

Known your IP

/tool fetch https://wtfismyip.com/text output=user

Balance

OSPF watchdog when default route vanishes, set your variables!

:local HOSTNAME ([/system identity get name])
:if ([/ip route print count-only where dst-address=0.0.0.0/0 ospf]=0) do={
 /routing ospf instance set 0 disabled=yes
 /routing ospf instance set 0 disabled=no
 /log error "$HOSTNAME NO OSPF"
 :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
}

something about wifi reg tables


: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
 }
}

MPLS basic

/mpls ldp set enabled=yes lsr-id=172.26.0.101 transport-address=172.26.0.101
/mpls ldp interface add interface=ether2
/mpls ldp interface add interface=ether5
/interface vpls add remote-peer=172.26.0.103 vpls-id=3012:3012 pw-type=tagged-ethernet
/interface bridge port
add bridge=vlan3012-bridge interface=vpls1
add bridge=vlan3012-bridge interface=vpls2
add bridge=vlan3012-bridge interface=ether1
routeros.txt · Last modified: by protocol