Skip to content

Lesson 6 of 9 · 25m

Policy, Filtering, and Controlled Propagation

Inbound and outbound filters, prefix lists, AS-path filters, maximum prefixes, and route maps are the guardrails that stop mistakes from becoming global incidents.

The most important BGP lesson is this: default accept and default advertise are not safe defaults. Every session should answer two explicit questions — what are we willing to hear, and what are we willing to say? If those answers are not written in configuration, the router will happily help propagate somebody else's mistake.

Filter inbound and outbound independently

A minimal policy shape is:

inbound customer:   accept only prefixes customer is authorized to originate
outbound customer:  announce customer routes plus downstream customer routes
inbound peer:       accept only routes appropriate for a peer relationship
outbound peer:      announce only your routes and customer routes
inbound transit:    broad accept, but sanity-filter bogons and invalids
outbound transit:   announce customer cone, never learned peer/transit routes

Notice that inbound and outbound are not symmetric. A transit provider may legitimately send you most of the DFZ; you must not send the same set back.

Prefix lists are necessary but insufficient

ip prefix-list CUST-IN seq 10 permit 203.0.113.0/24 le 32
ip prefix-list CUST-IN seq 100 deny 0.0.0.0/0 le 32

This validates the prefix shape, not whether the AS path or origin makes sense. Combine it with RPKI validation, IRR-derived filtering where practical, maximum-prefix limits, and relationship-aware route policy.

Bogon and sanity filtering

At minimum, do not accept or propagate obvious garbage:

0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8
169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16
224.0.0.0/4 multicast
240.0.0.0/4 reserved
your own space arriving from outside

Exact bogon policy depends on context. Documentation prefixes such as 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 must never be routed globally. IPv6 has its own bogon list; do not improvise it from IPv4 memory.

Maximum-prefix limits save sessions and networks

A neighbor accidentally sending you the full table when you expected fifty routes should hit a hard ceiling:

neighbor 192.0.2.1 maximum-prefix 100 90 restart 15

The exact syntax varies, but the concept is universal. Warning thresholds give you telemetry; hard limits cap the blast radius. Decide whether automatic restart is acceptable — sometimes a session staying down is safer than repeatedly oscillating.

RPKI: use it, but understand what it does

RPKI origin validation tells you whether the origin AS is authorized for the prefix and length. Typical states are valid, invalid, and not found. Dropping invalid routes is increasingly normal. Do not confuse this with full path validation: RPKI does not prove every AS in the path intended to propagate the route.

Field notes

  • Apply policy to every address family explicitly; IPv4-only filtering leaves IPv6 wide open.
  • Deny-by-default outbound is safer than enumerate-bad-things inbound; test route-policy changes on one session before applying them broadly.
  • Keep generated prefix lists versioned and reviewable; automated IRR generation still needs operational ownership.
  • If a route is missing, inspect both directions: you may have filtered it inbound, or your neighbor may have filtered your announcement.

Was this lesson helpful?

Sign in to rate