M Commands
This chapter describes the Cisco NX-OS Policy Based Routing (PBR) commands that begin with M.
match ip address
To perform policy routing on packets, use the match ip address command. To remove the match ip address entry, use the no form of this command.
match ip address access-list-name
no match ip address access-list-name
Syntax Description
Name of a standard or expanded access list. It can be any alphanumeric string up to 63 characters. |
Command Default
Command Modes
Route-map configuration (config-route-map)
Command History
|
|
---|---|
Usage Guidelines
The access-list-name argument is supported in route maps for Policy based-routig (PBR) only.
The match ip address command allows you to perform policy route packets based on criteria that can be matched with an 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 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 whichpolicy 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.
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. 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.
Examples
This example shows how to match routes that have addresses specified by an access list test:
|
|
---|---|
Indicates where to output packets that pass a match clause of a route map for policy routing. |
match ipv6 address
To perform policy routing on packets, use the match ipv6 address command in route-map configuration mode. To remove the match statement from the route map, use the no form of this command.
match ipv6 address access-list-name
no match ipv6 address access-list-name
Syntax Description
Name of a standard or expanded access list. It can be any alphanumeric string up to 63 characters. |
Command Default
Command Modes
Route-map configuration (config-route-map)
Command History
|
|
---|---|
Usage Guidelines
The access-list-name argument is supported in route-maps for PBR only.
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.
Examples
This example shows how to match routes that have addresses specified by the access list named red:
|
|
---|---|
Indicates where to output packets that pass a match clause of a route map for policy routing. |