-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathfailover_without_scripts.src.rsc
36 lines (32 loc) · 1.35 KB
/
failover_without_scripts.src.rsc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#####################################################################
# #
# Failover Withouth Scripts #
# #
#####################################################################
# Global Vars #
# Gateway ISP 1 and 2
:global Gateway1 "192.168.0.1"
:global Gateway2 "11.11.11.1"
# Host 1 (Any IP, Used OpenDNS)
:global Host1 "208.67.222.222"
# Host 1 (Any IP, Used OpenDNS)
:global Host2 "208.67.220.220"
## Show Message
:global Msg "Ok"
#####################################################################
/ip route
add dst-address=0.0.0.0/0 gateway=$Gateway1 distance=1 \
check-gateway=ping
add dst-address=0.0.0.0/0 gateway=$Gateway2 distance=2
/ip route
add dst-address=$Host1 gateway=$Gateway1 scope=10
add dst-address=$Host2 gateway=$Gateway2 scope=10
/ip route
add distance=1 gateway=$Host1 routing-mark=ISP1 check-gateway=ping
add distance=2 gateway=$Host2 routing-mark=ISP1 check-gateway=ping
/ip route
add distance=1 gateway=$Host1 routing-mark=ISP2 check-gateway=ping
add distance=2 gateway=$Host2 routing-mark=ISP2 check-gateway=ping
/ip route
add dst-address=$Host1 type=blackhole distance=20
add dst-address=$Host2 type=blackhole distance=20