Skip to content

Commit 7ca2b19

Browse files
[Magic] Traffic scoping priorities (#21879)
* added details over geo scoping priority * refined text
1 parent 0abd491 commit 7ca2b19

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/content/partials/networking-services/reference/traffic-steering.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ The priority value for static routes is directly configured as part of the route
7474
| `10.10.10.100/24` | `TUNNEL_3_ATL` | `100` |
7575
| `10.10.10.100/24` | `TUNNEL_4_ATL` | `100` |
7676

77+
In the example above, tunnels with priority of `100` will be preferred to tunnels with priority of `200` since lower numbers have greater priority.
78+
7779
Optionally, you can assign weights to distribute traffic more effectively among multiple tunnels. The weight values determine the proportion of traffic directed to each tunnel, with higher weights resulting in a greater share of traffic. The maximum weight value is `256`.
7880

7981
In the example below, `TUNNEL_2_IAD` is likely to receive twice as much traffic as `TUNNEL_1_IAD`.
@@ -85,6 +87,8 @@ In the example below, `TUNNEL_2_IAD` is likely to receive twice as much traffic
8587
| `10.10.10.100/24` | `TUNNEL_3_ATL` | `100` | `192` |
8688
| `10.10.10.100/24` | `TUNNEL_4_ATL` | `100` | `255` |
8789

90+
Aside from priority, scoping static routes to specific geographic regions will also impact how traffic is steered. Refer to [Scoping routes to specific regions](#scoping-routes-to-specific-regions) for more details.
91+
8892
### Set priority for BGP routes
8993

9094
When BGP advertises a route, it is automatically added to the Magic routing table with a default priority of `100` which applies to [all regions](#scoping-routes-to-specific-regions). However, if a static route exists with the same prefix and priority, the static route will always take precedence over the BGP route. You will have to set a different priority for static routes, to be more or less than `100`, depending on which you want to prioritize. Lower values have greater priority.
@@ -136,20 +140,24 @@ Cloudflare adjusts route priority when using AS prepending with communities. For
136140

137141
If you have multiple connectivity paths to a network segment and you would like to apply different route prioritization based on where the traffic arrives at the Cloudflare network, you can scope routes to specific Cloudflare data center regions. This is useful, for example, if you run your own anycast network and want your end-user traffic to arrive at your network location closest to the user. When a route is scoped to a Cloudflare data center region it will only show up in the Magic routing table in that region, along with all global routes that do not have any region scope. Route prioritization and ECMP logic apply across both region-scoped and global routes.
138142

139-
Adding region scoping to routes is only available to statically configured routes at this time.
143+
:::note
144+
Scoping routes to specific regions is not supported with BGP peering, and is only available to statically configured routes at this time.
145+
:::
140146

141147
When using region-scoped routes, you should ensure that all prefixes have routes covering all regions. Otherwise, traffic may arrive at a Cloudflare region which is not covered by any route, in which case the traffic will be dropped.
142148

143-
Scoping routes to specific regions is not supported with BGP peering at this time.
144-
145-
### Scoping configuration data example
149+
The following table exemplifies how to use geographic scoping for routes:
146150

147151
| Prefix | NextHop | Priority | Region code |
148152
| ----- | ----- | ----- | ----- |
149153
| `10.10.10.100/24` | `TUNNEL_1_IAD` | `100` | `AFR` |
150154
| `10.10.10.100/24` | `TUNNEL_2_IAD` | `100` | `EEUR` |
151155
| `10.10.10.100/24` | `TUNNEL_3_ATL` | `100` | `ENAM` |
152156
| `10.10.10.100/24` | `TUNNEL_4_ATL` | `100` | `ME` |
157+
| `10.10.10.100/24` | `TUNNEL_5_ATL` | `100` | `WNAM` |
158+
| `10.10.10.100/24` | `TUNNEL_4_ATL` | `100` | `ENAM` |
159+
160+
When there are multiple routes to the same prefix with equal priority, and those routes are assigned to different geographic regions (like WNAM and ENAM), traffic entering the network in a specific region — for example, WNAM — will egress through the route associated with that same region.
153161

154162
### Region codes and associated regions
155163

0 commit comments

Comments
 (0)