6.4. Route Map Commands

6.4.1. route-map

Command Purpose

To define the conditions for redistributing routes from one routing protocol into another, or to enable policy routing in bgp, use the route-map command in Global Config mode and the match and set command in route-map configuration modes. To delete an entry, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

route-map MAP_TAG ( deny | permit | ) ( SEQUENCE-NUMBER | )

no route-map MAP_TAG ( deny | permit | ) ( SEQUENCE-NUMBER | )

Parameter

Parameter Description

Parameter Value

MAP_TAG

A meaningful name for the route map. The redistribute router configuration command uses this name to reference this route map. Multiple route maps may share the same map tag name. The length of route-map name should not greater than 20 and the first character should be ‘ a ’ - ‘ z ’ , ‘ A ’ - ‘ Z ’ or ‘ 0 ’ - ‘ 9 ’

-

permit

(Optional) If the match criteria are met for this route map, and the permit keyword is specified, the route is redistributed as controlled by the set actions.(Optional) If the match criteria are met for this route map, and the permit keyword is specified, the route is redistributed as controlled by the set actions.If the match criteria are not met, and the permit keyword is specified, the next route map with the same map tag is tested. If a route passes none of the match criteria for the set of route maps sharing the same name, it is not redistributed by that set.

-

deny

(Optional) If the match criteria are met for the route map and the deny keyword is specified, the route is not redistributed

-

SEQUENCE-NUMBER

(Optional) Number that indicates the position a new route map will have in the list of route maps already configured with the same name. If given with the no form of this command, the position of the route map should be deleted

1-65535

Command Mode

Global Config

Default

The permit keyword is the default.

Usage

None

Examples

The following example shows how to create a route-map and enter route-map configuration mode:

Switch# configure terminal
Switch(config)# route-map rip-to-ospf permit
Switch(config-route-map)# match metric 1
Switch(config-route-map)# set metric 2

6.4.2. match as-path

Command Purpose

Use this command to match an autonomous system path access list.

Use the no parameter with this command to remove a path list entry.

The match as-path command specifies the autonomous system path to be matched. If there is a match for the specified AS path, and permit is specified, the route is redistributed or controlled, as specified by the set action. If the match criteria are met, and deny is specified, the route is not redistributed or controlled. If the match criteria are not met then the route is neither accepted nor forwarded, irrespective of permit or deny specifications.

The route specified by the policies might not be the same as specified by the routing protocols. Setting policies enable packets to take different routes, depending on their length or content. Packet forwarding based on configured policies overrides packet forwarding specified in routing tables.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match as-path LISTNAME

no match as-path

Parameter

Parameter Description

Parameter Value

LISTNAME

Specifies as autonomous system path access list name

Up to 40 characters

Command Mode

Route-map Configuration

Default

No match as-path is specified by default.

Usage

This command is valid only for BGP.

Examples

Switch# configure terminal
Switch(config)# route-map myroute deny 34
Switch(config-route-map)# match as-path myaccesslist

Related Commands

match metric

match ip address

match community

set as-path

set community

6.4.3. match community

Command Purpose

Use this command to specify the community to be matched.

Use the no parameter with this command to remove the community list entry.

Communities are used to group and filter routes. They are designed to provide the ability to apply policies to large numbers of routes by using match and set commands. Community lists are used to identify and filter routes by their common attributes.

Use the match community command to allow matching based on community lists.

The values set by the match community command overrides the global values. The route that does not match at least one match clause is ignored.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match community WORD

no match community

Parameter

Parameter Description

Parameter Value

WORD

Specifies the Community-list name

Up to 20 characters

Command Mode

Route-map Configuration

Default

No match community is specified by default.

Usage

This command is valid only for BGP.

Examples

Switch# configure terminal
Switch(config)# route-map myroute permit 3
Switch(config-route-map)# match community mylist

Related Commands

match ip address

match as-path

set as-path

set community

match metric

6.4.4. match interface

Command Purpose

Use this command to define the interface match criterion.

Use the no parameter with this command to remove the specified match criterion…

The match interface command specifies the next-hop interface name of a route to be matched.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match interface IFNAME

no match interface

Parameter

Parameter Description

Parameter Value

IFNAME

A string that specifies the interface for matching

Supportphysical/aggregation/loopback/tunnel/vlaninterfaces

Command Mode

