M
M
Mark M2018-06-21 18:34:02
Mikrotik
Mark M, 2018-06-21 18:34:02

Mikrotik - how to disable ethernet on demand?

Tell me please. In mikrotik, behind the Ethernet interface 20 is Cisco with the address 10.8.0.5 (it is the main gateway!). All other workstations are connected to other free Ethernet interfaces N.... Is it possible to ping 8.8.8.8 and if no response is received, then disable the Ethernet 20 interface for all network members, but continue to ping through it 8.8.8.8 and if answered, re-enable access for everyone. Perhaps you just need to remove it from the Bridge and then place it there again ... Help me sort out this issue. Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pr0l, 2018-06-21
@pr0l

system -netwatch add host ping. And before that, the route to the host through the desired interface. then we write the script when the host is UP or Down

R
rionnagel, 2018-06-22
@rionnagel

/ip route add dst-address=8.8.8.8 gateway=10.8.0.5 scope=10
/ip route add dst-address=8.8.4.4 gateway=10.8.0.4 scope=10
/ip route add dst-address=0.0.0.0/ 0 gateway=8.8.8.8 distance=1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=8.8.4.4 distance=2 check-gateway=ping
Here is such a tricky trick with routing without scripts. Unless, of course, Mikrotik is used as a router. Disabling the interface itself is a bad idea. there will be no way to know that the Internet appeared there, without much more hemorrhoids.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question