-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitchAfterPing
More file actions
18 lines (14 loc) · 1.05 KB
/
Copy pathswitchAfterPing
File metadata and controls
18 lines (14 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
:if ([/ping 192.168.50.254 count=3]>1) do={
:put set254;
/ip dhcp-server network set [find address="192.168.50.0/24"] gateway=192.168.50.254 dns-server=192.168.50.254
}
else={
:put judge;
:if ([/ping 192.168.50.253 count=3]>0) do={
:put set253;
/ip dhcp-server network set [find address="192.168.50.0/24"] gateway=192.168.50.253 dns-server=192.168.50.253
}
else={:put set1;/ip dhcp-server network set [find address="192.168.50.0/24"] gateway=192.168.50.1 dns-server=192.168.50.1
}
}
:if ([/ping 192.168.50.254 count=3]>1) do={:put set254;/ip dhcp-server network set [find address="192.168.50.0/24"] gateway=192.168.50.254 dns-server=192.168.50.254} else={:put judge;:if ([/ping 192.168.50.253 count=3]>0) do={:put set253;/ip dhcp-server network set [find address="192.168.50.0/24"] gateway=192.168.50.253 dns-server=192.168.50.253} else={:put set1;/ip dhcp-server network set [find address="192.168.50.0/24"] gateway=192.168.50.1 dns-server=192.168.50.1}}