Skip to content

Commit 0b19881

Browse files
Add example for aggregated CIDR in additional bindings
1 parent e0164a8 commit 0b19881

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

src/content/docs/byoip/get-started.mdx

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 2
66
---
77

8-
import { APIRequest, Tabs, TabItem, GlossaryDefinition } from "~/components";
8+
import { APIRequest, Tabs, TabItem, GlossaryDefinition, Details } from "~/components";
99

1010
Work with your account team to make sure your contract covers everything you need to onboard your prefix. Cloudflare requires service-specific configurations, as well as some requirements common to all BYOIP customers.
1111

@@ -124,9 +124,10 @@ Once the ownership validation is successful, you can remove the token.
124124
When all validations pass - RPKI, IRR, and ownership - the `approved` field in your prefix will return `"V"`. This means you can proceed to create IP address service bindings[^1].
125125
126126
If needed, you can use the [Prefix Details endpoint](/api/resources/addressing/subresources/prefixes/methods/get/) to check if any issues were found during validation. If so, proceed with the necessary changes and make a request to restart validation.
127+
127128
<APIRequest path= "/accounts/{account_id}/addressing/prefixes/{prefix_id}" method="GET" />
128129
129-
(WIP - Add response example (collapsable))
130+
(WIP - Add response example (collapsable))
130131
131132
(WIP - Add code block example for "/accounts/account_id/addressing/prefixes/prefix_id/validate")
132133
@@ -192,11 +193,38 @@ The steps below only cover assigning specific IPs to additional services. For gu
192193
193194
1. Plan for what IP(s) will get the additional binding. Cloudflare **strongly** recommends implementing service bindings through an **aggregated** CIDR block, as it is more efficient than adding discrete bindings for non-contiguous CIDR blocks.
194195
195-
(WIP - Add collapsable example similar to existing ones in the service bindings docs)
196+
<Details header="Example">
197+
198+
**Magic Transit protected prefix:** `203.0.113.0/24`
199+
200+
**IPs to upgrade to CDN:**
201+
202+
`203.0.113.16`<br />
203+
`203.0.113.17`<br />
204+
`203.0.113.18`<br />
205+
`203.0.113.19`<br />
206+
`203.0.113.20`<br />
207+
`203.0.113.21`<br />
208+
`203.0.113.22`<br />
209+
`203.0.113.23`
210+
211+
Add one discrete CDN service binding for `203.0.113.16` with a `/29` netmask.
212+
213+
</Details>
196214
197215
2. 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 or Spectrum. Specify the **corresponding network mask** as needed.
198216
199-
<APIRequest path="/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings" method="POST"json={{ "cidr": "203.0.113.100/32", "service_id": "<SERVICE_ID>"}} code={{mark: [6, 7]}}/>
217+
<APIRequest
218+
path="/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings"
219+
method="POST"
220+
json={{
221+
"cidr": "203.0.113.16/29",
222+
"service_id": "<SERVICE_ID>"
223+
}}
224+
code={{
225+
mark: [6, 7]
226+
}}
227+
/>
200228
201229
In the response body, the initial provisioning state should be `provisioning`.
202230
@@ -208,7 +236,7 @@ In the response body, the initial provisioning state should be `provisioning`.
208236
"messages": [],
209237
"success": true,
210238
"result": {
211-
"cidr": "203.0.113.100/32",
239+
"cidr": "203.0.113.16/29",
212240
"id": "<SERVICE_BINDING_ID>",
213241
"provisioning": {
214242
"state": "provisioning"

0 commit comments

Comments
 (0)