Route-map Configuration

Default

No match interface is specified by default.

Usage

This command is valid only for OSPF.

Examples

Switch# configure terminal
Switch(config)# route-map mymap1 permit 10
Switch(config-route-map)# match interface eth-0-1

Related Commands

match tag

match route-type external

6.4.5. match ip address

Command Purpose

Use this command to specify the match address of route.

Use the no parameter with this command to remove the match ip address entry.

The match ip address command specifies the IP address to be matched. If there is a match for the specified IP address, and permit is specified, the route is redistributed or controlled, as specified by the set action. If the match criteria are met, and deny is specified then the route is not redistributed or controlled. If the match criteria are not met, the route is neither accepted nor forwarded, irrespective of permit or deny specifications.

The route specified by the policies might not be the same as specified by the routing protocols. Setting policies enable packets to take different routes, depending on their length or content. Packet forwarding based on configured policies overrides packet forwarding specified in routing tables.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match ip address ACCESSSLISTID

no match ip address

Parameter

Parameter Description

Parameter Value

ACCESSSLISTID

Specify a IPv4 access-list name, up to 20 characters

-

Command Mode

Route-map Configuration

Default

No match ip address is specified by default.

Usage

This command is valid for BGP, OSPF and RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map myroute permit 3
Switch(config-route-map)# match ip address List1

Related Commands

match community

match as-path

set as-path

set community

match metric

6.4.6. match ip address prefix-list

Command Purpose

Use this command to match entries of prefix-lists.

Use the no parameter with this command to disable this function

This command specifies the entries of prefix-lists to be matched. If there is a match for the specified prefix-list entries, and permit is specified, the route is redistributed or controlled, as specified by the set action. If the match criteria are met, and deny is specified, the route is not redistributed or controlled. If the match criteria are not met, the route is neither accepted nor forwarded, irrespective of permit or deny specifications.

The route specified by the policies might not be the same as specified by the routing protocols. Setting policies enable packets to take different routes depending on their length or content. Packet forwarding based on configured policies overrides packet forwarding specified in routing tables.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match ip address prefix-list LISTNAME

no match ip address prefix-list [ LISTNAME ]

Parameter

Parameter Description

Parameter Value

LISTNAME

Specifies the IP prefix list name

Up to 40 characters

Command Mode

Route-map Configuration

Default

No match ip address prefix-list is specified by default.

Usage

This command is valid for BGP, OSPF and RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# match ip address prefix-list mylist

Related Commands

match community

match as-path

set as-path

set community

match metric

6.4.7. match ip next-hop

Command Purpose

Use this command to specify a next-hop address to be matched in a route-map.

Use the no parameter with this command to disable this function.

The match ip next-hop command specifies the next-hop address to be matched. If there is a match for the specified next-hop address, and permit is specified, the route is redistributed or controlled as specified by the set action. If the match criteria are met, and deny is specified, the route is not redistributed or controlled. If the match criteria are not met, the route is neither accepted nor forwarded, irrespective of permit or deny specifications.

The route specified by the policies might not be the same as specified by the routing protocols. Setting policies enable packets to take different routes depending on their length or content. Packet forwarding based on configured policies overrides packet forwarding specified in routing tables.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match ip next-hop ACCESSSLISTID

no match ip next-hop [ ACCESSSLISTID ]

Parameter

Parameter Description

Parameter Value

ACCESSSLISTID

Specify a IPv4 access-list name, up to 20 characters

Up to 40 characters

Command Mode

Route-map Configuration

Default

No match ip next-hop is specified by default.

Usage

This command is valid for BGP, OSPF and RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# match ip next-hop mylist

Related Commands

match community

match as-path

set as-path

set community

match metric

6.4.8. match ip next-hop prefix-list

Command Purpose

Use this command to specify the next-hop IP address match criterion, using the prefix-list.

Use the no parameter with this command to remove the specified match criterion.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match ip next-hop prefix-list LISTNAME

no match ip next-hop prefix-list [ LISTNAME ]

Parameter

Parameter Description

Parameter Value

LISTNAME

A string specifying the prefix-list name

-

Command Mode

Route-map Configuration

Default

No match ip next-hop prefix-list is specified by default.

Usage

This command is valid for BGP, OSPF and RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map mymap permit 3
Switch(config-route-map)# match ip next-hop prefix-list list1

