From ec6bdc49d1b2f8c4724f136a2cd9b18694c5abf9 Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 11:56:28 +0100 Subject: [PATCH 1/7] specific route info --- .../partials/networking-services/reference/traffic-steering.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/partials/networking-services/reference/traffic-steering.mdx b/src/content/partials/networking-services/reference/traffic-steering.mdx index 429ce5d4cdf5492..b9d822f8e1ef406 100644 --- a/src/content/partials/networking-services/reference/traffic-steering.mdx +++ b/src/content/partials/networking-services/reference/traffic-steering.mdx @@ -60,6 +60,7 @@ Magic {props.productName} is steered along tunnel routes based on priorities of - Lower values have greater priority. - 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). +- 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. - 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. ### Set priority and weights for static routes From 74884ddbccb43238a54742be0de12dc1787d3831 Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 12:02:20 +0100 Subject: [PATCH 2/7] added route priority note --- .../partials/networking-services/routing/configure-routes.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/partials/networking-services/routing/configure-routes.mdx b/src/content/partials/networking-services/routing/configure-routes.mdx index da106eeac0135fa..3251100e7cc5646 100644 --- a/src/content/partials/networking-services/routing/configure-routes.mdx +++ b/src/content/partials/networking-services/routing/configure-routes.mdx @@ -5,6 +5,7 @@ params: - trafficSteeringPage - productName - tunnelEndpoints + - routePrioritization - chooseWeights - productGatewayOrEgress --- @@ -30,7 +31,7 @@ Refer to Traffic Steering for more infor 4. Enter a descriptive name for your route in **Description**. 5. In **Prefix**, enter your range of IP addresses. For example, `10.10.10.100/24`. 6. In **Tunnel/Next hop** select which tunnel you want your route to go through. Choose from the tunnels you have created in Configure tunnel endpoints. -7. Choose the **Priority** for your route. Lower numbers have higher priorities. +7. Choose the **Priority** for your route. Lower numbers have higher priorities. You should also be aware that Cloudflare routing applies longest-prefix match. This means more specific routes will always be preferred over less specific ones. Refer to Route prioritization for more information 8. (Optional) Choose a **Weight** for your route. Refer to Set priority and weights for static routes for examples. 9. (Optional) If you need to scope your route to a specific region, you can do it in **Region code**. 10. (Optional) We highly recommend testing your route before adding it by selecting **Test routes**. From c4460dabb356b7b7b54a45f2454e17572d49fb3b Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 12:02:24 +0100 Subject: [PATCH 3/7] added vars --- src/content/docs/magic-transit/how-to/configure-routes.mdx | 1 + .../magic-wan/configuration/manually/how-to/configure-routes.mdx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/content/docs/magic-transit/how-to/configure-routes.mdx b/src/content/docs/magic-transit/how-to/configure-routes.mdx index 10de2f4f0a73552..d8d7474eddc3092 100644 --- a/src/content/docs/magic-transit/how-to/configure-routes.mdx +++ b/src/content/docs/magic-transit/how-to/configure-routes.mdx @@ -18,6 +18,7 @@ import { Render } from "~/components" trafficSteeringPage: "/magic-transit/reference/traffic-steering/", productName: "Magic Transit", tunnelEndpoints: "/magic-transit/how-to/configure-tunnels/", + routePrioritization: "/magic-transit/reference/traffic-steering/#route-prioritization", chooseWeights: "/magic-transit/reference/traffic-steering/#set-priority-and-weights-for-static-routes", 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.", productGatewayOrEgress: "Magic Transit with Egress" diff --git a/src/content/docs/magic-wan/configuration/manually/how-to/configure-routes.mdx b/src/content/docs/magic-wan/configuration/manually/how-to/configure-routes.mdx index 7842e8fa9a0e578..75db9208a516cd9 100644 --- a/src/content/docs/magic-wan/configuration/manually/how-to/configure-routes.mdx +++ b/src/content/docs/magic-wan/configuration/manually/how-to/configure-routes.mdx @@ -18,6 +18,7 @@ import { Render } from "~/components" trafficSteeringPage: "/magic-wan/reference/traffic-steering/", productName: "Magic WAN", tunnelEndpoints: "/magic-wan/configuration/manually/how-to/configure-tunnels/", + routePrioritization: "/magic-wan/reference/traffic-steering/#route-prioritization", chooseWeights: "/magic-wan/reference/traffic-steering/#set-priority-and-weights-for-static-routes", publicAsnMT: " ", productGatewayOrEgress: "Magic WAN with Gateway" From ded57de233a958184c814c95cfce127e552a8061 Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 12:05:13 +0100 Subject: [PATCH 4/7] refined text --- .../networking-services/routing/configure-routes.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/partials/networking-services/routing/configure-routes.mdx b/src/content/partials/networking-services/routing/configure-routes.mdx index 3251100e7cc5646..8c14d303813d239 100644 --- a/src/content/partials/networking-services/routing/configure-routes.mdx +++ b/src/content/partials/networking-services/routing/configure-routes.mdx @@ -31,7 +31,10 @@ Refer to Traffic Steering for more infor 4. Enter a descriptive name for your route in **Description**. 5. In **Prefix**, enter your range of IP addresses. For example, `10.10.10.100/24`. 6. In **Tunnel/Next hop** select which tunnel you want your route to go through. Choose from the tunnels you have created in Configure tunnel endpoints. -7. Choose the **Priority** for your route. Lower numbers have higher priorities. You should also be aware that Cloudflare routing applies longest-prefix match. This means more specific routes will always be preferred over less specific ones. Refer to Route prioritization for more information +7. Choose the **Priority** for your route. Lower numbers have higher priorities. + :::note + You should also be aware that Cloudflare routing applies longest-prefix match. This means more specific routes will always be preferred over less specific ones. Refer to Route prioritization for more information. + ::: 8. (Optional) Choose a **Weight** for your route. Refer to Set priority and weights for static routes for examples. 9. (Optional) If you need to scope your route to a specific region, you can do it in **Region code**. 10. (Optional) We highly recommend testing your route before adding it by selecting **Test routes**. From cbe75dfb1d94b4618fef0f64080b11cf9b868629 Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 12:12:06 +0100 Subject: [PATCH 5/7] partial for longest prefix match --- .../networking-services/reference/longest-prefix-match.mdx | 5 +++++ .../networking-services/reference/traffic-steering.mdx | 4 ++-- .../networking-services/routing/configure-routes.mdx | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/content/partials/networking-services/reference/longest-prefix-match.mdx diff --git a/src/content/partials/networking-services/reference/longest-prefix-match.mdx b/src/content/partials/networking-services/reference/longest-prefix-match.mdx new file mode 100644 index 000000000000000..91bc392ac88f205 --- /dev/null +++ b/src/content/partials/networking-services/reference/longest-prefix-match.mdx @@ -0,0 +1,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. \ No newline at end of file diff --git a/src/content/partials/networking-services/reference/traffic-steering.mdx b/src/content/partials/networking-services/reference/traffic-steering.mdx index b9d822f8e1ef406..98a678f366a8b4f 100644 --- a/src/content/partials/networking-services/reference/traffic-steering.mdx +++ b/src/content/partials/networking-services/reference/traffic-steering.mdx @@ -10,7 +10,7 @@ params: - tunnelHCsPage --- -import { AnchorHeading, Aside, Markdown } from "~/components"; +import { AnchorHeading, Aside, Markdown, Render } from "~/components"; ## Magic routing table @@ -60,7 +60,7 @@ Magic {props.productName} is steered along tunnel routes based on priorities of - Lower values have greater priority. - 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). -- 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. +- - 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. ### Set priority and weights for static routes diff --git a/src/content/partials/networking-services/routing/configure-routes.mdx b/src/content/partials/networking-services/routing/configure-routes.mdx index 8c14d303813d239..5ee59d0a37cf3fa 100644 --- a/src/content/partials/networking-services/routing/configure-routes.mdx +++ b/src/content/partials/networking-services/routing/configure-routes.mdx @@ -33,7 +33,7 @@ Refer to Traffic Steering for more infor 6. In **Tunnel/Next hop** select which tunnel you want your route to go through. Choose from the tunnels you have created in Configure tunnel endpoints. 7. Choose the **Priority** for your route. Lower numbers have higher priorities. :::note - You should also be aware that Cloudflare routing applies longest-prefix match. This means more specific routes will always be preferred over less specific ones. Refer to Route prioritization for more information. + Have this in mind when configuring priorities for your routes. Refer to Route prioritization for more information. ::: 8. (Optional) Choose a **Weight** for your route. Refer to Set priority and weights for static routes for examples. 9. (Optional) If you need to scope your route to a specific region, you can do it in **Region code**. From 2e23defbafc24cb2bdfdb5ed17e38b22eaa53b5b Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 12:33:42 +0100 Subject: [PATCH 6/7] made var optional --- .../partials/networking-services/routing/configure-routes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/partials/networking-services/routing/configure-routes.mdx b/src/content/partials/networking-services/routing/configure-routes.mdx index 5ee59d0a37cf3fa..9dcf93b7f1bb7cd 100644 --- a/src/content/partials/networking-services/routing/configure-routes.mdx +++ b/src/content/partials/networking-services/routing/configure-routes.mdx @@ -5,7 +5,7 @@ params: - trafficSteeringPage - productName - tunnelEndpoints - - routePrioritization + - routePrioritization? - chooseWeights - productGatewayOrEgress --- From 7213ebac203c6d662076e86a57c3f2780a84ad5d Mon Sep 17 00:00:00 2001 From: Marcio Date: Mon, 23 Jun 2025 12:34:45 +0100 Subject: [PATCH 7/7] added var to mt lp --- .../configure-tunnels-routes/configure-routes.mdx | 1 + .../partials/networking-services/routing/configure-routes.mdx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/docs/learning-paths/data-center-protection/configure-tunnels-routes/configure-routes.mdx b/src/content/docs/learning-paths/data-center-protection/configure-tunnels-routes/configure-routes.mdx index 114814fd5d2c63a..b57e29886d62170 100644 --- a/src/content/docs/learning-paths/data-center-protection/configure-tunnels-routes/configure-routes.mdx +++ b/src/content/docs/learning-paths/data-center-protection/configure-tunnels-routes/configure-routes.mdx @@ -15,6 +15,7 @@ import { Render } from "~/components" trafficSteeringPage: "/magic-transit/reference/traffic-steering/", productName: "Magic Transit", tunnelEndpoints: "/magic-transit/how-to/configure-tunnels/", + routePrioritization: "/magic-transit/reference/traffic-steering/#route-prioritization", chooseWeights: "/magic-transit/reference/traffic-steering/#set-priority-and-weights-for-static-routes", 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.", productGatewayOrEgress: "Magic Transit with Egress" diff --git a/src/content/partials/networking-services/routing/configure-routes.mdx b/src/content/partials/networking-services/routing/configure-routes.mdx index 9dcf93b7f1bb7cd..5ee59d0a37cf3fa 100644 --- a/src/content/partials/networking-services/routing/configure-routes.mdx +++ b/src/content/partials/networking-services/routing/configure-routes.mdx @@ -5,7 +5,7 @@ params: - trafficSteeringPage - productName - tunnelEndpoints - - routePrioritization? + - routePrioritization - chooseWeights - productGatewayOrEgress ---