Table Of Contents
M Commands
match ip address
match ipv6 address
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
access-list-name
|
Name of a standard or expanded access list. It can be any alphanumeric string up to 63 characters.
|
Command Default
None
Command Modes
Route-map configuration (config-route-map)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modified
|
6.0(2)N2(1)
|
This command was introduced.
|
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.
This command requires the Enterprise Services license.
Examples
This example shows how to match routes that have addresses specified by an access list test:
switch# configure terminal
switch(config)# feature pbr
switch(config)# interface ethernet 2/10
switch(config-if)# ip policy route-map chicage
switch(config)# route-map chicagoe
switch(config-route-map)# match ip address test
Command
|
Description
|
set ip next-hop
|
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
access-list-name
|
Name of a standard or expanded access list. It can be any alphanumeric string up to 63 characters.
|
Command Default
No access list name is specified.
Command Modes
Route-map configuration (config-route-map)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modified
|
6.0(2)N2(1)
|
This command was introduced.
|
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.
This command does not require a license.
Examples
This example shows how to match routes that have addresses specified by the access list named red:
switch# configure terminal
switch(config)# feature pbr
switch(config)# route-map blue
switch(config-route-map)# match ipv6 address red
Command
|
Description
|
set ip next-hop
|
Indicates where to output packets that pass a match clause of a route map for policy routing.
|