Skip to content

Commit fb33dea

Browse files
[Magic] Route prioritization (#23161)
* specific route info * added route priority note * added vars * refined text * partial for longest prefix match * made var optional * added var to mt lp
1 parent d95b89c commit fb33dea

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

src/content/docs/learning-paths/data-center-protection/configure-tunnels-routes/configure-routes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Render } from "~/components"
1515
trafficSteeringPage: "/magic-transit/reference/traffic-steering/",
1616
productName: "Magic Transit",
1717
tunnelEndpoints: "/magic-transit/how-to/configure-tunnels/",
18+
routePrioritization: "/magic-transit/reference/traffic-steering/#route-prioritization",
1819
chooseWeights: "/magic-transit/reference/traffic-steering/#set-priority-and-weights-for-static-routes",
1920
publicAsnMT: "[Public ASNs used for Magic Transit](/magic-transit/how-to/advertise-prefixes/#cloudflare-asn-vs-your-own-asn) are verified during the onboarding process.",
2021
productGatewayOrEgress: "Magic Transit with Egress"

src/content/docs/magic-transit/how-to/configure-routes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { Render } from "~/components"
1818
trafficSteeringPage: "/magic-transit/reference/traffic-steering/",
1919
productName: "Magic Transit",
2020
tunnelEndpoints: "/magic-transit/how-to/configure-tunnels/",
21+
routePrioritization: "/magic-transit/reference/traffic-steering/#route-prioritization",
2122
chooseWeights: "/magic-transit/reference/traffic-steering/#set-priority-and-weights-for-static-routes",
2223
publicAsnMT: "[Public ASNs used for Magic Transit](/magic-transit/how-to/advertise-prefixes/#cloudflare-asn-vs-your-own-asn) are verified during the onboarding process.",
2324
productGatewayOrEgress: "Magic Transit with Egress"

src/content/docs/magic-wan/configuration/manually/how-to/configure-routes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { Render } from "~/components"
1818
trafficSteeringPage: "/magic-wan/reference/traffic-steering/",
1919
productName: "Magic WAN",
2020
tunnelEndpoints: "/magic-wan/configuration/manually/how-to/configure-tunnels/",
21+
routePrioritization: "/magic-wan/reference/traffic-steering/#route-prioritization",
2122
chooseWeights: "/magic-wan/reference/traffic-steering/#set-priority-and-weights-for-static-routes",
2223
publicAsnMT: " ",
2324
productGatewayOrEgress: "Magic WAN with Gateway"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
{}
3+
---
4+
5+
Cloudflare routing applies longest-prefix match. A more specific static route (like `/30`) will always be preferred over a less specific one (like `/29`), regardless of tunnel priority — unless the more specific route is removed.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ params:
1010
- tunnelHCsPage
1111
---
1212

13-
import { AnchorHeading, Aside, Markdown } from "~/components";
13+
import { AnchorHeading, Aside, Markdown, Render } from "~/components";
1414

1515
## Magic routing table
1616

@@ -60,6 +60,7 @@ Magic {props.productName} is steered along tunnel routes based on priorities of
6060

6161
- Lower values have greater priority.
6262
- When the priority values for prefix entries match, Cloudflare uses [equal-cost multi-path (ECMP)](#equal-cost-multi-path-routing) packet forwarding to route traffic. An optional weight value can be applied to static routes to [modify ECMP tunnel distribution](#set-priority-and-weights-for-static-routes).
63+
- <Render file="longest-prefix-match" product="networking-services/reference" />
6364
- When BGP and static routes have the same prefix and priority, Cloudflare enforces priority by preferring static routes over BGP routes. This ensures that manually configured static routes take precedence unless explicitly deprioritized.
6465

6566
### Set priority and weights for static routes

src/content/partials/networking-services/routing/configure-routes.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ params:
55
- trafficSteeringPage
66
- productName
77
- tunnelEndpoints
8+
- routePrioritization
89
- chooseWeights
910
- productGatewayOrEgress
1011
---
@@ -31,6 +32,9 @@ Refer to <a href={props.trafficSteeringPage}>Traffic Steering</a> for more infor
3132
5. In **Prefix**, enter your range of IP addresses. For example, `10.10.10.100/24`.
3233
6. In **Tunnel/Next hop** select which tunnel you want your route to go through. Choose from the tunnels you have created in <a href={props.tunnelEndpoints}>Configure tunnel endpoints</a>.
3334
7. Choose the **Priority** for your route. Lower numbers have higher priorities.
35+
:::note
36+
<Render file="longest-prefix-match" product="networking-services/reference" /> Have this in mind when configuring priorities for your routes. Refer to <a href={props.routePrioritization}>Route prioritization</a> for more information.
37+
:::
3438
8. (Optional) Choose a **Weight** for your route. Refer to <a href={props.chooseWeights}>Set priority and weights for static routes</a> for examples.
3539
9. (Optional) If you need to scope your route to a specific region, you can do it in **Region code**.
3640
10. (Optional) We highly recommend testing your route before adding it by selecting **Test routes**.

0 commit comments

Comments
 (0)