Defines a variety of match conditions for a route map.
Syntax
matchas-pathnamematchcommunitynameexact-match]matchextcommunitynumbermatch interface{ethernetslot/port|loopback
num|ve-interface vlan_id}match ip address{aclname[prefix-liststring]|prefix-liststring[aclname}match ip next-hopprefix-liststringmatch ip route-sourceprefix-liststringmatch ipv6 next-hopprefix-liststringmatch ipv6 route-sourceprefix-liststringmatch metricnummatch protocol bgp{external|internal|static-network}match protocol staticmatch route-type{internal|type-1|type-2}match tagnummatch vrfnameno match as-pathno match communityno match extcommunityno match interfaceno match ip addressno match ip next-hopno match ip route-sourceno match ipv6 addressno match ipv6 next-hopno match ipv6 route-sourceno match metricno match protocolno match route-typeno match tag
Command Default
This option is disabled.
Parameters
as-path
Matches an AS-path access list name in a route-map instance.
name
Name of an AS-path access list. Range is from 1 through 32 ASCII characters.
community
Matches a BGP community access list name in a route-map instance.
name
Name of a BGP community access list. Values range from 1 through 32 ASCII characters.
exact-match
Matches a route only if the route community attributes field contains the same community numbers specified in the
match statement.
extcommunitynumber
Matches a BGP extended community list in a route-map instance and specifies an extended community list number. Valid values range from 1 through 99.
interface
Matches interface conditions in a route-map instance.
ethernet
Specifies an ethernet interface.
slot
Specifies a valid slot number. If the
device does not have linecards, specify
0.
port
Specifies a valid port number.
loopbacknum
Specifies a loopback interface.
ve-interfacevlan_id
Specifies a virtual Ethernet VLAN interface.
ip address
Matches an IP address in a route-map instance.
aclname
Name of the access list. Range is from 1 through 32 ASCII characters.
prefix-liststring
Specifies an IP prefix list. Range is from 1 through 32 ASCII characters.
ip next-hop
Matches IP next-hop match conditions in a route-map instance.
ip route-source
Matches an IP route source in a route-map instance.
ipv6 address
Matches an IPv6 address in a route-map instance.
ipv6 next-hop
Matches IPv6 next-hop match conditions in a route-map instance.
ipv6 route-source
Matches an IPv6 route source in a route-map instance.
metricnum
Matches a route metric in a route-map instance. Values range from 0 through 4294967295.
protocolbgpexternal
Matches on BGP routes.
protocolbgpinternal
Matches on iBGP routes.
protocolbgpstatic-network
Matches on BGP4 static network routes. This is applicable only for BGP outbound policy.
protocolstatic
Matches on static routes.
route-type
Matches a route type in a route-map instance.
internal
Internal route type
type-1
OSPF external route type 1
type-2
OSPF external route type 2
tagtag-value
Specifies a route tag and route tag value.
vrfname
Specifies a non-default VRF. Valid values range from 0 through 4294967295.
Modes
Route-map configuration mode
Usage Guidelines
For non-BGP route-maps, refer to the following
topics:
match ip address acl
match ipv6 address acl
The
no form of the command restores the default.
Examples
The following example matches AS-path ACL 1 in route-map instance “myroutes”.