View difference between Paste ID: nyr91eGT and WPcN7PE9
SHOW: | | - or go back to the newest paste.
1
# ip modem1 = 172.16.1.1 ---> ether1
2
# ip modem2 = 172.16.2.1 ---> ether2
3
# ip modem3 = 172.16.3.1 ---> ether3
4
5
/ip route
6
add check-gateway=ping comment=exit-1 distance=1 gateway=172.16.1.1 routing-mark=exit-1
7
add check-gateway=ping comment=exit-2 distance=1 gateway=172.16.2.1 routing-mark=exit-2
8
add check-gateway=ping comment=exit-3 distance=1 gateway=172.16.3.1 routing-mark=exit-3
9
10
add check-gateway=ping comment=jalur-1 distance=1 gateway=172.16.1.1 routing-mark=jalur-1
11
add check-gateway=ping comment=jalur-1 distance=2 gateway=172.16.2.1 routing-mark=jalur-1
12
add check-gateway=ping comment=jalur-1 distance=3 gateway=172.16.3.1 routing-mark=jalur-1
13
14
add check-gateway=ping comment=jalur-2 distance=1 gateway=172.16.2.1 routing-mark=jalur-2
15
add check-gateway=ping comment=jalur-2 distance=2 gateway=172.16.3.1 routing-mark=jalur-2
16
add check-gateway=ping comment=jalur-2 distance=3 gateway=172.16.1.1 routing-mark=jalur-2
17
18
add check-gateway=ping comment=jalur-3 distance=1 gateway=172.16.3.1 routing-mark=jalur-3
19
add check-gateway=ping comment=jalur-3 distance=2 gateway=172.16.2.1 routing-mark=jalur-3
20
add check-gateway=ping comment=jalur-3 distance=3 gateway=172.16.1.1 routing-mark=jalur-3
21
22
add check-gateway=ping comment=jalur-1 distance=1 gateway=172.16.1.1
23
add check-gateway=ping comment=jalur-2 distance=2 gateway=172.16.2.1
24
add check-gateway=ping comment=jalur-3 distance=3 gateway=172.16.3.1
25
26
# system schedule dengan nama "fail-over" interval=00:00:10 , on event :
27
#jalur-1 cek
28
:if ([/ping address=8.8.8.8 interface=ether1 routing=exit-1 count=5] = 0) do={/ip route set [find comment=jalur-1 gateway=172.16.1.1 distance=1] distance=4} else={/ip route set [find comment=jalur-1 gateway=172.16.1.1 distance=4] distance=1};
29
30
#jalur-2 cek
31
:if ([/ping address=8.8.8.8 interface=ether2 routing=exit-2 count=5] = 0) do={/ip route set [find comment=jalur-2 gateway=172.16.2.1 distance=1] distance=4} else={/ip route set [find comment=jalur-2 gateway=172.16.2.1 distance=4] distance=1};
32
33
#jalur-3 cek
34
:if ([/ping address=8.8.8.8 interface=ether3 routing=exit-3 count=5] = 0) do={/ip route set [find comment=jalur-3 gateway=172.16.3.1 distance=1] distance=4} else={/ip route set [find comment=jalur-3 gateway=172.16.3.1 distance=4] distance=1};