
Filtering IP Routes 2-19
Software Version 2.7.5
C613-10454-00 REV A
How to configure an entry with a set clause
Once you have determined what routes a route map entry matches, you can
configure set clauses to change the characteristics of matching items.
To create a set clause for an entry, use one of the commands shown in the
following table.
Creating IP Route Filters
To create a route filter, use the command:
add ip route filter[=filter-id] ip=ipadd mask=ipadd
action={include|exclude} [direction={receive|send|both}]
[interface=interface] [nexthop=ipadd] [policy=0..7]
[protocol={any|ospf|rip}]
The protocol parameter specifies the routing protocol to which the filter
applies. When direction is receive, then protocol specifies the routing protocol
that receives the route information. If direction is send, protocol specifies the
routing protocol that advertises the routes.
When the routing protocol receives or transmits a route, it searches the list of
route filters for a match to the route. The ip, mask, interface, nexthop, and
policy parameters define a pattern to match against. The action parameter
determines whether routes matching the pattern are used or discarded.
The router or switch checks each route against each filter, starting with the
lowest-numbered filter, until it finds a match. Then it applies that filter and
stops processing the list of filters.
When you create a list of filters—even a list of only one filter—the router or
switch ends the list with an implicit filter to exclude all routes. So if you want
the router or switch to include all routes that do not match your filters, end
your filter list with a filter that matches all routes and includes them, such as:
add ip route filter=100 ip=*.*.*.* mask=*.*.*.*
action=include
Command Result
add ip routemap=routemap entry=1..4294967295
set metric=0..4294967295
Sets the OSPF metric of matching
routes. Routes with a lower metric
are preferred.
add ip routemap=routemap entry=1..4294967295
set type={1|2}
Sets the route type of matching
routes to External Type 1 or
External Type 2. See Routing with
OSPF in the OSPF chapter of the
Software Reference for more
information about route types.
add ip routemap=routemap entry=1..4294967295
set tag=1..65535
Tags the matching routes with an
ID number. You can then use the
tag to select routes to import into
BGP—see “Filtering when
copying routes to BGP” on
page 2-23.
Route map set clauses
for OSPF
Comentarios a estos manuales