API Guide

A route prefix is an IP address pattern that matches on bits within the IP address. The format of a route prefix is A.B.C.D/x,
where A.B.C.D is a dotted-decimal address and /x is the number of bits that match the dotted decimal address.
When the route prefix matches a filter, the system drops or forwards the packet based on the filters designated action. If the
route prefix does not match any of the filters in the prefix-list, the route drops, an implicit deny.
For example, in 112.24.0.0/16, the first 16 bits of the address 112.24.0.0 match all addresses between 112.24.0.0 to
112.24.255.255. Use permit or deny filters for specific routes with the le (less or equal) and ge (greater or equal)
parameters, where x.x.x.x/x represents a route prefix:
To deny only /8 prefixes, enter deny x.x.x.x/x ge 8 le 8
To permit routes with the mask greater than /8 but less than /12, enter permit x.x.x.x/x ge 8 le 12
To deny routes with a mask less than /24, enter deny x.x.x.x/x le 24
To permit routes with a mask greater than /20, enter permit x.x.x.x/x ge 20
The following rules apply to prefix-lists:
A prefix-list without permit or deny filters allows all routes
An implicit deny is assumed the route drops for all route prefixes that do not match a permit or deny filter
After a route matches a filter, the filters action applies and no additional filters apply to the route
NOTE: Use prefix-lists in processing routes for routing protocols such as open shortest path first (OSPF), route table
manager (RTM), and border gateway protocol (BGP).
To configure a prefix-list, use commands in PREFIX-LIST and ROUTER-BGP modes. Create the prefix-list in PREFIX-LIST mode
and assign that list to commands in ROUTER-BGP modes.
Route-maps
Route-maps are a series of commands that contain a matching criterion and action. They change the packets meeting the
matching criterion. ACLs and prefix-lists can only drop or forward the packet or traffic while route-maps process routes for
route redistribution. For example, use a route-map to filter only specific routes and to add a metric.
Route-maps also have an implicit deny. Unlike ACLs and prefix-lists where the packet or traffic drops, if a route does not
match the route-map conditions, the route does not redistribute.
Route-maps process routes for route redistribution. For example, to add a metric, a route-map can filter only specific routes.
If the route does not match the conditions, the route-map decides where the packet or traffic drops. The route does not
redistribute if it does not match.
Route-maps use commands to decide what to do with traffic. To remove the match criteria in a route-map, use the no
match command.
In a BGP route-map, if you repeat the same match statements; for example, a match metric, with different values in the
same sequence number, only the last match and set values are taken into account.
Configure match metric
OS10(config)# route-map hello
OS10(conf-route-map)# match metric 20
View route-map
OS10(conf-route-map)# do show route-map
route-map hello, permit, sequence 10
Match clauses:
metric 20
Change match
OS10(conf-route-map)# match metric 30
View updated route-map
OS10(conf-route-map)# do show route-map
route-map hello, permit, sequence 10
Match clauses:
metric 30
Access Control Lists
1121