> ## Documentation Index
> Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WAN Failover

> Configure and monitor prioritized WAN links for an Altostrat SDX managed site.

WAN failover lets you model each internet connection at a site as a managed WAN tunnel. SDX keeps those links ordered by priority, monitors health, and records WAN events so you can operate failover as part of the wider platform.

Use WAN failover when a branch depends on multiple upstream links, such as fibre plus LTE, copper plus 5G, or a primary ISP plus a secondary circuit.

## Prerequisites

Before you configure WAN failover, make sure you have:

* A site that is adopted into SDX and currently online.
* At least two usable WAN connections on the MikroTik router.
* The physical interface name for each connection, such as `ether1` or `lte1`.
* The gateway IPv4 address for each connection.
* Permission to manage WAN failover for the site.

## Core Model

<CardGroup cols={3}>
  <Card title="WAN tunnel" icon="git-branch">
    A WAN tunnel represents one internet path on one MikroTik interface. It stores the interface, gateway, link type, provider details, and enabled state.
  </Card>

  <Card title="Priority order" icon="list-ordered">
    The first tunnel in the list is the preferred path. If it becomes unhealthy, SDX can move traffic to the next available link according to the configured order.
  </Card>

  <Card title="Telemetry" icon="activity">
    WAN views show operational health, including latency, packet loss, jitter, receive rates, transmit rates, and related WAN faults.
  </Card>
</CardGroup>

```mermaid theme={null}
flowchart LR
  Primary["Priority 1<br />Primary fibre"] --> Router["MikroTik site"]
  Backup["Priority 2<br />LTE backup"] --> Router
  Router --> SDX["Altostrat SDX"]
  SDX --> Metrics["WAN health metrics"]
  SDX --> Faults["Fault log and workflow events"]
```

## Configure WAN Failover

<Steps>
  <Step title="Open the site">
    In the portal, go to **Sites**, select the site, then open **WAN Failover**.
  </Step>

  <Step title="Enable the service">
    If WAN failover is not active, enable it for the site. SDX prepares the site for managed WAN configuration.
  </Step>

  <Step title="Add or edit each WAN link">
    For each link, define:

    * **Name:** a label operators can recognize quickly.
    * **Interface:** the MikroTik interface used by that connection.
    * **Gateway:** the upstream gateway IPv4 address.
    * **Type:** one of the supported link categories, such as fibre, copper, LTE, 5G, ethernet, coaxial, VSAT, microwave, or other.
    * **Provider and SLA details:** optional context that helps your team interpret faults and reports.

    SDX supports up to four WAN tunnels for a site.
  </Step>

  <Step title="Set priority">
    Order the WAN tunnels from most preferred to least preferred, then save the priority order. Use the most stable and cost-effective path first, and place metered or high-latency links lower unless your design requires otherwise.
  </Step>

  <Step title="Confirm health">
    Watch the WAN failover page after the change is applied. Check that each tunnel reports the expected status and that latency, packet loss, jitter, and traffic data look believable for the circuit.
  </Step>
</Steps>

## Operate Failover

Use the WAN page for configuration and the wider monitoring surfaces for operations:

* Use the per-site **WAN Failover** page when you need to change interfaces, gateways, link types, or priority order.
* Use the global **WAN Live** view when you need to compare link health across many sites.
* Use the **Fault Log** to investigate when a link went offline, came back online, or experienced packet loss.
* Use workflows when WAN events should create tickets, notify a team, or change priority automatically.

<Tip>
  If you use a cellular or satellite link as a backup, tag it clearly and put cost or usage expectations in the provider/SLA fields. Future operators should know why that link is lower priority before an outage starts.
</Tip>

## Testing

Test WAN failover during a planned window, not during the first real outage.

1. Confirm all tunnels are online.
2. Notify anyone who monitors the site.
3. Move a backup link to the top of the priority order, or disconnect the primary link if your change window allows a physical test.
4. Confirm the active path changes as expected.
5. Restore the intended priority order.
6. Review the fault log and WAN metrics to make sure the event was captured.

<Warning>
  Changing WAN priority or physically disconnecting a link can interrupt traffic while routing converges. Test during a maintenance window for business-critical sites.
</Warning>

## Related Pages

<CardGroup cols={2}>
  <Card title="Fault logging" icon="triangle-alert" href="../monitoring/fault-logging" arrow="true">
    Learn how SDX records site and WAN events.
  </Card>

  <Card title="Workflow node reference" icon="workflow" href="../automation/workflows/node-reference" arrow="true">
    See the WAN triggers and actions available in workflows.
  </Card>
</CardGroup>
