BGP fundamentalsPublished on 23 May 2026Reading time: 14 min
How BGP works: prefixes, AS paths, routing decisions and DDoS impact
BGP is the protocol that lets networks announce reachability to each other. Understanding prefixes, AS paths, communities and route preference is essential before buying protected transit.
BGP announces prefixes
An AS tells other networks which IP blocks it can reach.
Best route is policy
AS path, local-pref, MED and communities influence decisions.
DDoS depends on routing
Attracting, moving or withdrawing a route changes exposure.
BGP, Border Gateway Protocol, is the protocol autonomous networks use to exchange routes on the Internet. When a network announces an IPv4 or IPv6 prefix, it tells the world where those addresses can be reached. BGP does not carry user packets; it carries routing decisions. This distinction matters for DDoS protection: mitigation often starts by steering traffic toward a network that can absorb it, filter it and return legitimate traffic cleanly.
Protected IP transit
Peeryx makes BGP design operational
Peeryx can integrate your ASN, under-ASN, AS-SET, tunnels or cross-connect so routing and mitigation stay understandable.
Calling BGP “the protocol of the Internet” is true but not enough. BGP is an announcement system between autonomous systems. Each network publishes prefixes, receives routes and chooses according to local policy.
This distributed nature is powerful and sometimes counter-intuitive. Different ISPs may choose different paths. A more-specific route can attract more traffic. A community can ask a transit provider to change preference, prepend or blackhole. For protected transit, these details are operational, not academic.
BGP attributes are not universal commands. Local preference is usually internal to one network, AS path prepending may or may not influence remote networks, and MED is often ignored across provider boundaries. This is why testing with real upstreams matters.
Why this matters
BGP matters for DDoS because it controls where traffic lands before filtering. If a prefix is announced only behind a small port, a volumetric attack may saturate the link before servers can respond.
Clean delivery matters as much. After scrubbing, traffic must return through tunnel, cross-connect or another defined model. Without a clear BGP design, asymmetry and route conflicts appear during incidents.
In DDoS mitigation, the most-specific accepted route often wins. A /24 IPv4 announcement can attract traffic away from a larger aggregate. That is useful for mitigation, but dangerous if it is not coordinated with RPKI, IRR objects and prefix filters.
For search and onboarding, this distinction should be explained plainly on the page. Buyers are often comparing providers that all claim large capacity; the differentiator is whether the routing and mitigation model can be audited before an outage.
Possible solutions
Classic customer eBGP lets the customer announce prefixes and control routing with full table or default route.
Provider-operated announcement is simpler for customers without deep routing skills, but it must remain transparent.
The mitigation model announces the prefix toward the DDoS network, filters traffic and delivers clean traffic through GRE, IPIP, VXLAN, router VM or cross-connect.
Default route is enough for many protected customers because inbound traffic is the main exposure. Full table becomes useful when the customer wants detailed egress control, traffic engineering or multiple transit relationships.
A practical design should include acceptance criteria: expected latency, maximum tolerated packet loss during mitigation, handoff bandwidth, escalation contacts and the exact conditions under which a disruptive control such as blackhole may be used.
Customer eBGP
Strong control, more operational skill.
Operated announcement
Easy start, needs provider transparency.
Protected transit
Traffic is attracted, filtered and cleanly delivered.
BGP element
Role
DDoS impact
Prefix
Announced IP block
Defines what is protected
AS path
AS sequence
Influences traffic attraction
Community
Operator instruction
Can change preference or blackhole
Turning BGP decisions into predictable protected routing
Peeryx treats BGP as a control plane, not a slogan. We define who announces the prefix, which AS is used, prefix limits, communities, handoff and return path.
In protected IP transit, BGP attracts traffic to mitigation capacity. The DDoS layer filters it, then clean traffic is delivered through the chosen integration.
For gaming and hosting, this clarity prevents latency surprises, unstable sessions and routes that only work on paper.
Peeryx uses this distinction during scoping. A customer may need full routing control, or may simply need its prefix protected and clean traffic returned. The design should not be more complex than the operational team can maintain.
BGP included
Protected transit can include BGP, under-ASN and AS-SET support.
Flexible delivery
GRE, IPIP, VXLAN, router VM or cross-connect.
Operator mindset
Prefixes, capacity, sessions and return path are discussed from day one.
A hoster owns a /24 and wants to protect several customers. It announces the prefix to Peeryx, attracts traffic to mitigation and receives clean traffic back while customers keep their IPs.
A customer without an ASN may use Peeryx protected IPs. BGP still exists behind the product, but the customer sees a simpler integration. In both cases, the path must be tested and monitored.
Before production, a route should be tested from several external vantage points. Looking only from the customer router proves that the session is up; it does not prove that the Internet sees the intended origin and path.
Frequent mistakes
BGP mistakes often appear only under load, when a provider changes preference or when an attack forces the network onto paths that were never tested.
Another mistake is treating BGP changes like harmless configuration edits. Route propagation, filters and cache effects can make rollback slower than expected, so changes need staged procedures.
Thinking BGP filters packets like a firewall.
Announcing a prefix without defining clean return path.
Ignoring IPv4/IPv6 prefix limits.
Using more-specific routes without policy.
Skipping RPKI/ROA and basic routing hygiene.
FAQ
Is BGP mandatory for DDoS protection?
No. Protected IPs and tunnels can work, but BGP is valuable when protecting your own prefixes.
Does BGP choose the shortest path?
Not necessarily. It follows policy and attributes.
Do I need a full routing table?
Not always. Some customers use default route; others need full table for egress control.
Does BGP stop DDoS?
No. It steers traffic. Filtering requires a DDoS layer.
Conclusion
BGP is not magic, but it is one of the most important levers in a serious DDoS design. It decides where traffic goes and how mitigation can be inserted without renumbering every customer. A good provider must explain routing as clearly as filtering capacity.
Resources
Related reading
To go deeper, here are other useful pages and articles.
Send us your prefixes, current upstreams, traffic baseline and latency constraints. We will map the clean-traffic delivery model before talking about price.