Skip to content

Commit 7996684

Browse files
[BGP] Added clarification on bgp vs static routes priorities (#19957)
* added route priority * added vars * refined text * Update src/content/partials/network-interconnect/bgp-peering.mdx Co-authored-by: Jun Lee <[email protected]> * corrected url --------- Co-authored-by: Jun Lee <[email protected]>
1 parent 08da060 commit 7996684

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/content/docs/magic-transit/how-to/bgp-peering.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import { Render } from "~/components"
1616
legacyHCs: "/magic-transit/reference/tunnel-health-checks/#legacy-bidirectional-health-checks",
1717
asnProduct: "<br /> Magic Transit customers should also be aware of the following: <br /> <ul><li>The Cloudflare side ASN will never be exposed in <code>AS_PATH</code> of anycast announcements from the Cloudflare edge. In those announcements, Cloudflare will always use the Cloudflare ASN of <code>13335</code> optionally prepended with a bring-your-own ASN as described in [Cloudflare ASN vs. your own ASN](/magic-transit/how-to/advertise-prefixes/#cloudflare-asn-vs-your-own-asn)</li><li>The customer device ASN can be a private ASN or the ASN they are using for Magic Transit anycast announcements at the edge: this has no impact on the ASN for the anycast announced prefix at the edge of the Cloudflare global network.</li></ul>",
1818
mtLimitations: "<br /> For Magic Transit customers, BGP with the Magic routing table is separated from the announcement of anycast prefixes at the Cloudflare edge. Anycast withdrawal must be controlled with existing methods documented in [Advertise prefixes](/magic-transit/how-to/advertise-prefixes/).",
19-
productGatewayOrEgress: "Magic Transit with Egress"
19+
productGatewayOrEgress: "Magic Transit with Egress",
20+
configStaticRoutes:"/magic-transit/how-to/configure-static-routes/#scoped-routes-for-anycast-gre-or-ipsec-tunnels",
21+
ecmp:"/magic-transit/reference/traffic-steering/"
2022
}}
2123
/>

src/content/docs/magic-wan/configuration/manually/how-to/bgp-peering.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import { Render } from "~/components"
1616
legacyHCs: "/magic-wan/reference/tunnel-health-checks/#legacy-bidirectional-health-checks",
1717
asnProduct: "<br /> Magic WAN customers should also be aware of the following: <br /> <ul><li>The Cloudflare side ASN will be included in the <code>AS_PATH</code> of announced routes to any BGP enabled interconnect.</li><li>The customer chooses their device ASN, which should be different to the Cloudflare-side ASN.</li></ul>",
1818
mtLimitations: " ",
19-
productGatewayOrEgress: "Magic WAN with Gateway"
19+
productGatewayOrEgress: "Magic WAN with Gateway",
20+
configStaticRoutes: "/magic-wan/configuration/manually/how-to/configure-static-routes/#scoped-routes-for-anycast-gre-or-ipsec-tunnels",
21+
ecmp: "/magic-wan/reference/traffic-steering/"
2022
}}
2123
/>
2224

src/content/partials/network-interconnect/bgp-peering.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ params:
66
- asnProduct
77
- mtLimitations
88
- productGatewayOrEgress
9+
- configStaticRoutes
10+
- ecmp
911
---
1012

1113
import { Markdown } from "~/components";
@@ -47,6 +49,14 @@ All routes in the Magic routing table are advertised to BGP peers. Each BGP peer
4749

4850
BGP peering sessions can advertise reachable prefixes to a peer and withdraw previously advertised prefixes. This should not take more than a few minutes to propagate.
4951

52+
## Route prioritization
53+
54+
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.
55+
56+
When BGP advertises a route, it is automatically added to the Magic routing table with a default priority of `100` which <a href={props.configStaticRoutes}>applies to all regions</a>. 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.
57+
58+
Additionally, when multiple BGP routes exist with the same prefix length and priority, traffic is distributed across them using <a href={props.ecmp}>equal-cost multi-path (ECMP) routing</a>.
59+
5060
## BGP timers and settings
5161

5262
Cloudflare uses the timers as described below. These are not configurable:

0 commit comments

Comments
 (0)