How to Configure Multi-WAN Failover on MikroTik RouterOS
Table of Contents
Introduction
This tutorial will guide you through the process of configuring multi-WAN failover on MikroTik RouterOS. Multi-WAN failover is essential for maintaining a reliable internet connection by automatically switching to a backup WAN connection if the primary one fails. We'll cover the basics of WAN redundancy and provide detailed steps to set this up effectively on your MikroTik device.
Step 1: Set Up Default Route
- Access your MikroTik router using Winbox or WebFig.
- Navigate to IP > Routes in the menu.
- Click on the Add button to create a new route.
- Set the Destination to
0.0.0.0/0
to define a default route. - Define the Gateway as the IP address of your primary WAN connection.
- Set the Distance to
1
for the primary route. This determines the priority of the route. - Click OK to save your settings.
Step 2: Configure Backup WAN Connection
- In the same IP > Routes section, click on the Add button again.
- Enter the Destination as
0.0.0.0/0
. - Set the Gateway to the IP address of your backup WAN connection.
- Assign a Distance of
2
. This ensures that this route will only be used if the primary WAN connection fails. - Click OK to save the backup route.
Step 3: Testing Failover Functionality
- To test the configuration, disconnect your primary WAN connection.
- Check the routing table in IP > Routes to ensure that the backup route is now active.
- Reconnect the primary WAN connection and verify that it takes precedence again.
Step 4: Optional Recursive Routes for Advanced Users
- If you want to implement more advanced routing with recursive routes:
- Go to IP > Routes and add a new route as before.
- Set the Destination to your desired network.
- Specify the Gateway as the IP address of your internet provider.
- Use the Distance setting to prioritize this route appropriately.
- This allows you to have more control over how traffic is routed based on conditions.
Conclusion
By following these steps, you have successfully configured multi-WAN failover on your MikroTik router. This setup will help ensure a reliable internet connection by automatically switching to a backup connection when needed. For further improvement, consider exploring advanced routing options or additional MikroTik features that can enhance your network's performance.