Make your router run Scripts!

  Рет қаралды 11,245

MikroTik

MikroTik

Күн бұрын

Mikrotik routers have their own scripting language and it is incredible what you can do with it.
help.mikrotik.com/docs/displa...
0:00 Intro
1:04 add script
1:21 script editor
1:47 variables
2:01 local-global and :put
3:12 environment
3:55 operators and :set
4:35 conditional statements
5:05 functions and loops

Пікірлер: 26
@qsergii
@qsergii 2 ай бұрын
Debugger is missing! But perfect feature! Thank you!
@zactodd3144
@zactodd3144 2 ай бұрын
Have been scripting for years and finally have some of my questions answered, plus some I didn't know I had. Keep up the great work
@dhiaahmed5420
@dhiaahmed5420 2 ай бұрын
very informative tutorial, I wish you could do more videos about scripting 😊
@Gooloso98
@Gooloso98 2 ай бұрын
Ty 🙏 for adding newer methods to fetch. Now I can use cloudflare's API
@user-zt1fd9ld7d
@user-zt1fd9ld7d 2 ай бұрын
Perfect explaining!
@Fu86
@Fu86 2 ай бұрын
Nice easter egg in the endcard :)
@RenzoRosales-sn4vb
@RenzoRosales-sn4vb 2 ай бұрын
Nice haircut! Great video
@achillecisco
@achillecisco 2 ай бұрын
Nice !!!
@M4dM1ke
@M4dM1ke 2 ай бұрын
Nice!
@olpchk1115
@olpchk1115 26 күн бұрын
Need more diagnostics and more available events for handling
@XxSpYxX
@XxSpYxX 2 ай бұрын
I wish scripting and scripts got into the UI
@JB-df3ek
@JB-df3ek 2 ай бұрын
What is replacement for RB911-5HacD?
@mikrotik
@mikrotik Ай бұрын
L11UG-5HaxD
@Accountnummer
@Accountnummer 2 ай бұрын
So, is there also a script to make that when there is one wan-port failing, and a second WAN is ging to work as a failover, to delete all the running connections?
@raminrajabioskouei781
@raminrajabioskouei781 2 ай бұрын
yep
@Accountnummer
@Accountnummer 2 ай бұрын
Thanks guys. But, the issue i got is that when the internet fails over to the 2nd WAN, the connections are not failing over with port 5060 (SIP). I'm looking for a solution for that, and thought this could be an oppurtunity.
@jferdom
@jferdom 2 ай бұрын
@@Accountnummer Of course you can do that.. the command to kill the connections would be like this: /ip firewall connection remove [ find where dst-address~"^123.123.123.123:" || dst-address~"^231.231.231.231:" ] All of this supposing your PBX´s addresses are 123.123.123.123 and 231.231.231.231. Now you need to do some checks (with ping, for example) to only execute that at the right time. Wrap it all in a script, schedule it, and enjoy! You can search by dst-port instead of dst-address if you wish... Controlling RouterOS via CLI/Scripts is awesome. P.S. Mikrotik, please... Implement a DEBUGGER. PLEASE!!
@zenmaster24
@zenmaster24 Ай бұрын
can scripts be triggered on events? eg a port gets unplugged/plugged in
@mikrotik
@mikrotik Ай бұрын
Most likely you can use Netwatch as a trigger, but if you want a realtime layer2 trigger, you could create a script that runs a 'while true' loop and parse the interface data on each step.
@olpchk1115
@olpchk1115 26 күн бұрын
@@mikrotik what a waste!
@FinlayDaG33k
@FinlayDaG33k 2 ай бұрын
TIL: There is a built-in script editor.
@alexhawes-hm3xt
@alexhawes-hm3xt Ай бұрын
instead of showing an example script of multiplying numbers can you show a real world script of internet failover between 2 connections that do not have static addresses please, this is a huge omission from ROS7, i've tried several scripts posted on the internet but nothing works consistently
@stevebot
@stevebot Ай бұрын
There are too many different failure and failover scenarios for there to be a single solution. At the most basic in your case, you let your WAN interfaces get their IP information and set their default routes, then you make a routing rule to push traffic out the interface you want to be primary and use gateway checking to let the router determine if they are viable and deactivate them as necessary. Good luck, failover is not an easy nut to crack and different failure modes with different carriers behave differently.
@alexhawes-hm3xt
@alexhawes-hm3xt Ай бұрын
@@stevebot Thanks, looks like I have some reading to do. I do love a good technical challenge but MT would be complete if this was a built-in feature.
Make your router run scripts, pt.2
5:51
MikroTik
Рет қаралды 5 М.
What are VLANs and how to configure them (pt.1)
13:01
MikroTik
Рет қаралды 46 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 172 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 20 МЛН
MikroTik reacts to your comments: summer edition
13:08
MikroTik
Рет қаралды 363
MikroTik CHR on Proxmox - How-To Guide
14:14
Admiral Platform (RemoteWinBox)
Рет қаралды 4,2 М.
There’s NO WAY this works - Debunking bogus network splitters.
9:01
Linus Tech Tips
Рет қаралды 3,8 МЛН
Migrating From OPNsense To Mikrotik
19:11
Mircea Anton
Рет қаралды 18 М.
Learn JavaScript Scoping In 10 Minutes
11:39
Web Dev Simplified
Рет қаралды 59 М.
You’ve Never Seen WiFi Like This
20:43
Data Slayer
Рет қаралды 653 М.
MikroTips: How to firewall
21:56
MikroTik
Рет қаралды 142 М.
How Hackers Move Through Networks (with Ligolo)
20:01
John Hammond
Рет қаралды 260 М.
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 421 М.
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 6 МЛН
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 3 МЛН
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 439 М.
ВАЖНО! Не проверяйте на своем iPhone после установки на экран!
0:19
ГЛАЗУРЬ СТЕКЛО для iPhone и аксессуары OTU
Рет қаралды 6 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 410 М.