Leveraging OSPF as a Backup in a WISP Triangle Network: Highsite 1, 2, and 3

An effective strategy for enhancing network resilience is utilizing the OSPF protocol as a backup routing mechanism, particularly in a network topology that forms a triangle between three high sites. This approach not only provides redundancy but also allows for the configuration of preferred paths for traffic flow. This blog post will guide you through setting up OSPF as a backup in a triangle network connecting Highsite 1, Highsite 2, and Highsite 3, using MikroTik routers and illustrating how to set preferred paths.

Understanding the Triangle Topology

In our scenario, we have three high sites interconnected in a triangle formation. This setup inherently provides multiple paths between any two sites, making it an ideal candidate for OSPF's capabilities. We will use the following IP addressing scheme based on /29 subnets:

  • Link between Highsite 1 and Highsite 2: 10.0.0.0/29
  • Link between Highsite 2 and Highsite 3: 10.0.1.0/29
  • Link between Highsite 3 and Highsite 1: 10.0.2.0/29

Each link subnet provides four usable IP addresses, fitting perfectly for the MikroTik router and the PTP radio at each end of the link.

Configuring OSPF with Preferred Paths

The goal is to use OSPF to dynamically route traffic within the network, with the ability to specify preferred paths under normal conditions and ensure redundancy if a primary link fails.

Step 1: Initial OSPF Setup on MikroTik Routers

First, configure OSPF on all MikroTik routers at the three high sites. Define OSPF instances with router IDs corresponding to each site's primary router IP:

/routing ospf instance
set [ find default=yes ] router-id=10.0.0.1 redistribute-connected=yes redistribute-static=yes

Do this for each router, ensuring the router-id is unique and relevant to each site.

Step 2: Defining OSPF Networks

Next, define the OSPF networks for each link in the triangle:

/routing ospf network
add network=10.0.0.0/29 area=backbone
add network=10.0.1.0/29 area=backbone

This configuration should be adjusted accordingly on each router to include all networks relevant to that site.

Step 3: Setting Preferred Paths

OSPF calculates the shortest path based on link cost, with a lower cost indicating a preferred route. By default, all links might have the same cost, leading OSPF to choose paths based on the lowest router ID or other criteria. To set a preferred path, you can manually adjust the OSPF cost of interfaces:

For instance, to prefer the path between Highsite 1 and Highsite 2 under normal conditions, you might set a lower cost on the interfaces of both sites leading to each other:

/routing ospf interface
set [ find interface=ether1 ] cost=10

Conversely, increase the cost on alternative routes to ensure they are only used if the preferred path fails:

/routing ospf interface
set [ find interface=ether2 ] cost=20

Repeat this process on relevant interfaces across the network, ensuring that the OSPF costs reflect your preferred routing topology.

Considerations for OSPF Backup Routing

  • OSPF Timers: Adjust OSPF timers to fine-tune how quickly the network adapts to changes. Faster convergence improves responsiveness but may increase overhead.
  • Link Stability: Regularly monitor link stability between high sites. OSPF's dynamic nature benefits from stable links but can be sensitive to flapping routes in environments with high RF interference.
  • Static Routes as Fallback: While OSPF provides dynamic rerouting capabilities, having static routes configured as a fallback can ensure critical paths remain available, even if OSPF encounters issues.

Conclusion

Utilizing OSPF as a backup in a triangle network topology among highsites offers an effective strategy for enhancing network resilience and flexibility. By carefully configuring OSPF with preferred paths, you can ensure optimal traffic flow under normal conditions while maintaining the ability to dynamically reroute traffic in response to network changes or failures. This approach balances the benefits of dynamic routing with the necessity of reliable network performance, ensuring that high sites remain interconnected and operational regardless of individual link statuses.

Was this page helpful?