Related Commands

match metric

match interface

match ip next-hop

6.4.9. match local-preference

Command Purpose

Use this command to specify the local-preference match criterion.

Use the no parameter with this command to remove the specified match criterion.

Use the match local-preference command to match the local preference of a route.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match local-preference LOCAL-PREFERENCE

no match local-preference

Parameter

Parameter Description

Parameter Value

LOCAL-PREFERENCE

Species the preference value

0-4294967295

Command Mode

Route-map Configuration

Default

No match local-preference is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map mymap permit 3
Switch(config-route-map)# match local-preference 100

Related Commands

match community

match as-path

set as-path

set community

match ip next-hop

6.4.10. match metric

Command Purpose

Use this command to match a metric of a route.

Use the no parameter with this command to disable this function.

The match metric command specifies the metric to be matched. If there is a match for the specified metric, and permit is specified, the route is redistributed or controlled as specified by the set action. If the match criteria are met, and deny is specified, the route is not redistributed or controlled. If the match criteria are not met, the route is neither accepted nor forwarded, irrespective of permit or deny specifications.

The route specified by the policies might not be the same as specified by the routing protocols. Setting policies enable packets to take different routes depending on their length or content. Packet forwarding based on configured policies overrides packet forwarding specified in routing tables.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match metric METRICVAL

no match metric

Parameter

Parameter Description

Parameter Value

METRICVAL

The metric value

0-4294967295

Command Mode

Route-map Configuration

Default

No match metric is specified by default.

Usage

This command is valid for BGP, OSPF and RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map myroute permit 3
Switch(config-route-map)# match metric 2

Related Commands

match community

match as-path

set as-path

set community

match ip next-hop

6.4.11. match origin

Command Purpose

Use this command to match origin code.

Use the no parameter with this command to disable this matching.

The origin attribute defines the origin of the path information. The egp parameter is indicated as an e in the routing table, and it indicates that the origin of the information is learned via Exterior Gateway Protocol. The igp parameter is indicated as i in the routing table, and it indicates the origin of the path information is interior to the originating AS.

The incomplete parameter is indicated as a ? in the routing table, and indicates that the origin of the path information is unknown or learned through other means. If a static route is redistributed into BGP, the origin of the route is incomplete.

The match origin command specifies the origin to be matched. If there is a match for the specified origin, and permit is specified, the route is redistributed or controlled as specified by the set action. If the match criteria are met, and deny is specified, the route is not redistributed or controlled. If the match criteria are not met, the route is neither accepted nor forwarded, irrespective of permit or deny specifications.

The route specified by the policies might not be the same as specified by the routing protocols. Setting policies enable packets to take different routes depending on their length or content. Packet forwarding based on configured policies overrides packet forwarding specified in routing tables.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match origin { egp | igp | incomplete }

no match origin

Parameter

Parameter Description

Parameter Value

egp

learned from EGP

-

igp

Local IGP

-

incomplete

Unknown heritage

-

Command Mode

Route-map Configuration

Default

No match origin is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map myroute deny 34
Switch(config-route-map)# match origin egp

Related Commands

None

6.4.12. match route-type external

Command Purpose

Use this command to match specified external route type.

Use the no parameter with this command to turn off the matching.

Use the match route-type external command to match specific external route types. AS-external LSA is either Type-1 or Type-2. External type-1 matches only Type 1 external routes, and external type-2 matches only Type 2 external routes.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match route-type external { type-1 | type-2 }

no match route-type external

Parameter

Parameter Description

Parameter Value

type-1

Match OSPF External Type 1 metrics

-

type-2

Match OSPF External Type 2 metrics

-

Command Mode

Route-map Configuration

Default

No match route-type is specified by default.

Usage

This command is valid for OSPF only.

Examples

Switch# configure terminal
Switch(config)# route-map mymap1 permit 10
Switch(config-route-map)# match route-type external type-1

Related Commands

match tag

6.4.13. match tag

Command Purpose

Use this command to match the specified tag value.

Use the no parameter with this command to turn off the declaration.

Use the match tag command to match the specified tag value.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

match tag TAG

no match tag

Parameter

Parameter Description

Parameter Value

TAG

Specifies the tag value

0-4294967295

Command Mode

Route-map Configuration

Default

No match tag is specified by default.

Usage

