match ip

Configures matching based on an IPv4 source or destination prefix for a route-map sequence number.

Syntax

match ip { source-address | destination-address } ip-address/ip-mask
no match ip { source-address | destination-address } ip-address/ip-mask

Command Default

IPv4 source or destination prefix matching is not configured.

Parameters

source-address
Specifies matching based on source IP address.
destination-address
Specifies matching based on destination IP address.
ip-address/ip-mask
Specifies an IPv4 address and mask.

Modes

Route-map configuration mode

Usage Guidelines

Only one match ip configuration is allowed per route-map sequence number.

When both match ip source-address and match ip destination-address are configured, a match occurs when traffic matches both the configured source address and the configured destination address.

The no form of the command disables the configuration.

Examples

The following example shows how to configure matching based on a source address (10.2.0.1/16) for sequence number 4 in a route-map named rm.

device# configure terminal
device(config)# route-map rm permit 4
device(config-route-map-rm/permit/4)# match ip source-address 10.2.0.0/16