View
51
Download
2
Category
Preview:
DESCRIPTION
Failover PCC ISP Ryonosuke Mikrotik
Citation preview
22/3/2015 Tutorial failover con 2 ISP | Comunidad ryohnosuke.com
http://www.ryohnosuke.com/foros/index.php?threads/17484/ 1/6
Tutorial failover con 2 ISP
METODO DE FAILOVER PARA DOS CONEXIONES DE ISP PARA LINEAS DEBACKUP
Método implementado por Domingo Brotóns en RB Mikrotik, con la idea detener una línea principal suministradora de nuestro internet (ISP1) y unalínea de backup por si cae la principal (ISP2).
Nuestro tutorial empieza por abrir el Winbox y conectarse con el Mikrotik, yen la pestaña system le hacemos un reset configuration para devolverlo sinningún tipo de configuración y dejarlo a cero.
Una vez dejado a cero entramos a configurar las interfaces y renombrarlas,en nuestro caso sería de esta manera:
Ether1=WAN1, Ether2=WAN2, y Ether3=LAN
/ip interfaces
[IMG]
Ahora con las interfaces renombradas nos vamos a asignarles una ip
En nuestro caso quedaría asi: WAN1=192.168.1.20/24,WAN2=192.168.0.5/24, LAN1=10.0.0.1/24
/ip addresses
Portal Foros MikroTik Balanceo de Carga (Load Balance)
[Oficial] Anuncio de Ganadores del 4to Concurso deAniversario de ryohnosuke.com
Me Gusta recibidos: 3
Domingo BrotonsMember
Comunidad ryohnosuke.com
Portal Foros
Buscar Mensajes recientes
Manuales Tienda Área de Clientes
Accede o regístrate
22/3/2015 Tutorial failover con 2 ISP | Comunidad ryohnosuke.com
http://www.ryohnosuke.com/foros/index.php?threads/17484/ 2/6
[IMG]
Con las IP asignadas vamos a configurar el servidor de dns en nuestro casopondremos las de google 8.8.8.8/8.8.4.4
/ip dns
[IMG]
con todo esto nos dirigimos a crearle una regla de nat para la salida deinternet de nuestros proveedores
/ip firewall nat
add chain=srcnat outinterface="AQUÍ PONER LA INTERFACE DEL ISP1"
action=masquerade comment="Internet ISP1"
add chain=srcnat outinterface="AQUÍ PONER LA INTERFACE DEL ISP2"
action=masquerade comment="Internet ISP2"
[IMG] [IMG]
Tambien configuraremos el EMail por si queremos que se nos envie los Emails de alerta cuando alguno de los enlaces ha dejado de funcionar (estoes opcional, pero recomendado)
/tolos email
setserver=xx.xx.xx.xx username="TU USUARIO DE MAIL"password="TUCONTRASEÑA"
from=<MIKROTIK>
[IMG]
Ahora creamos los scripts que utilizaremos luego en el netwatch
22/3/2015 Tutorial failover con 2 ISP | Comunidad ryohnosuke.com
http://www.ryohnosuke.com/foros/index.php?threads/17484/ 3/6
/system scripts
((Script nº 1))
/ip firewall nat set [find comment="Internet ISP1"] disabled=no
/ip firewall nat set [find comment="Internet ISP2"] disabled=yes
: log info "::::::::::::::: TRAFICO SALIENDO POR ISP1 :::::::::::::::"
[IMG]
Agregamos un segundo script ((Script nº 2))
/ip firewall nat set [find comment="Internet ISP1"] disabled=yes
/ip firewall nat set [find comment="Internet ISP2"] disabled=no
: log info "::::::::::::::: TRAFICO SALIENDO POR ISP2 :::::::::::::::"
[IMG]
Agregamos un tercer Script ((Script nº3))
/ip firewall nat set [find comment="Internet ISP1"] disabled=yes
/ip firewall nat set [find comment="Internet ISP2"] disabled=no
: log info ":::::::::::::::TRAFICO SALIENDO POR ISP2, ISP1 FUERA DESERVICIO::::::::::::::"
/tool netwatch set [find comment="SALIDAISP1"] disabled=yes
/tool netwatch set [find comment="SALIDAISP2"] disabled=no
/tool email send to="wivinet@wivinet.com"subject="Proveedor1FueradeServicio"
22/3/2015 Tutorial failover con 2 ISP | Comunidad ryohnosuke.com
http://www.ryohnosuke.com/foros/index.php?threads/17484/ 4/6
body="Proveedor1 Dejo de funcionar"
: log info ":::::::::::::::ALERTA ENVIADA:::::::::::::::"
[IMG]
Por ultimo agregamos un cuarto script ((Script nº4))
/ip firewall nat set [find comment="Internet ISP1"] disabled=no
/ip firewall nat set [find comment="Internet ISP2"] disabled=yes
: log info ":::::::::::::::TRAFICO SALIENDO POR ISP1, ISP2 FUERA DESERVICIO::::::::::::::"
/tool netwatch set [find comment="SALIDAISP2"] disabled=yes
/tool netwatch set [find comment="SALIDAISP1"] disabled=no
/tool email send to="wivinet@wivinet.com"subject="Proveedor2FueradeServicio"
body="Proveedor2 Dejo de funcionar"
: log info ":::::::::::::::ALERTA ENVIADA:::::::::::::::"
[IMG] [IMG]
Creamos las reglas de netwatch (esto es lo que comprueba los enlaces, laprimera dirección es la de google y la segunda un open dns(8.8.8.8/208.67.222.222))
/tool netwatch
add comment="SALIDAISP1"host=8.8.8.8 downscript="ISP1DOWN"upscript="ISP1UP"
add comment="SALIDAISP2"host=208.67.222.222 downscript="ISP2DOWN"upscript="ISP2UP"
[IMG] [IMG] [IMG]
22/3/2015 Tutorial failover con 2 ISP | Comunidad ryohnosuke.com
http://www.ryohnosuke.com/foros/index.php?threads/17484/ 5/6
Domingo Brotons, 7 Mar 2015 #1
Domingo Brotons, 7 Mar 2015 #2
[IMG] [IMG] [IMG]
quedaría asi
[IMG]
Por ultimo solo nos queda poner diferentes distancias en el ip route
Pondremos distancia 1 a la WAN1 y distancia 2 a la WAN2
[IMG]
[IMG] [IMG]
Espero no haberme dejado nada y que sirva de ayuda a todos.
no me han salido las imagenes, como las subo??
subelas aqui http://fotowisp.net/ para poder postearlas
Tutorial : [Tutorial][Nuevo] Subir imágenes y publicarlas en el foro
Me Gusta recibidos: 3
Domingo BrotonsMember
22/3/2015 Tutorial failover con 2 ISP | Comunidad ryohnosuke.com
http://www.ryohnosuke.com/foros/index.php?threads/17484/ 6/6
Español (ES) Contactarnos Ayuda
Términos y reglasForum software by XenForo™ ©20102015 XenForo Ltd.
NIVRAD, 9 Mar 2015 #3
(Debes acceder o registrarte para responder aquí.)
Compartir esta página
Me Gusta recibidos: 20
NIVRADMember
Portal Foros MikroTik Balanceo de Carga (Load Balance)
Recommended