Who Announces the Prefix and Who Routes the Packet
Imagine a company that owns a block of street addresses. It hires a courier to put those addresses on the national delivery map, screen every parcel at a depot, and drive the parcels to its loading dock. The map entry, the screening, and the loading dock are three different promises. If the loading dock is closed, the map entry still says the address is deliverable.
That is the shape of an enterprise BGP failover. Acme, a composite example used throughout this article, owns the public prefix 203.0.113.0/24 and the autonomous system number AS64496. It runs a public API in Austin and a warm standby in Phoenix. Acme onboards the prefix to Magic Transit, which becomes the front door for that address space. Cloudflare then does four separable things:
- Announces the prefix to the Internet.
- Screens incoming packets for attacks and policy violations.
- Delivers the surviving packets to Acme over an on-ramp.
- Returns replies to the client, either through Cloudflare or through Acme's own ISP.
Seven terms make the rest readable. A prefix is a contiguous block of IP addresses. An ASN identifies a network. BGP is the protocol that exchanges reachability between networks.
A BGP announcement says "traffic for this prefix can enter through my network." An on-ramp connects your network to Cloudflare, such as a GRE tunnel, an IPsec tunnel, or a Cloudflare Network Interconnect.
A virtual network is the private route table that chooses which on-ramp receives the packet. Anycast means the same address is served from many Cloudflare locations.
The announcement itself is a control-plane action. Cloudflare pairs an IP prefix entry with the Letter of Agency that authorizes announcement, and a BGP prefix entry controls what is advertised. Those are authorization and commercial facts, not routing behavior, so they belong in the design record before anyone touches a route table (advertise prefixes).
Default behavior is simple. The BGP prefix matches the onboarded prefix, a new onboarding uses AS13335, and a BYOIP prefix must be at least a /24.
Two facts sit outside routing. A BYOASN onboarding prepends AS13335, so a direct peer sees 13335 64496, and each BGP prefix is billed separately even when prefixes overlap.
Then the packet moves, and a different set of decisions takes over. The Internet sends the packet to a Cloudflare anycast edge. That edge may not be the geographically closest one, because BGP best path is policy, not a latency measurement. Inside Cloudflare, the Magic Transit virtual network makes a one-pass, per-packet decision at the ingress data center and steers traffic to a tunnel by prefix, priority, and health.
Your side makes the last two choices. On Acme's side, the border router decapsulates the packet and routes it to the application. Finally, the return path carries the reply back, a separate design choice.
So there are three route decisions and one return-path decision:
- The Internet decides which Cloudflare edge receives the packet.
- Cloudflare decides which tunnel or interconnect receives the packet.
- Your network decides which origin receives the packet.
- The return path decides whether the reply follows the same path or none at all.
Figure 1 draws those boundaries. The dashed arrow from the announcement to the Internet is the control plane; the solid arrows are the data plane. The failure branch at the bottom is the one operators most often miss: if every tunnel is unhealthy, Cloudflare can continue announcing the prefix and fail to deliver the traffic, because announcement and delivery are different state machines.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
U["User in Nairobi"] -->|"packet to 203.0.113.10"| DFZ["Internet DFZ
BGP best path"]
DFZ -->|"route: 203.0.113.0/24 via AS13335"| EDGE["Cloudflare anycast edge"]
subgraph CF["Cloudflare control and protection"]
ANN["BGP origin
announces 203.0.113.0/24"]
SCRUB["DDoS scrub
Network Firewall"]
VN["Virtual network route table
priority 100, then 200"]
end
ANN -. "control plane: BGP UPDATE" .-> DFZ
EDGE --> SCRUB --> VN
VN -->|"GRE or IPsec, priority 100"| CE1["Austin edge router"]
VN -. "priority 200 if 100 is penalized" .-> CE2["Phoenix edge router"]
CE1 --> APP1["Origin service
Austin"]
CE2 --> APP2["Origin service
Phoenix"]
APP1 -. "return via ISP: DSR" .-> U
APP2 -. "return via ISP: DSR" .-> U
VN -. "all tunnels down: delivery fails" .-> BH["Blackhole
prefix still announced"]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class EDGE,ANN,SCRUB,CE1,CE2,APP1,APP2 primary;
class U,DFZ,VN,BH secondary;
Figure 2 separates the planes. The top row is authority and reachability; the bottom row is packets. A green top row says only that a route exists, not that the tunnel, firewall policy, application, or return path works.
Stop asking whether BGP is up
Ask instead which promise is broken. A BGP session can be established while a tunnel health check fails; a tunnel can be healthy while the application returns 503; an application can be healthy while an asymmetric return path is dropped by a stateful firewall. Those are different incidents with different evidence, and one combined dashboard produces false confidence.
GRE, IPsec, Interconnect, and Return Paths
Now keep the same prefix and change only the on-ramp. Acme can connect its Austin router to Cloudflare with GRE, with IPsec, or with a private interconnect. The choice changes the transit underlay, encapsulation, encryption, MSS, failure detection, and return path. It does not change who announces the prefix. Transit here is the middle mile between your edge and Cloudflare's edge: public Internet paths for GRE and IPsec, a private cross-connect for CNI.
A GRE tunnel is stateless and simple. Cloudflare wraps the original packet in an outer IP header and a GRE header, sends it across the public Internet, and Acme's router removes the wrapper. There is no encryption. The documented overhead is 24 bytes, which is why Magic Transit's getting-started guide sets a 1,436-byte TCP MSS clamp on transit ports for ingress-only deployments. GRE's statelessness is also why it fits anycast: any Cloudflare server can decapsulate any packet for the tunnel without negotiating per-server state (GRE and IPsec tunnels).
IPsec is stateful. Acme's router initiates IKEv2 with a pre-shared key, negotiates encryption and integrity algorithms, and establishes a Child SA for the data plane. Cloudflare supports AES-GCM and AES-CBC, SHA-2 integrity, and post-quantum hybrid key agreement using ML-KEM with DH group 20.
Encryption changes the MSS math. Because the outer packet is encrypted, the getting-started guide uses a 1,360-byte clamp on the tunnel internal interface for ingress-plus-egress, and 1,436 on transit ports for ingress-only. IPsec also adds dead peer detection, traffic selectors, and rekey timers to the failure surface.
A Cloudflare Network Interconnect (CNI) replaces the public Internet underlay with a private cross-connect. Dataplane v1 peers with a Cloudflare edge and uses GRE to reach the virtual network, with optional GRE-less delivery for Magic Transit direct server return. Dataplane v2 uses a Customer Connectivity Router, removes GRE, and documents a 1,500-byte MTU in both directions. CNI is Enterprise-only and comes in direct, partner, and cloud variants; the available dataplane depends on the location, so the design must name the location, not just the product (CNI overview).
Declare the on-ramp, then measure the path it creates. The tunnel is a Terraform object; the MSS is a property of the path that object produces.
The table compares the four choices. These are documented behavior, not a benchmark.
| On-ramp | Encapsulation and crypto | Overhead and MSS | BGP support | Return path | Best fit and constraint |
|---|---|---|---|---|---|
| GRE | IP over GRE; stateless; no encryption | 24 bytes; 1,436-byte TCP MSS on transit ports for DSR | BGP over anycast GRE is generally available on Unified Routing accounts | Direct server return via ISP, or egress through the tunnel | Simple, high-throughput delivery; encryption must come from another layer |
| IPsec | IKEv2, ESP, AES-GCM or AES-CBC, SHA-2, optional ML-KEM hybrid | 1,360-byte MSS on the tunnel internal interface for ingress plus egress; 1,436 on transit ports for DSR | BGP over IPsec is generally available on Unified Routing accounts | DSR replies must reach Cloudflare IPs; egress can return through the tunnel | Encryption and source authentication; more state, CPU, and timers to operate |
| CNI Dataplane v1 | Private cross-connect; GRE to the virtual network, optional GRE-less DSR | 1,476-byte MSS for GRE over CNI v1 | BGP over CNI is closed beta and not available to new customers | Private path; DSR or egress depending on the use case | Colocation or partner connectivity; peering only at the connected PoP |
| CNI Dataplane v2 | Private cross-connect to a Customer Connectivity Router; no GRE | 1,500-byte MTU both ways; no MSS clamp required for a 1,500-byte handoff | BGP over CNI is closed beta and not available to new customers | Private path; native WAN and Magic Transit egress | High-throughput private delivery; check location and dataplane support first |
Figure 3 traces the same packet through each on-ramp and adds the failure branches that matter. The first branch is the tunnel health state: a degraded tunnel gets 500,000 added to its route priority, and a down tunnel gets 1,000,000. The second branch is the BGP session: if it drops, learned routes are withdrawn, but the anycast prefix announcement is a separate control and may remain. The third branch is the return path, which is where direct server return differs from ingress-plus-egress.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
sequenceDiagram
autonumber
participant C as Client
participant E as Cloudflare edge
participant F as Network Firewall
participant R as Virtual network route table
participant T as GRE / IPsec / CNI
participant O as Origin router and app
C->>E: Packet to 203.0.113.10
E->>F: DDoS scrub and packet policy
F->>R: Allowed packet
alt Healthy path
R->>T: Lowest-priority healthy next hop
T->>O: Encapsulated delivery
else Tunnel degraded or down
R->>T: Add 500,000 or 1,000,000 and use next path
T->>O: Delivery over alternate tunnel
else All tunnels unhealthy
R--xO: Delivery fails — anycast prefix still announced
end
alt GRE on-ramp
Note over T,O: Stateless, no encryption,
24-byte outer header
else IPsec on-ramp
Note over T,O: IKEv2, encrypted ESP, DPD, rekey timers
else CNI on-ramp
Note over T,O: Private cross-connect, no public transit
end
alt Ingress only (DSR)
O-->>C: Return via ISP
else Ingress and egress
O-->>T: Return through tunnel
T-->>E: Decapsulate and forward
E-->>C: Return via Cloudflare
end
Note over R,T: Health probes penalize priority
— they do not withdraw the prefix
Note over E,T: BGP session down removes learned routes, not the anycast announcement
Note over T,O: MSS too high: large packets
drop while a small ping succeeds
Asymmetric return is a design choice, not a fault. In a direct-server-return design, ingress comes through Cloudflare and egress goes through Acme's ISP. It works for stateless packet delivery, but a stateful firewall, NAT, or flow-based analytics device that sees only one direction may drop or misclassify the flow.
The probe can fail while the tunnel works
In IPsec's default unidirectional health check, the probe response travels over the public Internet. An ISP that filters packets from Acme's prefix to Cloudflare's IP ranges can make health checks fail even while the tunnel and data plane are fine (IPsec troubleshooting).
The product boundary is narrower than a generic "network security" pitch. Magic Transit protects public address space you can advertise and onboard. Cloudflare WAN connects private sites. Spectrum proxies one TCP or UDP application at Layer 4. GRE, IPsec, and CNI are on-ramps, not protection products.
The HTTP proxy is a different product. It terminates HTTP and TLS at the edge, applies WAF, cache, bot management, and Workers, and does not require BGP. It cannot protect arbitrary TCP or UDP or announce a prefix. To hide an origin and absorb a flood for one port, use Spectrum or Magic Transit; to inspect HTTP and cache responses, use the HTTP proxy.
Availability is contractual, not universal. Cloudflare WAN, Magic Transit, CNI, and Spectrum's custom TCP and UDP applications are Enterprise offerings. BGP over CNI is in closed beta and is not available to new customers. Unified Routing features have their own release stages. Confirm the current quote, plan gating, and region before writing any of this into a runbook.
Magic Transit, Spectrum, and WAN Failure Boundaries
Three flows, one failure. All three ride the same global network, but they do not fail in the same way.
| Flow | Product | Input | First failure to suspect | What the product cannot promise |
|---|---|---|---|---|
| Public API | Magic Transit | Public prefix 203.0.113.0/24 | Tunnel or delivery path; the prefix stays announced | Application availability or a working return path |
| MQTT broker | Spectrum | One port, TCP 8883 | Origin socket or the Layer 4 proxy path; no prefix to announce | TLS termination or client authentication |
| Branch network | Cloudflare WAN | Private range 10.10.0.0/16 | WAN tunnel between sites | Public reachability or Internet presence |
One ISP flap, three symptoms. At 09:14, an ISP in Frankfurt flaps. Magic Transit tunnel 1, which carries the API prefix to Austin, goes down in some Cloudflare data centers. Health checks add 1,000,000 to that route's priority, and traffic moves to tunnel 2 toward Phoenix where the checks are healthy. The /24 is still announced the entire time. Users in some regions see a brief latency increase; users in others see nothing, because Cloudflare does not synchronize health checks across data centers and the Internet is not homogeneous.
The other two flows fail for their own reasons. The MQTT broker is unaffected if its Spectrum origin uses a different path, but if the broker sits in the same Austin rack as the API, it may fail for an unrelated reason: shared power, shared switch, shared database. The branches reroute through their second WAN tunnel. One ISP event produced three symptoms, only one a routing failure.
That is why "failover" is not a single test. It is a set of evidence claims:
- Reachability evidence: the prefix is announced, and the expected AS path is visible from multiple looking glasses.
- Delivery evidence: the virtual network has a matching route, the chosen next hop is healthy, and packets arrive at the origin router.
- Protection evidence: the scrubbing and firewall policy that you intended is actually applied, and it does not block the health probes it depends on.
- Origin evidence: the application accepts connections, completes TLS, and returns the expected response.
- Return evidence: replies reach the client from the same or an acceptable path, and stateful devices see enough of the flow to keep it.
Figure 4 maps those claims onto the three products. The rows are the layers; the columns are the products. Reading down a column shows what that product actually owns. Reading across a row shows which product is responsible for the same layer in a different traffic class.
An announcement is not a health check
The most expensive misconception in this topic is that a BGP announcement proves the path works. Magic Transit can keep announcing your prefix while every tunnel is down; the route remains in the global table while delivery fails. Failover evidence must test announcement state and delivery state separately, or a "successful" failover test will certify a blackhole.
The last row of Figure 4 belongs in a design review. Magic Transit can protect reachability and filter packets, but it cannot promise the API behind it is up. Spectrum can absorb a flood on TCP 8883, but it cannot promise the MQTT broker authenticates clients correctly. Cloudflare WAN can connect a branch to a data center, but it cannot promise the data center has power. Those are origin-service promises, with a different owner and evidence set.
A Tabletop Route Withdrawal and Recovery
Rehearse the move before you need it. Acme is moving the public API from Austin to Phoenix, and the prefix does not change. Only the announcement owner and the delivery path do.
| State | Today | Target |
|---|---|---|
| Announcement | Cloudflare announces the /24 | The new ISP announces the /24 |
| Delivery | Magic Transit to Austin | Phoenix egress through its own ISP |
| Route priority | Austin 100, Phoenix 200 as warm standby | One provider path, no standby priority |
| Protection | Cloudflare scrubbing on the public path | Whatever the new ISP provides |
Withdraw second, never first
A direct withdrawal can leave a stuck route in the default-free zone: a core router that missed the withdrawal keeps forwarding to a next hop that no longer carries the prefix. That is a blackhole that looks like a healthy BGP table. Cloudflare's engineering writing calls the related phenomenon BGP zombies and excessive path hunting.
The safe pattern is a drain, not a switch. Announce the same prefix length from the new provider first, let the global table converge, verify that traffic has drained, and only then withdraw from Cloudflare (safely withdraw a BYOIP prefix).
Figure 5 shows the four-stage timeline and the rollback branch. The important detail is that stage 2 is intentionally ambiguous: two same-length routes exist, and each network picks a best path according to its own policy. Some traffic drains immediately; some does not. That is not a bug in the plan; it is the reason the plan has a verification step.
A workable tabletop runs on a clock, with named owners and explicit pass criteria. Here is one that mirrors the documented behavior without claiming a hosted test.
- T-7 days: prove authority and readiness. Confirm the LOA, IRR entry, and RPKI ROA match the prefix and origin ASN. Confirm the new ISP can announce the exact same length, and that Phoenix can serve the API, terminate TLS, reach every dependency, and apply the MSS clamp. Write the rollback command and name the person who can run it.
- T-0: announce from the new ISP. Cloudflare still announces. Two same-length routes now exist. Do not expect a clean 50/50 split; BGP best path depends on AS path length, local preference, and peer policy.
- T+10 minutes: verify the drain. Use Cloudflare's Network Analytics, edge logs, and synthetic probes from several regions. Check that requests are landing in Phoenix and that the return path works from those regions. A successful ping from one location is not evidence.
- T+15 minutes: withdraw from Cloudflare. Use one advertisement control method, not several. With route-reflector BGP control, withdraw on all sessions; a partial withdrawal leaves the prefix announced. With the API or dashboard, confirm the BGP prefix status.
- T+20 minutes: watch for the stuck-route failure. If traffic drops instead of draining, a DFZ router may have missed the withdrawal. The documented prevention is the same-length dual announcement with a longer drain, not a more-specific prefix.
- T+30 minutes: decide. If Phoenix is healthy and traffic is stable, complete the change and keep the old path warm for the rollback window. If not, re-announce from Cloudflare and verify that delivery returns.
- T+24 hours: decommission. Remove the Austin tunnel and routes only after the rollback window closes. Keep the final AS path, route table, and probe results as evidence.
The tradeoffs are real. A graceful dual announcement is slower and creates a period of path ambiguity, but avoids the blackhole risk of a hard withdrawal. AS prepending is useful, but Cloudflare documents that peers may ignore it, so it is best-effort. A more-specific prefix moves traffic quickly, but relies on longest-prefix fallback and is exactly the pattern that makes stuck routes and zombies more likely. The tabletop should force a choice and record why.
One Cloudflare-specific subtlety belongs in the tabletop. Cloudflare's internal network enforces local preference for delivery to Magic Transit, even when a more specific or shorter path exists on the public Internet. If Acme has a CDN zone whose origin is a Magic Transit-protected address, and later announces a more-specific route directly, Cloudflare's own servers may keep sending proxied traffic over Magic Transit. The documented fix is to withdraw the prefix, not merely prepend it (advertise prefixes). That is why "the Internet converged" and "all traffic moved" are different claims.
Change one layer at a time
Routing control is the announcement and withdrawal. Protection is what Cloudflare still does while the prefix is announced, and what disappears from the public path when it is withdrawn. Origin service is whether Phoenix can actually serve the request. A migration that changes all three at once is not a failover test; it is an unowned experiment.
Model an Enterprise Failover Using a Routing Diagram
This exercise is design-only. No Cloudflare account, prefix, tunnel, Spectrum application, or interconnect was provisioned, and no convergence time, packet loss, or throughput measurement was taken. The goal is to make your assumptions visible before a provider-supported test.
Model an Enterprise Failover Using a Routing Diagram
Status: Design-only; no hosted validation.
Prerequisites: A worksheet or diagramming tool. A current copy of the Cloudflare WAN, Magic Transit, Spectrum, and CNI documentation. A quoted Enterprise commercial path, or an explicit note that pricing is unverified. A controlled prefix plan using documentation addresses such as 203.0.113.0/24 and private ranges such as 10.10.0.0/16. No production credentials and no live advertisements.
Inputs.
| Element | Value | Owner |
|---|---|---|
| Public prefix | 203.0.113.0/24 | Acme, brought as BYOIP |
| Origin ASN | AS64496 | Acme |
| Announcement | The prefix, announced by Cloudflare | Cloudflare |
| Primary on-ramp | GRE to Austin, priority 100 | Acme |
| Standby on-ramp | IPsec to Phoenix, priority 200 | Acme |
| Private branch | 10.10.0.0/16 over Cloudflare WAN | Acme and Cloudflare |
| Layer 4 application | TCP 8883 over Spectrum | Acme and Cloudflare |
| Return path | Direct server return for the API; ingress plus egress for the branch | Shared |
Actions:
- Draw four horizontal bands: authority, reachability, delivery, and origin service. Put every box in exactly one band. Mark who owns it: you, Cloudflare, your ISP, or shared.
- Draw the BGP announcement as a dashed arrow from Cloudflare to the Internet. Draw the packet path as solid arrows from user to edge to virtual network to tunnel to origin. Label the return path separately.
- Write the route table for
203.0.113.0/24: two rows, next hop, priority100and200, and the health state that would change the choice. Add the static-versus-BGP tie-break rule. - Fill a five-row state matrix: announced and delivered; announced but not delivered; withdrawn with a direct path; withdrawn with no alternate; delivered but origin failing. For each row, write the user symptom and the first evidence you would collect.
- Model a tunnel failure: mark Austin down, apply the documented priority penalty, and redraw the path to Phoenix. Then mark both tunnels down and redraw the result as a delivery failure, not a failover.
- Model a BGP session failure without a tunnel failure: remove the learned routes but leave the anycast announcement in place. Decide what should happen to traffic and what your dashboard would show.
- Model the return path: draw a stateful firewall that sees only ingress. Break the ISP return and predict which sessions survive. Repeat for ingress-plus-egress.
- Model MTU: start at 1,500 bytes, subtract 24 for GRE, and mark the TCP MSS clamp. Predict what a 1,500-byte DF packet does while a 64-byte ping succeeds.
- Write the rollback: the exact advertisement control method, the person, the command or dashboard action, and the verification that proves traffic returned.
Expected observations: Every flow has a named announcement owner, a named route-table next hop, and a named return path. The state matrix distinguishes "announced" from "delivered" and "delivered" from "application healthy." The all-tunnels-down row says "delivery failure," not "fail over." The Spectrum flow is visibly Layer 4 only. The WAN flow is visibly private only. No flow depends on a single tunnel or a single evidence source.
Failure checks: A reviewer removes the highest-priority tunnel and asks which route changes. A reviewer withdraws the announcement and asks which users lose service. A reviewer blocks ICMP to Cloudflare's probe addresses and asks whether health checks still pass. A reviewer advertises a more-specific prefix and asks whether Cloudflare-sourced traffic moves. A reviewer changes the MSS and asks which applications break. If any answer is "Cloudflare handles it," the model is incomplete.
Cost dimensions: Enterprise plan commitments; per-BGP-prefix Magic Transit billing, including overlapping prefixes; CNI port, partner, or cloud-circuit fees; Spectrum add-on and IPv4 hostname quota; egress; and engineering time for change control and on-call. No metered cloud resources are required for the paper exercise. Confirm every number in a current quote; do not treat this card as a price list.
Cleanup: Archive the worksheet, state matrix, and diagrams with the date and the documentation version. If you later reproduce the model in a lab, destroy the tunnels, static routes, BGP prefixes, Spectrum applications, and interconnect attachments, then verify that no prefix is still advertised. Remove any temporary firewall rules that allowed health probes.
The exercise produces a diagram, a state matrix, and a rollback sentence. Those artifacts are what a provider-supported test later validates; without them, a test proves only that one engineer can make one command work.
Identify Assumptions That Require a Provider-Supported Test
Some claims are checkable from documentation and configuration. Others require a real prefix, a real ISP, a real tunnel, and a maintenance window with the provider. Separating them is the difference between a design review and a wish.
What you can verify yourself. The ownership boundary, route-table semantics, health-check penalties, MSS values, BGP timer defaults, release stage, and whether your control method is singular. For example: lower priority values win, longest-prefix match applies, a static route beats a BGP route at the same prefix and priority, a degraded tunnel adds 500,000, and a down tunnel adds 1,000,000. Cloudflare's BGP hold timer is 240 seconds, BFD is unsupported, and graceful restart is helper-only with a 90-second stale-route limit. BGP over CNI is closed beta and not available to new customers, and Magic Transit is not available in Cloudflare's China network (traffic steering, CNI, Magic Transit about).
What requires a provider-supported test. Global BGP convergence after a real advertisement change; how each upstream ISP refreshes its table; the actual failover time for your router and traffic mix; whether a stateful firewall or NAT survives an asymmetric return; whether your IPsec device interoperates with the documented transforms and post-quantum key exchange; whether a CNI location supports the dataplane you designed; whether Spectrum's plan and quota cover your hostnames and protocols; and whether DDoS scrubbing behaves as expected under a real attack profile. These are environment-specific behaviors that only a controlled test can settle.
A pass needs seven artifacts. Show the announcement state, the route-table entry, the chosen next hop, the tunnel health, the end-to-end response from at least three regions, the return path, and the MSS behavior with a DF packet. Anything less is a partial answer, not a verdict.
A withdrawal is its own test. Pass if withdrawing the prefix produces the expected loss of reachability and re-announcing it restores service. Pass if a single tunnel failure moves traffic without changing the announcement, and the all-tunnels-down case is documented as a delivery failure. Fail if the only evidence is a BGP session in Established state, a ping from one laptop, or a dashboard tile that combines announcement and delivery into one green check.
Self-check.
- Cloudflare announces your
/24, but both tunnels are down. Does traffic fail over to your ISP? No. The announcement is a control-plane statement; it does not detect tunnel health. Health checks penalize the tunnel routes, and if every route is unhealthy, Cloudflare still attempts the best available route, so traffic may be dropped. The prefix can remain announced, producing a blackhole. Failover to the ISP requires a separate advertisement or a routing policy that withdraws the prefix. - You add a more-specific
/24from your own network while Cloudflare still announces the covering/22. Will all traffic move? Not necessarily. Other networks will prefer the more-specific route by longest-prefix match, but Cloudflare's internal network enforces local preference for traffic delivery to Magic Transit. Cloudflare-sourced traffic can continue over Magic Transit until you withdraw the prefix. - A BGP session is
Establishedand the tunnel isUp. Is the path healthy? Not proven. The session is control-plane reachability; the tunnel state is probe-based delivery; the application and return path are separate. A healthy session can coexist with a policy-blocked probe, an asymmetric return, or an origin returning503. - Why does a 1,500-byte packet fail over GRE while a small ping succeeds? GRE adds 24 bytes of outer header. On a 1,500-byte underlay, the inner packet exceeds the path MTU unless TCP MSS is clamped. If ICMP is blocked, path MTU discovery cannot correct it, so small requests work and bulk transfers stall. The documented clamp is 1,436 bytes on the transit ports for ingress-only; IPsec uses a lower value.
Unresolved limitations. This article was verified against Cloudflare documentation on 2026-11-05, with a planning baseline of 2026-11-02. No hosted lab was executed, so no convergence time, failover duration, throughput, or packet-loss figure is claimed. Pricing, plan gating, regional availability, release stages, and Spectrum quotas can change; confirm them at purchase. Third-party router interoperability, post-quantum IPsec behavior on a specific appliance, and ISP route-refresh behavior were not tested here. The tabletop is a reasoning tool, not a substitute for a provider-supported maintenance window.
References.
- Cloudflare WAN: https://developers.cloudflare.com/cloudflare-wan/
- Magic Transit overview: https://developers.cloudflare.com/magic-transit/about/
- Magic Transit advertise prefixes: https://developers.cloudflare.com/magic-transit/how-to/advertise-prefixes/
- Magic Transit traffic steering: https://developers.cloudflare.com/magic-transit/reference/traffic-steering/
- Magic Transit tunnel health checks: https://developers.cloudflare.com/magic-transit/reference/tunnel-health-checks/
- Magic Transit GRE and IPsec tunnels: https://developers.cloudflare.com/magic-transit/reference/gre-ipsec-tunnels/
- Magic Transit get started and MSS guidance: https://developers.cloudflare.com/magic-transit/get-started/
- Cloudflare Network Interconnect: https://developers.cloudflare.com/network-interconnect/
- Cloudflare WAN routing and BGP troubleshooting: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-wan/troubleshooting/routing-and-bgp/
- Spectrum configuration options: https://developers.cloudflare.com/spectrum/reference/configuration-options/
- Spectrum limitations: https://developers.cloudflare.com/spectrum/reference/limitations/
- Cloudflare Network Firewall: https://developers.cloudflare.com/cloudflare-network-firewall/
- Cloudflare BYOIP: https://developers.cloudflare.com/byoip/
- What is BGP: https://www.cloudflare.com/learning/security/glossary/what-is-bgp/