A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

BGP Route Filtering and Hijacking Prevention

Graduate Depth 100 in the knowledge graph ☐ I know this ☆ Set as goal
1topic build on this
622prerequisites beneath it
See this on the map →
BGP: Border Gateway ProtocolNetwork Security: Firewalls, Filtering, and Threat Models→→Routing Convergence, Flapping, and Damping
routing bgp security hijacking

Core Idea

BGP route hijacking occurs when unauthorized ASes announce prefixes they do not own or should not announce. Prevention mechanisms include route filtering (accepting only authorized prefixes from peers), prefix lists, AS-PATH filtering, and RPKI (Resource Public Key Infrastructure). Inbound and outbound filters enforce routing policies and prevent propagation of invalid routes.

How It's Best Learned

Configure inbound route filters on a BGP router using prefix lists and AS-PATH filters. Simulate a route hijack by announcing a legitimate prefix from an unauthorized AS. Deploy RPKI validation and observe its effect on route acceptance. Monitor BGP RIB (Routing Information Base) changes.

Common Misconceptions

BGP does not verify that an AS owns a prefix; it relies on filtering and RPKI. AS-PATH filtering is not foolproof against path manipulation. Default-deny filtering is essential; permitting all routes by default opens the network to hijacking.

Explainer

From your understanding of BGP, you know that autonomous systems (ASes) exchange reachability information by announcing the IP prefixes they can route to, and that BGP routers select the best path based on attributes like AS-PATH length and local preference. What BGP fundamentally lacks, however, is any built-in mechanism to verify that an AS actually has the right to announce a given prefix. If AS 64500 announces that it can route traffic for 198.51.100.0/24, BGP peers have no native way to confirm whether AS 64500 legitimately owns that address block. This trust-by-default design is the root of the route hijacking problem.

A route hijack occurs when an AS announces a prefix it does not own, either maliciously or by misconfiguration. Neighboring ASes accept the announcement, propagate it further, and traffic destined for the legitimate owner gets redirected to the hijacker. A particularly effective variant is announcing a more-specific prefix — if the legitimate owner announces 198.51.100.0/24, the hijacker announces 198.51.100.0/25 and 198.51.100.128/25. Because routers prefer the longest matching prefix, traffic follows the hijacker's more-specific routes. Real-world incidents have redirected traffic for major services, financial institutions, and even government networks, sometimes for hours before detection.

The first line of defense is route filtering: explicitly configuring which prefixes you will accept from each BGP peer and which you will announce. Prefix lists define the exact address blocks a peer is authorized to send you — anything not on the list is rejected. AS-PATH filters verify that the AS path in an announcement matches expected patterns; for example, you might only accept routes from a customer AS if that customer's AS number appears in the path. The cardinal rule is default-deny: reject everything not explicitly permitted. Operators who accept all routes by default are one misconfiguration away from propagating a hijack across the internet.

RPKI (Resource Public Key Infrastructure) adds cryptographic verification to this process. Regional Internet Registries (RIRs) issue digital certificates called Route Origin Authorizations (ROAs) that bind an IP prefix to the AS number authorized to originate it. When a BGP router receives an announcement, it can validate the origin AS against the ROA database. If the announcement's origin AS does not match any valid ROA, the route is marked as "invalid" and can be rejected or deprioritized. RPKI does not prevent all forms of hijacking — it validates origin but not the full path — but it addresses the most common scenario of unauthorized prefix origination. Combined with disciplined filtering, BGP monitoring services, and community coordination, RPKI moves BGP security from pure trust toward cryptographic verification, closing the most dangerous gap in the internet's routing infrastructure.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Conditional Statements → Defining and Calling Functions → Functions: Decomposing Problems → Function Parameters and Argument Passing → Return Values → Variable Scope → Introduction to Classes → Objects and Instances → Methods and Attributes → Algorithm Design Basics → Tree Structure and Node Properties → Binary Trees → Tree Traversals → Depth-First Search (DFS) → Depth-First Search: Implementation and Applications → Topological Sort → Dynamic Programming → Longest Common Subsequence (LCS) Problem → Edit Distance: Levenshtein Distance and DP → 0/1 Knapsack Problem: Bounded Capacity DP → Greedy Algorithms → Activity Selection Problem Using Greedy Algorithms → Dijkstra's Algorithm → Floyd-Warshall Algorithm for All-Pairs Shortest Paths → Bellman-Ford Algorithm → Bellman-Ford Algorithm and Distance-Vector Routing → Distance-Vector Routing Protocols → BGP: Border Gateway Protocol → BGP Route Filtering and Hijacking Prevention

Longest path: 101 steps · 622 total prerequisite topics

Prerequisites (2)

Leads To (1)