# Route-map Configuration Mode Commands

The Route-Map Configuration sub-mode is used for the OSPFv2 and BGP-4 routing protocols. This mode includes commands that configure matching rules and set actions to perform on matched routes.

IMPORTANT:

The commands or keywords/variables that are available are dependent on platform type, product version, and installed license(s).
end

Exits the current configuration mode and returns to the Exec mode.
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    end

Usage:

Use this command to return to the Exec mode.
exit

Exits the current mode and returns to the parent configuration mode.
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    exit

Usage:

Use this command to return to the parent configuration mode.
match as-path

Matches an Autonomous System (AS) path access list
Platform:

ASR 5000

ASR 5500
Product:

HA
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    as-path AS_list

no

Disables matching the specified AS path access list.
AS_list

Specifies the name of an AS path access list for matching as an alphanumeric string of 1 through 79 characters.
Usage:

This command is used for BGP-4 routing to specify an AS path access list to be matched. Refer to the ip as-path access-list command for more information.
Example:
To match entries in an AS path access list named ASlist1, enter the following command;

    match as-path ASlist1

match interface

Specifies the next-hop interface name of a route to be matched.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    interface interface-name

no

Disables matching the specified interface name.
interface-name

Specifies the name of the virtual interface for matching as an alphanumeric string of 1 through 79 characters.
Usage:

Use this command to specify the next hop interface name for routes to be matched.
Example:
To match routes that have the next hop interface specified as Interface123, enter the following command:

    match interface Interface123

To disable matching routes that have the next hop interface specified as Interface123, enter the following command:

    no match interface Interface123

match ip address

Matches routes with entries in a route-access-list or prefix-list.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    ip address { prefix-list | route-access-list } list_name

no

Disables matching from the specified prefix list or route access list.
prefix-list

Matches any routes with entries in a prefix-list.
route-access-list

Matches any routes with entries in a route-access-list
list_name

Specifies the name of the IP prefix list or IP route access-list as an alphanumeric string of 1 through 63 characters.
Usage:

Use this command to match routes specified in a route-access-list or prefix-list.
Example:
To match routes that are specified in a prefix list named Prefix100, enter the following command:

    match ip address prefix-list Prefix100

To disable matching routes that are specified in a prefix list named Prefix100, enter the following command:

    no match ip address
    prefix-list Prefix100

match ip next-hop

Matches next-hop IP addresses with entries in specified standard prefix-list or route-access-list.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    ip address next-hop { prefix-list | route-access-list }list_name

prefix-list

Matches any routes that have a next-hop router address that has an entry in the specified prefix list.
route-access-list

Matches any routes that have a next-hop router address that has an entry in the specified route-access-list.
list_name

Specifies the name of the IP prefix-list or IP route-access-list as an alphanumeric string of 1 through 63 characters.
Usage:

Use this command to match next-hop IP addresses that have entries in the specified prefix-list or route-access-list.
Example:
To match next-hop addresses with entries in a prefix-list named Prefix100, enter the following command:

    match ip address next-hop
    prefix-list Prefix100

To disable matching next-hop addresses with entries in a prefix-list named Prefix100, enter the following command:

    no match ip address
    next-hop prefix-list Prefix100

match metric

Matches routes that have the specified route metric.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    metric metric_value

no

Disables matching of the specified route metric.
metric_value

Specifies the route metric to match as an integer from 0 through 4294967295.
Usage:

Use this command to match routes that have the specified route metric.
Example:
To match routes with the route metric of 1200, enter the following command:

    match metric 1200

To disable matching routes with a route metric of 1200, enter the following command:

    no match metric 1200

match origin

Matches the origin code learned from BGP. This command is for route maps that are used with BGP routing only.
Platform:

ASR 5000

ASR 5500
Product:

HA
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    origin { egp | igp | incomplete }

no

Disables matching of the origin code.
egp

Matches origins learned via the External Gateway Protocol (EGP)
igp

Match origins learned via the local Interior Glittery Protocol (IGP)
incomplete

Match origins with unknown heritage.
Usage:

Use this command to match origin codes for BGP routing.
Example:
To match origin codes learned from EGP, enter the following command:

    match origin egp

match route-type external

Match external Open Shortest Path First (OSPF) routes of the specified type.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    route-type external { type-1 | type-2 }

type-1

Only matches type-1 external routes.
type-2

Only matches type-2 external routes.
Usage:

