What is prefix filtering?
Introduction. BGP filtering is used to control prefixes that are received and advertised to BGP peers. Prefixes exchanged between BGP peers should be controlled with inbound and outbound filters that can match on IP prefixes, AS paths or any other attributes of a BGP prefix (e.g. BGP communities).
Can a router filter traffic?
Routers then share status and routing information to other routers so that they can provide better traffic management and bypass slow connections. In addition, routers provide additional functionality, such as the capability to filter messages and forward them to different places based on various criteria.
How does advertising BGP routes to neighbors work?
BGP routers take routes from the local BGP table and advertise a subset of those routes to their BGP neighbors. This section continues focusing on the BGP table because the BGP route advertisement process takes routes from the BGP table and sends them to neighboring routers, where the routes are added to the neighbors’ BGP tables.
How to filter a network from a BGP peer?
Route filtering is the basis by which Border Gateway Protocol (BGP) policies are set. There are number of ways to filter one or more networks from a BGP peer, including Network Layer Reachability Information (NLRI) and AS_Path and Community attributes. This document discusses filtering based on NLRI only.
Can a BGP router inject routes into a local router?
The previous section focused on the tools that BGP can use to inject routes into a local router’s BGP table. BGP routers take routes from the local BGP table and advertise a subset of those routes to their BGP neighbors.
How can I filter or block a default route?
You can filter or block a default route, such as 0.0.0.0/32 being advertised by the BGP peer, using the prefix-list command. You can see the 0.0.0.0 entry available using the show ip bgp command. The sample configuration in this section is performed on Router 100 using the ip prefix-list command.