Configure static routes
Magic WAN uses a static configuration to route your traffic through Generic Routing Encapsulation (GRE) tunnels from Cloudflare’s edge to your locations.
You must assign a route priority to each Anycast GRE or IPsec tunnel–subnet pair in your GRE configuration, as follows:
- Lower values have greater priority.
- When the priority values for prefix entries match — as illustrated by the 103.21.244.0/24 subnet in the example routing configuration (in bold) — Cloudflare uses equal-cost multi-path (ECMP) packet forwarding to route traffic.
For more on how Cloudflare uses ECMP packet forwarding, see Traffic steering .
For an example edge routing configuration, refer to the example below.
Edge routing configuration example
Anycast GRE or IPsec tunnel | Subnet | Priority |
---|---|---|
GRE_1_IAD | 103.21.244.0/24 | 100 |
GRE_2_IAD | 103.21.244.0/24 | 100 |
GRE_3_ATL | 103.21.244.0/24 | 100 |
GRE_4_ATL | 103.21.244.0/24 | 100 |
GRE_1_IAD | 103.21.245.0/24 | 200 |
GRE_2_IAD | 103.21.245.0/24 | 200 |
GRE_3_ATL | 103.21.245.0/24 | 100 |
GRE_4_ATL | 103.21.245.0/24 | 100 |
Create a static route
- Log in to your Cloudflare dashboard and select Magic WAN.
- Next to Manage Magic WAN configuration, click Configure.
- Click the Static Routes tab and click Create to add a new route.
- Enter the information for your route.
- (Optional) We highly recommend testing your route before adding it by clicking Test routes.
- If your test was successful, click Add routes when you are done.
Edit a static route
- After navigating to the Edit static routes page, click Edit next to the route you want to modify.
- (Optional) We highly recommend testing your route before adding it by clicking Test routes.
- Enter the updated route information and click Edit routes when you are done.
Delete static route
- From Static Routes, locate the static route you want to modify and click Delete.
- Confirm the action by selecting the checkbox and clicking Delete.