Route map EcoRouter Documentation / Routing / Route map
Route-maps are used to control routing table creating and modifying and transmission of a route information on a network. Route-maps allow to use certain clauses on the advertised routes. If the route satisfies the condition specified in the match clause a certain action will be taken. The action should by specified by an administrator using the command set.
Route-map configuring
The route-map creation is to be made in the router's configuration mode. Use the route-map command and specify the route-map name. Then clauses which route information must satisfy and key words permit and deny should be specified. Then an operator's ID should be specified.
Use the route-map <name> permit/deny <operator ID> command to create route-map.
Then in the context configuration mode (route-map) specify clauses and actions which should be proceeded when certain clauses are satisfied. These parameters should be specified in pair clause-action.
EcoRouter(config)#route-map <name> permit/deny <ID>
EcoRouter(config-route-map)#match <requirement>
EcoRouter(config-route-map)#set <action>
If during the route-map creation an ID was not specified it's default value would be 10. An administrator must specify this parameter manually to configure clauses and rules of the same route-map. Use the match command to check the conditions shown in the tabel below.
Requirement | Description |
---|---|
as-path | The AS-path attribute which contains data matching specified in ip as-path access-list presents in BGP route |
community | The community attribute which contains data matching specified in ip community-list presents in BGP route |
extcommunity | The extcommunity attribute which contains data matching specified in ip extcommunity-list presents in BGP route |
interface | Matching to the outcamong interface of a local router according to a routing table |
ip address <policy-filter-list> | Matching the prefix to policy-filter-list |
ip address <prefix-list> | Matching the prefix to prefix-list |
ip nexthop | The next-hop route address checking |
ip peer | The BGP neighbor for a certain prefix checking |
metric | The route metric checking |
origin | The origin atribute value checking |
route-type | The route type for OSPF and IS-IS checking (external, internal, type-1, type-2) |
tag | The route's previously set up tag checking |
Using the set expression following actions can be done:
- BGP attributes setting (read more about en attribute settings by the set parameter in BGP section);
- route level setting for IS-IS protocol;
- metric type changing for OSPF and IS-IS by the metric-type expression;
- tagging the route by the tag expression.
Record handling in route-maps
Records in a route-map are processed in order from up to bottom as in case with standard or extended access list. If the route matches to any condition in the list further verification stops. The records numbering is used just to insert new or delete an appropriate records in route-map using the no parameter. If the last record in a route-map contains an empty condition with a key word permit, all undescribed options will be permitted. Else if this record is omitted all undescribed options will be denied.
To configure a route-map which will set the tag 7 into the only route 10.0.0.0/8 and delete subnets 11.0.0.0/8 11.0.0.0/24 from advertising use the following commands:
EcoRouter(config)#ip prefix-list 1 permit 10.0.0.0/8
EcoRouter(config)#ip prefix-list 2 permit 11.0.0.0/8 le 24
EcoRouter(config)#route-map TEST permit 1
EcoRouter(config-route-map)#match ip address prefix-list 1
EcoRouter(config-route-map)#set tag 7
EcoRouter(config-route-map)#route-map TEST deny 2
EcoRouter(config-route-map)#match ip address prefix-list 2
EcoRouter(config-route-map)#route-map TEST permit 3
To delete the 3 sequence use the no route-map TEST permit 3 command.
To display general route-map information use the show route-map <name> command.