Install guide
Chapter 2
Filtering IP Routes
Introduction ................................................................................................... 2-3
Types of Filters ............................................................................................... 2-4
About Prefix Lists ..................................................................................... 2-4
About AS Path Lists ................................................................................. 2-5
About Route Maps .................................................................................. 2-5
About IP Route Filters .............................................................................. 2-7
About IP Filters ........................................................................................ 2-8
Creating Filters ............................................................................................... 2-8
Creating Prefix Lists ................................................................................. 2-8
Creating AS Path Lists for BGP ................................................................. 2-9
Creating Route Maps for BGP .................................................................. 2-9
Creating Route Maps for OSPF .............................................................. 2-16
Creating IP Route Filters ........................................................................ 2-19
Creating IP Filters .................................................................................. 2-20
Applying Filters ............................................................................................ 2-20
Applying Filters When Writing to the RIB ............................................... 2-21
Applying Filters When Redistributing from the RIB ................................. 2-23
Applying Filters Before Advertising Routes ............................................. 2-26
Overview of Filters for each Route Source .................................................... 2-29
Border Gateway Protocol (BGP-4) .......................................................... 2-29
Open Shortest Path First (OSPF) ............................................................. 2-30
Routing Information Protocol (RIP) ......................................................... 2-32
Interface Routes .................................................................................... 2-32
Statically-Configured Routes .................................................................. 2-33
Configuration Examples ............................................................................... 2-34
Filtering When Writing BGP Routes to the RIB: Using an AS Path Filter ... 2-34
Filtering When Writing BGP Routes to the RIB: Using a Route Map ........ 2-35
Filtering Before Advertising Routes with BGP: Using an AS Path Filter .... 2-36
Filtering Before Advertising Routes with BGP: Using a Route Map .......... 2-37
Filtering Inbound and Outbound BGP Routes: Using Communities ......... 2-38
Filtering When Importing Routes from BGP to OSPF .............................. 2-39
Command Reference ................................................................................... 2-40
add ip aspathlist .................................................................................... 2-40
add ip communitylist ............................................................................. 2-42
add ip prefixlist ...................................................................................... 2-44
add ip route filter .................................................................................. 2-46
add ip routemap ................................................................................... 2-49
delete ip aspathlist ................................................................................ 2-56
delete ip communitylist ......................................................................... 2-57
delete ip prefixlist .................................................................................. 2-57
delete ip route filter ............................................................................... 2-58