match ip address
match ip address [access-list-number | access-list-name] [... access-list-number | ... access-list-name]
no match ip address [access-list-number | access-list-name] [... access-list-number | ... access-list-name]
access-list-number Number of a standard or extended access list. It can be an integer from 1 to 199. access-list-name Name of a standard or extended access list. It can be an integer from 1 to 199.
To distribute any routes that have a destination network number address that is permitted by a standard or extended access list, or to perform policy routing on packets, use the match ip address command in route-map configuration mode. To remove the match ip address entry, use the no form of this command.
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the access-list-number or access-list-name argument.
Like matches in the same route map subblock are filtered with "or" semantics. If any one match clause is matched in the entire route map subblock, this match is treated as a successful match. Dissimilar match clauses are filtered with "and" semantics. So dissimilar matches are filtered logically. If the first set of conditions is not met, the second match clause is filtered. This process continues until a match occurs or there are no more match clauses.
Use route maps to redistribute routes or to subject packets to policy routing. Both purposes are described in this section.
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria--the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions--the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The match route-map configuration command has multiple formats. The match commands can be given in any order, and all match commands must "pass" to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.
When you are passing routes through a route map, a route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
Another purpose of route maps is to enable policy routing. The match ip address command allows you to policy route packets based on criteria that can be matched with an extended access list. For example, a protocol, protocol service, and source or destination IP address. To define the conditions for policy routing packets, use the ip policy route-map interface configuration command, in addition to the route-map global configuration command, and the match and set route-map configuration commands. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria--the conditions under which policy routing occurs. The set commands specify the set actions--the particular routing actions to perform if the criteria enforced by the match commands are met. You might want to policy route packets based on their source, for example, using an access list.
In the following example, routes that have addresses specified by access list numbers 5 or 80 will be matched:Router(config)# route-map name Router(config-route-map)# match ip address 5 80
In the following policy routing example, packets that have addresses specified by access list numbers 6 or 25 will be routed to Ethernet interface 0:Router(config)# interface serial 0 Router(config-route-map)# ip policy route-map chicago Router(config)# route-map chicago Router(config-route-map)# match ip address 6 25 Router(config-route-map)# set interface ethernet 0
ip local policy route-map
match ip next-hop
match ip route-source
set default interface
set ip default next-hop verify-availability
set ip next-hop
set metric BGP OSPF RIP
� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education
|Converted from CHM to HTML with chm2web Pro 2.85 (unicode)|