This command is valid for OSPF RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map mymap1 permit 10
Switch(config-route-map)# match tag 100

Related Commands

match metric

match route-type external

6.4.14. set aggregator

Command Purpose

Use this command to set the AS number for the route map and router ID.

Use the no parameter with this command to disable this function.

An Autonomous System (AS) is a collection of networks under a common administration sharing a common routing strategy. It is subdivided by areas, and is assigned a unique 16-bit number. Use the set aggregator command to assign an AS number for the aggregator.

To use the set aggregator command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set aggregator as ASNUM IPADDRESS

no set aggregator

Parameter

Parameter Description

Parameter Value

ASNUM

Specifies the AS number of aggregator

1-65535

IPADDRESS

Specifies the IP address of aggregator

-

Command Mode

Route-map Configuration

Default

No set aggregator is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map myroute permit 3
Switch(config-route-map)# set aggregator as 43 10.10.0.3

Related Commands

None

6.4.15. set as-path

Command Purpose

Use this command to modify an autonomous system path for a route.

Use the no parameter with this command to disable this function.

Use the set as-path command to specify an autonomous system path. By specifying the length of the AS-Path, the router influences the best path selection by a neighbor. this command to prepend an AS path string to routes increasing the AS path length.

To use the set as-path command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set as-path prepend ASN [ …ASN ]

no set as-path

Parameter

Parameter Description

Parameter Value

ASN

System prepends this number to the AS path or overwrite the AS path

1-4294967295

Command Mode

Route-map Configuration

Default

No set as-path is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map myroute permit 3
Switch(config-route-map)# set as-path prepend 8 24

Related Commands

None

6.4.16. set atomic-aggregate

Command Purpose

Use this command to set an atomic aggregate attribute.

Use the no parameter with this command to disable this function

To use the set atomic aggregate command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set atomic-aggregate

no set atomic-aggregate

Command Mode

Route-map Configuration

Default

No set atomic-aggregate is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set atomic-aggregate

Related Commands

None

6.4.17. set comm-list delete

Command Purpose

Use this command to delete the matched communities from the community attribute of an inbound or outbound update when applying route-map.

Use the no parameter with this command to disable this feature.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set comm-list { STANDARD_ID | EXPANDED_ID | WORD } delete

no set comm-list

Parameter

Parameter Description

Parameter Value

STANDARD_ID

Standard community-list number

1-99

EXPANDED_ID

Expanded community-list number

100-199

WORD

Name of the Community-list

A string with 1-20 characters, the first character should be among [a-zA-Z0-9]

delete

Delete matching communities

-

Command Mode

Route-map Configuration

Default

No set comm-list is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set comm-list 34 delete

Related Commands

None

6.4.18. set community

Command Purpose

Use this command to set the communities attribute.

Use the no parameter with this command to delete the entry.

Use this command to set the community attribute and group destinations in a certain community, as well as, apply routing decisions according to those communities.

To use the set community command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set community [ AA:NN | internet | local-AS | no-advertise | no-export ]

set community none

no set community

Parameter

Parameter Description

Parameter Value

AA:NN

AA:NN: Specifies the community number in this formatAA = The AS numberNN = The number assigned to community

AA is in the range 1-65535NN is in the range of 1-65535

internet

Specifies the Internet (well-known community)

-

local-AS

Specifies no sending outside the local AS (well-known community)

-

no-advertise

Specifies no advertisement of this route to any peer (well-known community)

-

no-export

Specifies no advertisement of this route to next AS (well-known community)

-

none

Removes the community attribute from the prefixes that pass the route-map

-

Command Mode

Route-map Configuration

Default

No set community is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set community no-export no-advertise
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set community no-advertise
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set community 10:01 23:34 12:14 no-export

Related Commands

None

6.4.19. set dampening

Command Purpose

Use this command to enable route-flap dampening and set parameters.

Use the no parameter with this command to disable it.

Set the unreachability half-life time to be equal to, or greater than, reachability half-life time. The suppress-limit value must be greater than or equal to the reuse limit value.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set dampening REACHTIME REUSE SUPPRESS MAXSUPPRESS [UNREACHTIME ]

no set dampening

Parameter

Parameter Description

Parameter Value

REACHTIME

Specifies the reachability half-life time in minutes. The time for the penalty to decrease to one-half of its current value. The default is 15 minutes

1-45

REUSE