Use this command to match external routes of a specific type.
Example:
The following command matches all external routes that are type-2:

    match route-type external
    type-2

The following command disables matching external routes that are type-2:

    no match route-type
    external type-2

match tag

Matches routes with the specified route tag value.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] match
    tag tag_value

no

Disables matching routes with the specified route tag value.
tag_value

Specifies the route tag value to match as an integer from 0 through 4294967295.
Usage:

Use this command to match routes that have the specified route tag value.
Example:
Use the following command match routes that have a route tag value of 1234:

    match tag 1234

Use the following command to disable matching routes that have a route tag value of 1234:

    no match tag 1234

set as-path

Modifies an Autonomous System (AS) path for a route by adding the specified AS numbers to the front of the path.
Platform:

ASR 5000

ASR 5500
Product:

HA
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    as-path prepend ASN

no

Disables prepending the AS path. Any previously set prepends are removed.
prepend

Prepends the AS path.
ASN

AS number(s) to be prepended to the AS path. You can specify up to 16 different AS numbers to be prepended in the order specified. Each AS number must be separated by a space. ASN must be an integer from 1 through 65535.
Usage:

Use this command to add up to 16 specified AS numbers to the front of the AS path.
Example:
The following command prepends the AS numbers 100, 200, and 1000 to matching AS paths:

    set as-path prepend
    100 200 1000

set ip next-hop

Sets the IP address that is applied as the next hop for routes.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    ip next-hop ip_address

no

Disables the specified next hop address.
ip_address

Specifies the IP address of the next hop to which packets are output, entered using IPv4 dotted-decimal notation.
Usage:

Use this command to set the IP address that is used as the next hop for routes.
Example:
To set the next hop for routes to the IP address 192.168.2.100, use the following command:

    set ip next-hop 192.168.2.100

To disable setting the next hop for routes to the IP address 192.168.2.100, use the following command:

    no set ip next-hop 192.168.2.100

set metric

Sets the route metric for matching routes to a specified value.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    metric metric_value

metric_value

Specifies the metric value that is set for routes as an integer from 1 through 16777214.
Usage:

Use this command to set the route metric for matched routes.
Example:
To set the route metric to 12345, use the following command;

    set metric 12345

To disable setting the route metric to 12345, enter the following command;

    no set metric 12345

set metric-type

This command sets the route metric type to either Type-1 or Type-2 in the AS-external-LSA.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    metric-type { type-1 | type-2 }

type-1

Sets the route metric to external type-1.
type-2

Sets the route metric to external type-2
Usage:

Use this command to set the route metric to either external type-1 or external type-2.
Example:
To set the route metric to type-1, enter the following command:

    set metric type-1

To disable setting the metric to type, enter the following command:

    no set metric type-1

set origin

Sets the Border Gateway Protocol (BGP) origin code to a specified value. This command is for route maps that are used with BGP routing only.
Platform:

ASR 5000

ASR 5500
Product:

HA
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    origin { egp | igp | incomplete }

no

Disables setting the origin code.
egp

Sets the origin code to specify that the path is from a remote External Gateway Protocol (EGP) system.
igp

Sets the origin code to specify that the path is from a local Interior Gateway Protocol (IGP) system.
incomplete

Sets the origin code to specify that the path is from an unknown system.
Usage:

Use this command to set a specified origin code for BGP.
Example:
To set the origin code to be from an External Gateway Protocol (EGP) system, enter the following command:

    set origin egp

set tag

Sets the route tag value for matched routes.
Platform:

ASR 5000

ASR 5500
Product:

All
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    tag tag_value

no

Disable setting the route tag to the specified value.
tag_value

Specifies the route tag value as an integer from 0 through 4294967295.
Usage:

Use this command to set the route tag value that is applied to all matched routes.
Example:
To set the route tag value to 12345, enter the following command:

    set tag 12345

To disable setting the route tag value to 12345, enter the following command:

    no set tag 12345

set weight

Sets the weight in the routing table for matching routes to the specified value.
Platform:

ASR 5000

ASR 5500
Product:

PDSN
Privilege:

Security Administrator, Administrator
Syntax

    [ no ] set
    weight value

no

Disable setting the routing weight value.
value

Specifies the weight in the routing table as an integer from 1 through 4294967295.
Usage:

Use this command to set the routing table weight on matched routes.
Example:
The following command sets the routing table weight for matched routes to 1000:

    set weight 1000