Community discussions

MikroTik App
 
rajendrar2
just joined
Topic Author
Posts: 6
Joined: Wed Jun 28, 2023 6:11 am

script for simple failover

Sat Jan 18, 2025 8:22 am

is it possible to write a script in routeros that ether 1 will ping to 192.168.1.1 if ping is successful ether 2 will be disabled if ping fails then only ether 2 will be enabled if ether 1 succeeds to ping 192.168.1.1 then ether 2 disables again ether 3 will be lan port and all 3 will be in bridge mode.
 
User avatar
panisk0
Member Candidate
Member Candidate
Posts: 116
Joined: Sun Mar 06, 2016 10:36 pm
Location: Cracow
Contact:

Re: script for simple failover

Sat Jan 18, 2025 10:53 am

use
/tool/netwatch set up-script=.... down-script=.....
&
/ping interface=ether......
 
FRANKMUNOZAPURE
just joined
Posts: 18
Joined: Thu May 23, 2024 11:57 am

Re: script for simple failover

Sat Jan 18, 2025 12:23 pm

It is impossible for the "WAN and LAN" ports to be on a single bridge sir.
 
Liiina
newbie
Posts: 25
Joined: Mon Apr 15, 2024 10:21 pm

Re: script for simple failover

Sat Jan 18, 2025 10:28 pm

It is impossible for the "WAN and LAN" ports to be on a single bridge sir.
why not, if, for example, the provider provides pppoe, then you can easily add the entire port to the bridge.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 3122
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: script for simple failover

Sat Jan 18, 2025 10:52 pm

You can easily add it. Yes, however your LAN starts to leak data to the physical WAN port (not the ppoe) so your LAN traffic would be visible to the ISP infrastructure unless they block it.