Configurando Mikrotik com vários gateways sem script

Configurando Mikrotik com vários gateways sem script

Fonte:

http://wiki.mikrotik.com/wiki/Advanced_Routing_Failover_without_Scripting

http://wiki.mikrotik.com/wiki/Manual:IP/Route#Nexthop_lookup

"RouterOS facilities allow us to use only /ip routes to do such checking - no scripting and netwatch at all!"

- - - - - - - - --

- Vários Gateway -

- - - - - - - - --

/ip route

add dst-address=0.0.0.0/0 gateway=10.1.1.1,10.2.2.2,10.3.3.3 comment="Gateway aponta para teste de uol/globo/terra"

add dst-address=10.1.1.1 gateway=200.147.67.142 check-gateway=ping distance=1 scope=10 comment="TESTE LINK1"

add dst-address=10.2.2.2 gateway=200.154.56.80 check-gateway=ping distance=2 scope=10 comment="TESTE LINK2"

add dst-address=10.3.3.3 gateway=186.192.82.163 check-gateway=ping distance=3 scope=10 comment="TESTE LINK3"

add dst-address=200.147.67.142 gateway=ip_gw1 scope=10 comment="LINK1 - www.uol.com.br"

add dst-address=200.154.56.80 gateway=ip_gw2 scope=10 comment="LINK2 - www.terra.com.br"

add dst-address=186.192.82.163 gateway=ip_gw3 scope=10 comment="LINK3 - www.globo.com"

Lógica

0.0.0.0/0

|||-------> 10.1.1.1 --ping--> 200.147.67.142 --> ip_gw1

||--------> 10.2.2.2 --ping--> 200.154.56.80 --> ip_gw2

|---------> 10.3.3.3 --ping--> 186.192.82.163 --> ip_gw3

- - - - - - - - - - - - - -

- Um Gateway com failover -

- - - - - - - - - - - - - -

/ip route

add dst-address=0.0.0.0/0 gateway=10.1.1.1 scope=10 comment="Gateway aponta para teste de uol/globo/terra"

add dst-address=10.1.1.1 gateway=200.147.67.142 check-gateway=ping distance=1 scope=10 comment="TESTE LINK1"

add dst-address=10.1.1.1 gateway=200.154.56.80 check-gateway=ping distance=2 scope=10 comment="TESTE LINK2"

add dst-address=10.1.1.1 gateway=186.192.82.163 check-gateway=ping distance=3 scope=10 comment="TESTE LINK3"

add dst-address=200.147.67.142 gateway=ip_gw1 scope=10 comment="LINK1 - www.uol.com.br"

add dst-address=200.154.56.80 gateway=ip_gw2 scope=10 comment="LINK2 - www.terra.com.br"

add dst-address=186.192.82.163 gateway=ip_gw3 scope=10 comment="LINK3 - www.globo.com"

0.0.0.0/0

|||-------> 10.1.1.1 (distance 1) --ping--> 200.147.67.142 --> ip_gw1

||--------> 10.1.1.1 (distance 2) --ping--> 200.154.56.80 --> ip_gw2

|---------> 10.1.1.1 (distance 3) --ping--> 186.192.82.163 --> ip_gw3