Install guide
2-20 Release Note
Software Version 2.7.5
C613-10454-00 REV A
Creating IP Filters
To create an IP filter that will filter routes, use the command:
add ip filter=300..399 action={include|exclude} source=ipadd
[smask=ipadd] [entry=1..255]
The source parameter is the network IP address of the subnet to be filtered.
The smask parameter determines how many bits of the prefix are significant.
When the router or switch checks routes against the filter, it only checks the
significant bits.
By default, new entries are added at the end of the filter. If you want the entry
to be checked before some of the other entries, give it a lower entry number.
This pushes existing entries with the same or higher number further down the
list.
You can only use such filters when importing BGP routes into OSPF (see
“Applying Filters When Redistributing from the RIB” on page 2-23).
When you are importing routes from BGP into OSPF, you can also limit the
total number of routes, by using the bgplimit parameter of the set ospf
command. This limit overrides the effect of the filter—for example, if 2000
routes match the filter but the limit is 1000 routes, only the first 1000 matching
routes will be imported. This means you should either:
■ make sure that the BGP limit is set higher than the maximum possible
number of routes that match your filters, or
■ assign low entry numbers to the filter entries that match the most preferred
BGP routes. That way, if the number of routes reaches your limit, OSPF will
have imported the most important routes.
Applying Filters
This section describes how to apply the filters you have created, to achieve the
following results:
■ Applying Filters When Writing to the RIB
■ Applying Filters When Redistributing from the RIB
■ Applying Filters Before Advertising Routes.
For BGP, you can apply several types of filter to each peer. If you do this, the
router or switch first applies the AS path filter, then the prefix filter, then the
route map. Note that the router or switch stops checking after the first filter
entry that excludes the update or prefix, so an update or prefix is only included
if all the applied filters result in it being included.