0% fanden dieses Dokument nützlich (0 Abstimmungen)
71 Ansichten2 Seiten

Basic Failover With Netwatch

Das Dokument beschreibt ein Beispiel für ein einfaches Failover zwischen zwei WAN-Verbindungen in MikroTik RouterOS. Es wird erklärt, wie mithilfe von Netwatch und DHCP-Clients die Verbindung zwischen den WAN-Interfaces überwacht und bei Ausfall automatisch umgeschaltet wird.

Hochgeladen von

priadiwae
Copyright
© All Rights Reserved
Wir nehmen die Rechte an Inhalten ernst. Wenn Sie vermuten, dass dies Ihr Inhalt ist, beanspruchen Sie ihn hier.
Verfügbare Formate
Als TXT, PDF, TXT herunterladen oder online auf Scribd lesen
0% fanden dieses Dokument nützlich (0 Abstimmungen)
71 Ansichten2 Seiten

Basic Failover With Netwatch

Das Dokument beschreibt ein Beispiel für ein einfaches Failover zwischen zwei WAN-Verbindungen in MikroTik RouterOS. Es wird erklärt, wie mithilfe von Netwatch und DHCP-Clients die Verbindung zwischen den WAN-Interfaces überwacht und bei Ausfall automatisch umgeschaltet wird.

Hochgeladen von

priadiwae
Copyright
© All Rights Reserved
Wir nehmen die Rechte an Inhalten ernst. Wenn Sie vermuten, dass dies Ihr Inhalt ist, beanspruchen Sie ihn hier.
Verfügbare Formate
Als TXT, PDF, TXT herunterladen oder online auf Scribd lesen

###################################################################################

######################
# Rick Frey's Basic Failover with Netwatch
#
###################################################################################
######################
# Author: Rick Frey
#
# email: support@[Link]
#
# Username in MikroTik Forum is rickfrey
#
###################################################################################
######################
# License
#
# This script has been created for use by the general public and may be used
freely. This script may #
# not be sold!
#
###################################################################################
#####################
# Features
# #
# -Watches 2 WAN connections that are using DHCP to hand the addresses to the
router. #
# -Assumes WAN1 is the primary connection and that WAN2 should only be used when
necessary. #
# -Periodically tests the connectivity through WAN1 to see if the connection has
come back up. #
# -Tested on ROS 6.24
#
###################################################################################
######################

###################################################################################
#########################################
#### In this example WAN1 is connected to Ether1 and WAN2 is conected to Ether2.
#
###################################################################################
#########################################

/ip dhcp-client
add comment=WAN1 disabled=no interface=ether1
add comment=WAN2 default-route-distance=2 disabled=no interface=ether2

/tool netwatch
add comment=WAN1 down-script="/ip dhcp-client set [ find comment=WAN1 ] default-\
route-distance=10\r\
\n\r\
\n/tool netwatch set [find comment=\"WAN2\"] disabled=no\r\
\n/tool netwatch set [find comment=\"WAN1\"] disabled=yes" host=[Link] \
interval=10s timeout=3s
add comment=WAN2 disabled=yes down-script="/ip dhcp-client set [ find comment=WA\
N1 ] default-route-distance=1\r\
\n\r\
\n/tool netwatch set [find comment=\"WAN2\"] disabled=yes\r\
\n/tool netwatch set [find comment=\"WAN1\"] disabled=no" host=[Link] \
interval=10s timeout=3s
###################################################################################
#########################################
#### Adjust the interval for scheduler as needed. Remember that every test
potentially creates an Internet disruption. #
###################################################################################
#########################################

/system scheduler
add interval=1h name="Check WAN1 for Connectivity" on-event=\
"/ip dhcp-client set [ find comment=WAN1 ] default-route-distance=1\r\
\n" policy=ftp,reboot,read,write,policy,password,sniff,sensitive \
start-date=feb/03/1970 start-time=01:18:07

RWF - Basic Failover with Netwatch

Das könnte Ihnen auch gefallen