| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/byoip/service-bindings/ | [Back] [Original] |
In the context of BYOIP, service bindings map traffic destined for IP addresses to the Cloudflare service it should be routed through - such as Magic Transit, CDN, or Spectrum. A default binding covering the entire prefix is required when you first onboard, and additional bindings can be created at any time to route specific IP addresses or CIDR ranges to a different service.
For example, you could set Magic Transit as the default service for Layer 3 DDoS protection across the entire prefix, while directing specific IPs to the CDN for Layer 7 processing. Refer to Scope for the available combinations.
Note
API-only: Service binding operations are currently only available via API. You can find all endpoints and their specifications in the Cloudflare API documentation. For detailed guidance, refer to the sections and tutorials linked below.
Time to propagate: Service bindings take four to six hours to propagate across Cloudflare's global network after being created or deleted. Services for the IP addresses in scope are likely disrupted during this window.
Customers using BYOIP with Magic Transit, CDN services, or Spectrum can leverage the service binding API endpoints to selectively route traffic through the CDN 1 or Spectrum 2 pipelines on a per-IP address basis. This means:
203.0.113.0/24, you can upgrade 203.0.113.1 to CDN and 203.0.113.2 to Spectrum.203.0.113.0/24, you can upgrade 203.0.113.1 to Spectrum.203.0.113.0/24, you can upgrade 203.0.113.1 to CDN.Refer to Magic Transit with CDN or CDN and Spectrum for detailed guidance.
Caution
Magic Transit customers must ensure that their contract includes CDN and/or Spectrum according to their needs.
When a service binding of type CDN is applied, once the change has propagated across Cloudflare's global network (four to six hours), any HTTP requests are directed into the CDN pipeline for Layer 7 processing.
When a service binding of type Spectrum is applied, once the change has propagated across Cloudflare's global network (four to six hours), any TCP/HTTP requests are directed into the Spectrum pipeline for Layer 4 or Layer 7 processing.
UDP applications
Spectrum UDP applications are supported with BYOIP, including CDN and Spectrum service bindings. However, they are not currently supported with Magic Transit service bindings.
Note
Magic Transit can only be used as default binding, spanning across your entire prefix. You can then add CDN or Spectrum for smaller subnets but not the other way around.
The entire BYOIP prefix is primarily announced for Magic Transit, providing layer 3 DDoS protection and acceleration. Traffic not explicitly bound to CDN will flow through Magic Transit.
Also, traffic egressing to an IP in the prefix will always go to Magic Transit, even if there is an overlapping binding for CDN or Spectrum. This allows customers who want to use the same IP as ingress IP and as origin IP to do so.
flowchart LR
accTitle: Cloudflare as a reverse proxy
accDescr: Diagram showing Cloudflare's network between clients and the origin server.
A[Client] --ingress--> B((Cloudflare))--egress--> C[(Origin server)]
When adding a service binding for a given IP address, it must be either a CDN service binding or a Spectrum service binding. It is not possible (or necessary) to bind both services.
Dedicated CDN Egress IPs (formerly known as Aegis) is only available for Enterprise. If you are interested, reach out to your account team. Also note that a single BYOIP prefix can be used for either CDN ingress or CDN egress, but not both.
| Web Proxy Viewer | New URL | Original Page |