Specifies the reuse-limit value. When the penalty for a suppressed route decays below the reuse value, the routes become unsuppressed. The default reuse limit is 750

1-20000

SUPPRESS

Specifies the suppress-limit value. When the penalty for a route exceeds the suppress value, the route is suppressed. The default suppress limit is 2000

1-20000

MAXSUPPRESS

Specifies the max-suppress-time. Maximum time that a dampened route is suppressed. The default max-suppress value is 4 times the half-life time (60 minutes)

1-255

UNREACHTIME

Specifies the un-reachability half-life time for penalty, in minutes. The default value is 15 minutes

1-45

Command Mode

Route-map Configuration

Default

Reference to the syntax description above.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map R1 permit 24
Switch(config-route-map)# set dampening 20 333 534 30

Related Commands

None

6.4.20. set extcommunity

Command Purpose

Use this command to set an extended community attribute.

Use the no parameter with this command to disable this function

To use the set extcommunity command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set extcommunity { rt | soo } EXTCOMMNUMBER [ …EXTCOMMNUMBER ]

no set extcommunity { rt | soo }

Parameter

Parameter Description

Parameter Value

rt

Specifies the route target of the extended community

-

soo

Specifies the site-of-origin of the extended community

-

EXTCOMMNUMBER

ASN:NN or IP-addressnn VPN extended community

-

ASN:NN

the AS number

ASN is in the range 1-65535NN is in the range of 1-65535

IPADDRESS

the AS number in IP address form

IPv4 Address in A.B.C.D format

Command Mode

Route-map Configuration

Default

No set extcommunity is specified by default.

Usage

None

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set extcommunity rt 06:01
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set extcommunity rt 0.0.0.6:01
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set extcommunity soo 06:01
Switch(config-route-map)# route-map rmap1 permit 3
Switch(config-route-map)# set extcommunity soo 0.0.0.6:01

Related Commands

None

6.4.21. set ip next-hop

Command Purpose

Use this command to set the specified next-hop value.

Use the no parameter with this command to turn off the setting.

Use this command to set the next-hop IP address to the routes.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set ip next-hop A.B.C.D ( track object_id | )

no set ip next-hop ( track | )

Parameter

Parameter Description

Parameter Value

A.B.C.D

Specifies the IP address of the next-hop

IPv4 Address in A.B.C.D format

object_id

Object identity is used to identify track object

1-500

Command Mode

Route-map Configuration

Default

No set ip next-hop is specified by default.

Usage

This command is valid for BGP, OSPF, RIP and PBR only.Configuring the set ip next-hop command causes the system to use policy-based routing first and then use the routing table. Configured with track command will bind nexthop with track, when track down, the nexthop will be invalided. Use the no command with track will unbind nexthop with track.

Examples

The following example shows how to set the next-hop IP address:

Switch# configure terminal
Switch(config)# route-map mymap permit 3
Switch(config-route-map)# set ip next-hop 10.10.0.67

The following example shows how to set the next-hop IP address and bind with track:

Switch# configure terminal
Switch(config)# track 1 interface eth-0-1 linkstate
Switch(config-track)# quit
Switch(config)# route-map mymap permit 3
Switch(config-route-map)# set ip next-hop 10.10.0.67 track 1

Related Commands

None

6.4.22. set ip vrf next-hop

Command Purpose

Use this command to set the specified vrf and next-hop value.

Use the no parameter with this command to turn off the setting.

Use this command to set the vrf and next-hop IP address to the routes.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set ip vrf WORD next-hop A.B.C.D ( track object_id | )

no set ip next-hop ( track | )

Parameter

Parameter Description

Parameter Value

A.B.C.D

Specifies the IP address of the next-hop

IPv4 Address in A.B.C.D format

object_id

Object identity is used to identify track object

1-500

WORD

VPN Routing/Forwarding instance name

Up to 15 characters

Command Mode

Route-map Configuration

Default

No set ip next-hop is specified by default.

Usage

This command is valid PBR only.Configuring the set ip vrf next-hop command causes the system to use policy-based routing first and then use the routing table. Configured with track command will bind nexthop with track, when track down, the nexthop will be invalided. Use the no command with track will unbind nexthop with track.

Examples

The following example shows how to set the next-hop IP address and vrf.:

Switch# configure terminal
Switch(config)# route-map mymap permit 3
Switch(config-route-map)# set ip vrf test next-hop 10.10.0.67

Related Commands

None

6.4.23. set ip default next-hop

Command Purpose

Use this command to set the specified default next-hop value.

Use the no parameter with this command to turn off the setting.

Use this command to set the default next-hop IP address to the routes.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set ip default next-hop A.B.C.D ( track object_id | )

no set ip default next-hop ( track | )

Parameter

Parameter Description

Parameter Value

A.B.C.D

Specifies the IP address of the default next-hop

IPv4 Address in A.B.C.D format

object_id

Object identity is used to identify track object

1-500

Command Mode

Route-map Configuration

Default

No set ip default next-hop is specified by default.

Usage

This command is valid for PBR only.Configuring the set ip default next-hop command causes the system to use the routing table first and then the policy route to the specified nexthop. Configured with track command will bind nexthop with track, when track down, the nexthop will be invalided. Use the no command with track will unbind nexthop with track.

Examples

The following example shows how to set the default next-hop IP address and bind with track:

Switch# configure terminal
Switch(config)# track 1 interface eth-0-1 linkstate
Switch(config-track)# quit
Switch(config)# route-map mymap permit 4
Switch(config-route-map)# set ip default next-hop 10.10.0.68 track 1

The following example shows how to unbind track with next-hop IP address:

Switch# configure terminal
Switch(config)# route-map mymap permit 4
Switch(config-route-map)# no set ip default next-hop track

Related Commands

None

6.4.24. set ip default vrf next-hop

Command Purpose

Use this command to set the specified default next-hop value and the vrf.

Use the no parameter with this command to turn off the setting.

Use this command to set the default next-hop IP address and vrf to the routes.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set ip default vrf WORD next-hop A.B.C.D ( track object_id | )

no set ip default next-hop ( track | )

Parameter

Parameter Description

Parameter Value

A.B.C.D

Specifies the IP address of the default next-hop

IPv4 Address in A.B.C.D format

object_id

Object identity is used to identify track object

1-500

WORD

VPN Routing/Forwarding instance name

Up to 15 characters

Command Mode

Route-map Configuration

Default

No set ip default vrf next-hop is specified by default.

Usage

This command is valid for PBR only.Configuring the set ip default vrf next-hop command causes the system to use the routing table first and then the policy route to the specified nexthop and vrf. Configured with track command will bind nexthop with track, when track down, the nexthop will be invalided. Use the no command with track will unbind nexthop with track.

Examples

The following example shows how to set the default next-hop vrf IP address and bind with track:

Switch# configure terminal
Switch(config)# track 1 interface eth-0-1 linkstate
Switch(config-track)# quit
Switch(config)# route-map mymap permit 4
Switch(config-route-map)# set ip default vrf test next-hop 10.10.0.68 track 1

Related Commands

None

6.4.25. set local-preference

Command Purpose

Use this command to set the specified local-preference value.

Use the no parameter with this command to turn off the setting.

Use this command to set the local-preference value of the routes

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set local-preference LOCAL-PREFERENCE

no set local-preference

Parameter

Parameter Description

Parameter Value

LOCAL-PREFERENCE

Species the preference value

0-4294967295

Command Mode

Route-map Configuration

Default

No set local-preference is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map mymap permit 3
Switch(config-route-map)# set local-preference 100

Related Commands

None

6.4.26. set metric

Command Purpose

Use this command to set a metric value for a route.

Use the no parameter with this command to disable this function.

This command sets the metric value for a route, and influences external neighbors about the preferred path into an Autonomous System (AS). The preferred path is the one with a lower metric value. A router compares metrics for paths from neighbors in the same ASs. To compare metrics from neighbors coming from different ASs, use the bgp always-compare-med command.

To use the set metric command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set metric METRICVAL

no set metric

Parameter

Parameter Description

Parameter Value

METRICVAL

The metric value

0-4294967295

Command Mode

Route-map Configuration

Default

No set metric is specified by default.

Usage

This command is valid for BGP, OSPF and RIP.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set metric 600

Related Commands

None

6.4.27. set metric-type

Command Purpose

Use this command to set the metric type for the destination routing protocol.

Use the no parameter with this command to return to the default.

This command sets the type to either Type-1 or Type-2 in the AS-external-LSA when the route-map matches the condition.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set metric-type { type1 | type2 }

