Cisco Meraki MX (static routing)·续1

flowchart LR
accTitle: Meraki tunnel monitoring with Cloudflare WAN
accDescr: Traffic flow from the tunnel monitoring source IP through the Meraki MX, IPsec tunnels, Cloudflare WAN, and Cloudflare Gateway to an HTTP target on the public internet.
 subgraph CPE["Cisco Meraki (CPE) Active/Standby Model"]
    direction TB
        FW["Cisco Meraki MX
        WAN: 203.0.113.100/24
        ---
        LAN: 192.168.125.1/24
        ---
        LAN Subnet: 192.168.125.0/24"]
        L7_Health_Check["L7 Health Check
        ---
        Internal Src IP: 192.0.2.3/32"]
  end
 subgraph T1["Active - IPsec Tunnel 1"]
    direction LR
        T1_CPE["CPE VTI 1
        Internal to MX"]
        T1_CF["Cloudflare VTI 1
        169.254.250.0/31"]
  end
 subgraph T2["Standby - IPsec Tunnel 2"]
    direction LR
        T2_CPE["CPE VTI 2
        Internal to MX"]
        T2_CF["Cloudflare VTI 2
        169.254.250.2/31"]
  end
 subgraph CF["Cloudflare WAN"]
    direction TB
        EP1["Anycast Endpoint 1
        162.159.135.1"]
        EP2["Anycast Endpoint 2
        172.64.135.1"]
  end
 subgraph CF_GW["Cloudflare Gateway"]
    direction TB
        GW["Policy
        Src IP 192.0.2.3
        Allow"]
  end
    L7HCT["HTTP Target"]

T1_CPE === T1_CF
    T2_CPE === T2_CF
    FW <==> T1_CPE & T2_CPE
    T1_CF <==> EP1
    T2_CF <==> EP2

L7_Health_Check -.-> FW
    FW -.-> T1_CPE
    FW -.-> T2_CPE
    T1_CPE -.-> T1_CF
    T2_CPE -.-> T2_CF
    T1_CF -.-> EP1
    T2_CF -.-> EP2
    EP1 -.-> GW
    EP2 -.-> GW
    GW -.-> L7HCT
    FW@{ shape: stadium}
    T1_CPE@{ shape: stadium}
    T1_CF@{ shape: stadium}
    T2_CPE@{ shape: stadium}
    T2_CF@{ shape: stadium}
    EP1@{ shape: stadium}
    EP2@{ shape: stadium}
    GW@{ shape: stadium}

Meraki configuration

Meraki management model and Cloudflare WAN integration

The Meraki configuration management is built on a two-tier hierarchy. Objects and their associated settings are defined as either:

  • Organization-wide: Global objects defined once for the entire tenant.
  • Network-specific: Settings applied to an individual site or device.

The Non-Meraki VPN configuration is an Organization-tier object. It is pushed to specific MX appliances when they are associated with a corresponding Network Tag. This inheritance model is a critical factor: the tag controls which physical hardware attempts to establish tunnels to Cloudflare.

Meraki Organization

Orbital Path Ventures is a fictitious company referenced throughout the configuration to represent an Organization defined in the Meraki Dashboard.

The company manages a single Meraki MX appliance at their Austin, TX branch office, which is associated with a Network named Orbital Path Ventures - Austin TX.

A Network Tag labeled Orbital_Path_AUS_Office is associated with the Orbital Path Ventures - Austin TX Network.

Organization Network Tag
Orbit Path Ventures Orbit Path Ventures - Austin TX Orbital_Path_AUS_Office

Network Tag

Go to Network > Networks, then select the Organization.

  • Orbit Path Ventures (substitute your Organization name).
  • Network: Orbit Path Ventures - Austin TX (substitute your Network name).
  • Tag: Orbital_Path_AUS_Office (substitute the Tag associated with the Network name).

Traffic steering

When integrating with Cloudflare WAN, the Meraki Network Tag determines which appliances inherit the Cloudflare tunnel configuration.

The Non-Meraki VPN configuration is a global object: any MX appliance with the associated Network Tag attempts to establish tunnels to Cloudflare using the same IPsec VPN peers.

To ensure predictable traffic flows and prevent routing conflicts, Cloudflare recommends the following best practices:

  • Strict tunnel correlation: Maintain a 1-to-1 mapping between the redundant IPsec tunnel pairs defined in Cloudflare and the specific MX appliance initiating those tunnels.
  • Site-specific Network Tags: Use granular, site-specific tags (for example, Orbital_Path_AUS_Office) rather than broad, generic tags to ensure only the intended MX inherits the tunnel configuration.
  • Unique IPsec VPN peer objects: Create distinct Non-Meraki VPN peer objects at the Organization level for different physical geographic locations. Use the Availability option to establish the 1-to-1 mapping.

Return traffic from Cloudflare WAN is steered based on the Cloudflare virtual network routing table (refer to Traffic steering for details). Routes are specified based on the MX LAN prefix and corresponding IPsec tunnels.

Note

Before applying a Network Tag to a Non-Meraki VPN object, verify that the subnets defined in the Availability section of the Meraki IPsec configuration match the routing logic defined in the Cloudflare Unified Routing dataplane.

Note

If multiple MX appliances with different private subnets inherit the same Non-Meraki VPN object, they all attempt to establish tunnels using identical identifiers. This causes flapping or unpredictable routing behavior, because the Cloudflare dataplane forwards traffic destined for the prefixes associated with the private subnets indiscriminately through tunnels with the same identifier. The dataplane cannot determine if there is a mismatch of the private networks behind each MX.

Source-based default routing

Source-Based Default Routing ↗︎ enables an administrator to create a source-based default route and specify a next hop as a security appliance over Auto VPN or on a device on the LAN.

Source-Based Default Routing cannot be used in conjunction with Non-Meraki VPN endpoints, including Cloudflare WAN.

Define private subnets in the IPsec VPN peer configuration to control how MX appliances steer traffic through the respective tunnels.

Routing with private subnets

Any IP prefixes defined as private subnets in the IPsec VPN peer configuration control what traffic is routed across the primary and secondary VPN tunnels. They are visible in the routing table corresponding to a given MX appliance.

This document considers three route topologies:

  1. East/west only:
  2. Private traffic via Cloudflare WAN.
  3. Internet via local Internet.
  4. Internet only via Cloudflare Gateway:
  5. Only route Internet traffic through Cloudflare WAN.
  6. All traffic via Cloudflare WAN and Gateway:
  7. East/west and Internet traffic routed via Cloudflare WAN.

All three topologies are covered in the IPsec VPN peers section.

MX site-to-site VPN configuration

Go to Security & SD-WAN > Site-to-site VPN.

Type

Select Hub (Mesh).

VPN settings

Local networks

Turn on VPN mode for the local network behind the MX devices.

From:

Name VPN Mode Subnet Uplink
Default Disabled 192.168.125.0/24 —

To:

Name VPN Mode Subnet Uplink
Default Enabled 192.168.125.0/24 —

IPsec VPN peers

Go to Security & SD-WAN > Site-to-site VPN > Organization Wide Settings.

Configure health checks

Configure a Layer 7 health check HTTP probe that the MX platform uses to determine reachability of resources through the IPsec VPN tunnels:

  1. Select Configure Health Checks.
  2. Provide the following values:
Name Endpoint
Google http://www.google.com
3. Select OK.

Note

The Layer 7 health check probes only support connections via HTTP (port 80/tcp). The Cloudflare Zero Trust configuration must permit the Meraki tunnel health check probe IP (192.0.2.3/32) to access the designated URL without requiring SSL/TLS encryption or any authentication or authorization policies.

Add primary and secondary IPsec VPN peers

IPsec VPN peer configurations are provided for the following topologies:

  • East/west traffic only
  • Internet only via Cloudflare Gateway
  • All traffic via Cloudflare WAN and Gateway
Topology: east/west traffic only

Routing east/west traffic via Cloudflare WAN requires:

  • Cloudflare routes specified for the LAN subnet behind the MX appliance ( 192.168.125.0/24) via CF_WAN_TUN_01 and CF_WAN_TUN_02.
  • Remote subnets ( 172.16.10.0/24 and 172.16.11.0/24) specified as private subnets on the Meraki primary and secondary IPsec VPN peers.
  • The IPv4 interface address prefixes specified on both CF_WAN_TUN_01 and CF_WAN_TUN_02 ( 169.254.250.0/31 and 169.254.250.2/31) specified as private subnets on the Meraki primary and secondary IPsec VPN peers.

Note

Automatic Return Routing is not required for east/west traffic only.

This ensures that:

  • Cloudflare routes traffic destined for the LAN subnet behind the MX appliance via CF_WAN_TUN_01 and CF_WAN_TUN_02.
  • The MX appliance explicitly routes traffic destined for the remote subnets ( 172.16.10.0/24 and 172.16.11.0/24) via the primary and secondary IPsec VPN peers respectively.
  • The MX appliance explicitly routes ICMP Reply packets associated with Cloudflare tunnel health checks to the IPv4 interface addresses ( 169.254.250.0/31 and 169.254.250.2/31) specified on CF_WAN_TUN_01 and CF_WAN_TUN_02 via the primary and secondary IPsec VPN peers respectively.
  • Internet traffic from the LAN subnet behind the MX appliance is routed via the WAN uplink.
  • The MX appliance establishes IPsec tunnels to Cloudflare endpoints ( 162.159.135.1 and 172.64.135.1) via the WAN uplink.

Configure the following:

Cloudflare IPsec tunnels — automatic return routing:

Tunnel Automatic Return Routing
CF_WAN_TUN_01 Disabled
CF_WAN_TUN_02 Disabled

Cloudflare routes:

Prefix Description Next hop Priority Region code Type
192.168.125.0/24 CF_WAN_TUN_01 CF_WAN_TUN_01 100 All regions Static
192.168.125.0/24 CF_WAN_TUN_02 CF_WAN_TUN_02 100 All regions Static

Meraki private subnets:

Private Subnet Scope
172.16.10.0/24 Remote site
172.16.11.0/24 Remote site
169.254.250.0/31 CF_WAN_TUN_01 — tunnel health check ICMP Reply packets
169.254.250.2/31 CF_WAN_TUN_02 — tunnel health check ICMP Reply packets
Primary IPsec VPN peer: east/west traffic only
  1. Select + Add a peer.
  2. Provide the following values:
Attribute Value
Name cf-wan-tun-01
IKE Version IKEv2
Public IP or Hostname 162.159.135.1
Local ID bf6c493d03<REDACTED>.ipsec.cloudflare.com
Remote ID —
Shared Secret Cloudflare-WAN-T1-PSK-1234!
Routing Static
Private Subnets 169.254.250.0/31, 169.254.250.2/31, 172.16.10.0/24, 172.16.11.0/24
Availability Orbital_Path_AUS_Office
Tunnel Monitoring Google Health Check
Failover directly to internet —
IPsec Policy —
Preset Custom
Phase 1 — Encryption AES 256
Phase 1 — Authentication SHA256
Phase 1 — Pseudo-Random Function SHA256
Phase 1 — Diffie-Hellman group 14
Phase 1 — Lifetime (sec) 28800
Phase 2 — Encryption AES256
Phase 2 — Authentication SHA256
Phase 2 — PFS Group 14
Phase 2 — Lifetime (sec) 28800
3. Select Save.

Note

Any private subnets specified in cf-wan-tun-01 are automatically inherited by cf-wan-tun-02.

Note

Availability: specifying the Orbital_Path_AUS_Office Network Tag pushes the IPsec VPN peer configuration to any MX appliances associated with the Orbit Path Ventures - Austin TX Network.

Secondary IPsec VPN peer: east/west traffic only
  1. Select the --- icon in the settings column.
  2. Select + Add secondary peer.
  3. Do not select Inherit primary peer configurations. This ensures the Public IP or Hostname, Local ID, Remote ID, and Shared secret are configured with the settings required to successfully negotiate an IPsec tunnel CF_WAN_TUN_02.
  4. Provide the following values:
Attribute Value
Name cf-wan-tun-02
IKE Version IKEv2 (Inherited)
Public IP or Hostname 172.64.135.1
Local ID 0287844e9d<REDACTED>.ipsec.cloudflare.com
Remote ID 172.64.135.1
Shared Secret Cloudflare-WAN-T2-PSK-1234!
Routing Static (Inherited)
Private Subnets 169.254.250.0/31, 169.254.250.2/31, 172.16.10.0/24, 172.16.11.0/24 (Inherited)
Availability Orbital_Path_AUS_Office (Inherited)
Tunnel Monitoring Google Health Check
Failover directly to internet —
IPsec Policy —
Preset Custom
Phase 1 — Encryption AES 256
Phase 1 — Authentication SHA256
Phase 1 — Pseudo-Random Function SHA256
Phase 1 — Diffie-Hellman group 14
Phase 1 — Lifetime (sec) 28800
Phase 2 — Encryption AES256
Phase 2 — Authentication SHA256
Phase 2 — PFS Group 14
Phase 2 — Lifetime (sec) 28800
5. Select Save.