Skip to content

Commit d50ecd2

Browse files
Fix broken link
1 parent 322a089 commit d50ecd2

File tree

2 files changed

+23
-98
lines changed

2 files changed

+23
-98
lines changed

src/content/docs/byoip/service-bindings/magic-transit-with-cdn.mdx

Lines changed: 22 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar:
66
label: Magic Transit with CDN
77
---
88

9-
import { Details, Example, TabItem, Tabs, GlossaryTooltip, APIRequest } from "~/components";
9+
import { Details, Example, TabItem, Tabs, GlossaryTooltip, APIRequest, Render } from "~/components";
1010

1111
[Magic Transit](/magic-transit/) customers using BYOIP can also benefit from the performance, reliability, and security that Cloudflare offers for HTTP-based applications. [Service bindings](/byoip/service-bindings/) allow BYOIP customers to selectively route traffic on a per-IP address basis to the CDN pipeline (which includes [Cache](/cache/), [Web Application Firewall (WAF)](/waf/), and more).
1212

@@ -16,108 +16,33 @@ It is important to note that traffic routed to the CDN pipeline is protected at
1616

1717
## Before you begin
1818

19-
Although it is possible to add discrete bindings for non-contiguous CIDR blocks, implementing service bindings through an **aggregated** CIDR block is **strongly** recommended as it is more efficient.
20-
21-
<Details header="Example">
22-
23-
**Magic Transit protected prefix:** `203.0.113.0/24`
24-
25-
**IPs to upgrade to the CDN:**
26-
27-
`203.0.113.16`<br />
28-
`203.0.113.17`<br />
29-
`203.0.113.18`<br />
30-
`203.0.113.19`<br />
31-
`203.0.113.20`<br />
32-
`203.0.113.21`<br />
33-
`203.0.113.22`<br />
34-
`203.0.113.23`
35-
36-
Add one discrete CDN service binding for `203.0.113.16` with a `/29` netmask.
37-
38-
</Details>
39-
40-
Once a service binding is created (or deleted), it will take **four** to **six** hours to propagate across Cloudflare's global network. Services for the IP addresses in scope will likely be disrupted during this window.
41-
42-
:::note
43-
This guide assumes that the prefix is tied to a single Cloudflare account that has both Magic Transit and CDN properties. If you are using [prefix delegations](/byoip/concepts/prefix-delegations/), the service bindings must be [created](#2-create-service-binding) on the parent account.
44-
:::
19+
<Render
20+
file="service-bindings-prereqs"
21+
params={{
22+
pre_existing_product: "Magic Transit",
23+
added_product: "CDN"
24+
}}
25+
/>
4526

4627
## 1. Get account information
4728

48-
1. Log in to your Cloudflare account and get your [account ID](/fundamentals/setup/find-account-and-zone-ids/) and [API token](/fundamentals/api/get-started/create-token/). The token permissions should include `Account` - `IP Prefixes` - `Edit`.
49-
2. Make a `GET` request to the [List Services](/api/resources/addressing/subresources/services/methods/list/) endpoint and take note of the `id` associated with the CDN service.
50-
3. Use the [List Prefixes](/api/resources/addressing/subresources/prefixes/methods/list/) endpoint and take note of the `id` associated with the prefix (`cidr`) you will configure.
51-
52-
<Example>
53-
54-
At this point, continuing the [example](#before-you-begin), you should have a mapping similar to the following:
55-
56-
| Variables | Description |
57-
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
58-
| `{service_id}` | The ID of the CDN service within Cloudflare. <br /><br /> Example: `969xxxxxxxx000xxx0000000x00001bf` |
59-
| `{prefix_id}` | The ID of the Magic Transit protected prefix (`203.0.113.0/24`) you want to configure. <br /><br /> Example: `6b25xxxxxxx000xxx0000000x0000cfc` |
60-
61-
</Example>
62-
63-
4. To confirm you currently have a Magic Transit service binding and that it spans across your entire prefix, make a `GET` request to the [List Service Bindings](/api/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/list/) endpoint. Replace the `{prefix_id}` in the URI path by the actual prefix ID you got from the previous step.
64-
65-
<Example>
66-
67-
```bash
68-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings \
69-
--header "Authorization: Bearer <API_TOKEN>"
70-
```
71-
72-
</Example>
29+
<Render
30+
file="service-bindings-account-info"
31+
params={{
32+
pre_existing_product: "Magic Transit",
33+
added_product: "CDN"
34+
}}
35+
/>
7336

7437
## 2. Create service binding
7538

76-
:::caution[Caution]
77-
Once a service binding is created (or deleted), it will take four to six hours to propagate across Cloudflare's global network. Services for the IP addresses in scope will likely be disrupted during this window.
78-
:::
79-
80-
1. Make a `POST` request to the [Create service binding](/api/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/create/) endpoint, indicating the IP address you want to bind to the CDN. Specify the **corresponding network mask** as needed.
81-
82-
<Example>
83-
84-
Continuing the example, `203.0.113.100/32` designates an IP address that is within the Magic Transit protected prefix `203.0.113.0/24`.
85-
86-
Replace the `{prefix_id}` in the URI with your prefix ID from previous steps. Within the request body, the `cidr` value should correspond to the IP address or subnet that you are configuring for use with CDN.
87-
88-
```bash
89-
90-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings \
91-
--header "Authorization: Bearer <API_TOKEN>" \
92-
--header "Content-Type: application/json" \
93-
--data '{
94-
"cidr": "203.0.113.100/32",
95-
"service_id": "<SERVICE_ID>"
96-
}'
97-
```
98-
99-
In the response body, the initial provisioning state should be `provisioning`.
100-
101-
```json output {9}
102-
{
103-
"errors": [],
104-
"messages": [],
105-
"success": true,
106-
"result": {
107-
"cidr": "203.0.113.100/32",
108-
"id": "<CDN_SERVICE_BINDING_ID>",
109-
"provisioning": {
110-
"state": "provisioning"
111-
},
112-
"service_id": "<SERVICE_ID>",
113-
"service_name": "CDN"
114-
}
115-
}
116-
```
117-
118-
</Example>
119-
120-
You can periodically check the service binding status using the [List Service Bindings](/api/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/list/) endpoint.
39+
<Render
40+
file="service-bindings-create-binding"
41+
params={{
42+
pre_existing_product: "Magic Transit",
43+
added_product: "CDN"
44+
}}
45+
/>
12146

12247
## 3. Create address maps
12348

src/content/partials/byoip/service-bindings-account-info.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ params:
66

77
import { Example, APIRequest } from "~/components";
88

9-
1. Log in to your Cloudflare account and get your [account ID](/fundamentals/setup/find-account-and-zone-ids/) and [authentication key or token](/fundamentals/api/get-started/). If using an [API token](/fundamentals/api/get-started/create-token/), the permissions should include `Account` - `IP Prefixes` - `Edit`.
9+
1. Log in to your Cloudflare account and get your [account ID](/fundamentals/account/find-account-and-zone-ids/) and [authentication key or token](/fundamentals/api/get-started/). If using an [API token](/fundamentals/api/get-started/create-token/), the permissions should include `Account` - `IP Prefixes` - `Edit`.
1010
2. Make a `GET` request to the [List Services](/api/resources/addressing/subresources/services/methods/list/) endpoint and take note of the `id` associated with the {props.added_product} service.
1111
3. Use the [List Prefixes](/api/resources/addressing/subresources/prefixes/methods/list/) endpoint and take note of the `id` associated with the prefix (`cidr`) you will configure.
1212

0 commit comments

Comments
 (0)