Route filtering empowers a BGP speaker to choose what routes
to exchange with any of its BGP peers. Route filtering is the cornerstone of
policy routing. For example, an AS can identify inbound traffic that it is
willing to accept by filtering its outbound advertisements. Conversely, an AS
can control what routes its outbound traffic uses by specifying the routes to
accept from EBGP neighbors.
Policies that are even more precise can be defined via route
filters. For example, BGP routes passing through a filter can have their
attributes manipulated to affect the best-path decision process.
Both the inbound and outbound filtering concepts can be
applied between peers and between routing protocols running on a single router
(see the figure).
At the peer level, inbound filtering indicates that the
BGP speaker is filtering routing updates coming from other peers, and outbound
filtering limits the routing updates advertised from this BGP speaker towards
other peers.
At the protocol level, inbound filtering limits the
routing updates being redistributed into a protocol. Outbound filtering limits
the routing updates being injected from this protocol. With respect to BGP, for
example, inbound filtering limits the updates being redistributed from other
protocols into BGP. Outbound filtering limits the updates being redistributed
from BGP into an IGP.
The following sections examine the use of filters to
implement routing policy and the use of distribute lists and prefix lists to
filter routing updates.