no set metric-type

Parameter

Parameter Description

Parameter Value

type1

Select to set external type 1 metric

-

type2

Select to set external type 2 metric

-

Command Mode

Route-map Configuration

Default

No set metric-type is specified by default.

Usage

This command is valid for OSPF only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set metric-type 1

Related Commands

None

6.4.28. set origin

Command Purpose

Use this command to set the BGP origin code.

Use the no parameter with this command to delete an entry.

The origin attribute defines the origin of the path information. The three parameters with this command indicate three different values. IGP is interior to the originating AS. This happens if IGP is redistributed into the BGP. EGP is learned through an Exterior Gateway Protocol. Incomplete is unknown or learned through some other means. This happens when static route is redistributed in BGP and the origin of the route is incomplete.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set origin { egp | igp | incomplete }

no set origin

Parameter

Parameter Description

Parameter Value

egp

Specifies a remote EGP system

-

igp

A local IGP system

-

incomplete

Specifies a system of unknown heritage

-

Command Mode

Route-map Configuration

Default

No set origin is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set origin egp

Related Commands

None

6.4.29. set originator-id

Command Purpose

Use this command to set the originator ID attribute.

Use the no parameter with this command to disable this function.

To use the set originator-id command, you must first have a match clause. Match and set commands set the conditions for redistributing routes from one routing protocol to another. The match command specifies the match criteria under which redistribution is allowed for the current route-map. The set command specifies the set redistribution actions to be performed, if the match criteria are met.

If the packets do not match any of the defined criteria, they are routed through the normal routing process.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set originator-id IPADDRESS

no set originator-id

Parameter

Parameter Description

Parameter Value

IPADDRESS

Specifies the IP address of originator

IPv4 Address in A.B.C.D format

Command Mode

Route-map Configuration

Default

No set originator-id is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set originator-id 1.1.1.1

Related Commands

None

6.4.30. set tag

Command Purpose

Use this command to set a specified tag value.

Use the no parameter with this command to return to the default.

Tag in this command is the route tag which is labeled by another routing protocol (BGP or other IGP when redistributing), because AS-external-LSA has a route-tag field in its LSAs. Also, with using route-map, ZebOS can tag the LSAs with the appropriate tag value. Sometimes, the tag matches with using route-map, and sometimes, the value

may be used by another application.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set tag TAGVALUE

no set tag

Parameter

Parameter Description

Parameter Value

TAGVALUE

Tag value for destination routing protocol.

0-4294967295

Command Mode

Route-map Configuration

Default

No set tag is specified by default.

Usage

This command is valid for OSPF and RIP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set tag 6

Related Commands

redistribute

default-information

6.4.31. set vpnv4 next-hop

Command Purpose

Use this command to set a VPNv4 next-hop address.

Use the no parameter with this command to disable this function

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set vpnv4 next-hop IPADDRESS

no set vpnv4 next-hop

Parameter

Parameter Description

Parameter Value

IPADDRESS

Specifies the IP address of next-hop

IPv4 Address in A.B.C.D format

Command Mode

Route-map Configuration

Default

No set vpnv4 next-hop is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set vpnv4 next-hop 6.6.6.6

Related Commands

None

6.4.32. set weight

Command Purpose

Use this command to set weights for the routing table.

Use the no parameter with this command to delete an entry.

The weight value is used to assist in best path selection. It is assigned locally to a router. When there are several routes with a common destination, the routes with a higher weight value are preferred.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

set weight WEIGHT

no set weight

Parameter

Parameter Description

Parameter Value

WEIGHT

Specifies the weight value

0-4294967295

Command Mode

Route-map Configuration

Default

No set weight is specified by default.

Usage

This command is valid for BGP only.

Examples

Switch# configure terminal
Switch(config)# route-map rmap1 permit 3
Switch(config-route-map)# set weight 60

Related Commands

match as-path

6.4.33. show route-map

Command Purpose

Use this command to display user readable route-map information.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show route-map ( NAME | )

Parameter

Parameter Description

Parameter Value

NAME

route-map name

Up to 20 characters

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Switch1# show route-map

route-map abc, permit, sequence 10
Match clauses:
ip address acl1
Set clauses:
local-preference 200
route-map abc, permit, sequence 20
Match clauses:
Set clauses:

Related Commands

route-map