MTCRE Lab 1.8 - Gateway Reachability Check and Recursive Routes

MTCRE Lab 1.8 - Gateway Reachability Check and Recursive Routes

Introduction

A common challenge in network design is ensuring that routes are only active when their next-hop gateways are truly reachable and functional. Simply having layer 2 connectivity to a gateway isn't always sufficient—what if the gateway router itself has lost connectivity to the destination? What if the next hop is several hops away?

MikroTik RouterOS provides several mechanisms to verify gateway reachability before activating a route: basic scope-based reachability, recursive route resolution, and active gateway checking via ICMP ping. These features ensure your routing table reflects the actual state of network connectivity, automatically failing over to backup routes when primary paths become unavailable.

In this lab, we explore RouterOS gateway reachability mechanisms including the check-gateway parameter with ping, arp, and bfd options, recursive static routes, and scope-based route activation. You'll configure routes that automatically activate and deactivate based on gateway health, understand how RouterOS performs recursive next-hop resolution, and learn when to use each reachability checking method.

By the end of this lab, you'll be able to implement intelligent failover based on actual end-to-end connectivity, not just adjacent link status.

Terminology Definitions

Gateway Reachability: The condition where a gateway IP address is not only layer-2 reachable but also functionally capable of forwarding traffic toward the destination.

Check Gateway: A RouterOS route parameter that enables active monitoring of gateway status using ICMP ping, ARP, or BFD (Bidirectional Forwarding Detection).

Recursive Route: A static route where the gateway is not directly connected (not in a local subnet), requiring RouterOS to recursively look up how to reach the gateway itself.

Recursive Lookup: The process of resolving a gateway by finding another route to reach that gateway, which may itself require further lookups until a directly connected route is found.

Scope: A numeric value (0-255) that defines how "local" or "connected" a route is. Connected interfaces have scope=10. Static routes have scope=30. Lower scope values are more preferred for recursive lookups.

Target Scope: The maximum scope value a route can have to be considered as a valid next-hop for resolving a gateway. Routes with scope greater than the target-scope are ignored during recursive resolution.

Ping Target: An IP address that RouterOS will periodically ping to verify that a gateway is not only reachable but also functional. If pings fail, the route is deactivated.

Distance: The administrative distance or preference value. Routes with lower distance are preferred. Default for static routes is 1.

Route Suppression: The automatic deactivation of a route when its gateway is determined to be unreachable through scope checking, recursive resolution failure, or check-gateway monitoring.