Cisco Nexus 6000 Series NX-OS Unicast Routing Command Reference
M Commands
Downloads: This chapterpdf (PDF - 305.0KB) The complete bookPDF (PDF - 4.5MB) | Feedback

M Commands

Table Of Contents

M Commands

mac-list

match as-number

match as-path

match community

match extcommunity

match interface

match ip address

match ip multicast

match ip next-hop prefix-list

match ip route-source prefix-list

match metric

match mac-list

match route-type

match tag

match vlan

maxas-limit

maximum-paths (BGP)

maximum-prefix


M Commands


This chapter describes the Cisco NX-OS Border Gateway Protocol (BGP) commands that begin with M.

mac-list

To filter based on a MAC address, use the mac-list command. To remove the MAC list entry, use the no form of this command.

mac-list name [seq number] {permit | deny} mac-address [mac-mask]

no mac-list name [seq number] {permit | deny} mac-address [mac-mask]

Syntax Description

name

MAC list name. The name can be any case-sensitive, alphanumeric string up to 32 characters.

seq number

(Optional) Creates an entry in the MAC list. The seq range is from 1 to 4294967294.

permit

Allows the packet or route that matches a MAC address in the MAC list.

deny

Blocks the packet or route that matches a MAC address in the MAC list.

mac-address

MAC address to filter against.

mac-mask

(Optional) Portion of the MAC address to match against, in MAC address format.


Command Default

No match values are defined.

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

You can match against the MAC list in a route map.

Examples

This example shows how to create the Red MAC list:

switch(config)# mac-list Red seq 1 permit 0022.5579.a4c1 ffff.ffff.0000

Related Commands

Command
Description

match mac-list

Matches a MAC address in a MAC list.

show mac-list

Displays information about a MAC list.


match as-number

To match to a Border Gateway Protocol (BGP ) autonomous system (AS) number, use the match as-number command. To remove an AS number list entry, use the no form of this command.

match as-number {number [,number...] | as-path-access-list name [...name]}

no match as-number {number [,number...] | as-path-access-list name [...name]}]

Syntax Description

number

AS number. The range is from 1 to 65535.

...number

(Optional) AS number. The range is from 1 to 65535.

as-path-access-list name

Specifies an AS-path access list to match AS numbers against. The name can be any alphanumeric string up to 63 characters.

...name

(Optional) AS-path access list. The name can be any alphanumeric string up to 63 characters.


Command Default

None

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Command History

Usage Guidelines

Use the match as-number command to provide a list of AS numbers or an AS-path access list using a regular expression. BGP uses this match criteria to determine which BGP peers to create a BGP session with.

Use the route map to specify a range of AS numbers whose peers can establish a session with the local BGP through prefix peering. Cisco NX-OS ignores any other match commands if the match as-number command is present in the route map.

Examples

This example shows how to configure a list of AS numbers:

switch(config)# route-map IGP2BGP
switch(config-route-map)# match as-number 64496, 64498-64510
 
   

Related Commands

Command
Description

ip as-path access-list

Creates an AS-path list.

neighbor

Configures BGP peers.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.


match as-path

To match a Border Gateway Protocol (BGP) autonomous system (AS) path access list, use the match as-path command. To remove a path list entry, use the no form of this command.

match as-path name [...name]

no match as-path name [...name]

Syntax Description

name

Autonomous system path access list. The name can be any alphanumeric string up to 63 characters.

...name

(Optional) Autonomous system path access list. You can configure up to 32 access list names.


Command Default

No path lists are defined.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

The values set by the match as-path command overrides global values.

A route map can have several parts. Any route that does not match at least one match clause relating to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route-map section with an explicit match specified.

Examples

This example sets the autonomous system path to match BGP autonomous system path access list 20:

switch(config)# route-map IGP2BGP
switch(config-route-map)# match as-path 20
switch(config-route-map)#

Related Commands

Command
Description

match community

Matches a BGP community.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or expanded access list.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match route-type

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set comm-list

Automatically computes the tag value in a route map configuration.

set community

Sets BGP community list (for deletion).

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set origin (BGP)

Sets the BGP origin code.

set tag

Sets the value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match community

To match a Border Gateway Protocol (BGP) community, use the match community command. To remove the match community command from the configuration file and restore the system to its default condition where the software removes the BGP community list entry, use the no form of this command.

match community name [...name] [exact-match]

no match community name [...name] [exact-match]

Syntax Description

name

One or more community list names. The name can be any alphanumeric string up to 63 characters. You can configure a maximum of 32 community lists.

exact-match

(Optional) Indicates that an exact match is required. All of the communities and only those communities specified must be present.


Command Default

No community list is matched by the route map.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

A route map can have several parts. Any route that does not match at least one match command that is related to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route-map section with an explicit match specified.

Matching that is based on the community list number is one of the types of match commands applicable to BGP.

Examples

This example shows how to match two BGP communities:

switch(config)# route-map test2
switch(config-route-map)# match community bgpLow bgpHigh
 
   

This example shows that the routes that match community list 1 have the weight set to 200. Any route that has the standard community 109 only has the weight set to 200.

switch(config)# ip community-list standard bgpLow permit 109
switch(config)# route-map set_weight
switch(config-route-map)# match community bgpLow exact-match
switch(config-route-map)# set weight 200
 
   

This example shows the routes that match the community list 500. Any route that has expanded community 1 have the weight set to 150.

switch(config)# ip community-list expanded 500 permit [0-9]*
switch(config)# route-map MAP_NAME permit 10
switch(config-route-map)# match community 500
switch(config-route-map)# set weight 150
 
   

Related Commands

Command
Description

ip community-list

Creates a community list for BGP and controls access to it.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set weight

Specifies the BGP weight for the routing table.


match extcommunity

To match a Border Gateway Protocol (BGP) extended community in a route map, use the match extcommunity command. To remove the match from the route map, use the no form of this command.

match extcommunity name [...name] [exact-match]

no match extommunity name [...name] [exact-match]

Syntax Description]

name

One or more extended community list names. The name can be any alphanumeric string up to 63 characters. You can configure a maximum of 32 community lists.

exact-match

(Optional) Indicates that an exact match is required. All of the communities and only those extended communities specified must be present.


Command Default

No community list is matched by the route map.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

A route map can have several parts. Any route that does not match at least one match command in the route map is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route-map section with an explicit match specified.

Matching that is based on the extended community list number is one of the types of match commands applicable to BGP.

Examples

This example shows how to match two BGP extended community lists:

switch(config)# route-map test2
switch(config-route-map)# match extcommunity bgpLocal bgpRemote
 
   

This example shows that the routes that match the extended community list bgpLocal change from nontransitive to transitive:

switch(config)# ip extcommunity-list standard bgpLocal permit generic nontransitive 1.9
switch(config)# route-map deletCommunity
switch(config-route-map)# match extcommunity bgpLocal exact-match
switch(config-route-map)# set extcommunity generic transitive 1.9
 
   

Related Commands

Command
Description

ip extcommunity-list

Creates a community list for BGP and controls access to it.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

send-community

Configures BGP to propagate community attributes to BGP peers.

set extcommunity

Sets an extended community in a route map.


match interface

To match an interface in a route map, use the match interface command. To remove the match, use the no form of this command.

match interface {interface-type number [, interface-type number...]}

no match interface {interface-type number [, interface-type number...]}

Syntax Description

interface-type

Interface type. Use ? to see a list of supported interfaces.

number

(Optional) Interface number. Use ? to see the range.


Command Default

None

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

Route next-hop addresses that are reached by one of the interfaces result in a match for the route map.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route-map section with an explicit match specified.

Examples

This example shows how to configure a list of interfaces:

switch(config)# route-map test1
switch(config-route-map)# match interface ethernet 2/1, ethernet 4/3
 
   

Related Commands

Command
Description

route-map

Defines the conditions for redistributing routes from one routing protocol into another.


match ip address

To distribute any routes that have a destination IP network number address that is permitted by a standard access list, an expanded access list, or a prefix list, use the match ip address command. To remove the match ip address entry, use the no form of this command.

match ip address {prefix-list prefix-list-name [prefix-list-name...]}

no match ip address {prefix-list prefix-list-name [prefix-list-name...]}

Syntax Description

prefix-list prefix-list-name...

Distributes routes based on a prefix list. The prefix list name can be any alphanumeric string up to 63 characters. The ellipsis indicates that multiple values can be entered, up to 32 prefix lists.


Command Default

No prefix lists are specified.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the prefix-list-name argument.

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.

Use route maps to redistribute routes.

Use the route-map global configuration command and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order, and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

When you are passing routes through a route map, a route map can have several sections that contain specific match clauses. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route map section with an explicit match specified.

Examples

This example shows how to match routes that have addresses specified by an access list test:

switch(config)# interface ethernet 2/10
switch(config-if)# no switchport
switch(config-if)# exit
switch(config)# route-map chicago
switch(config-route-map)# match ip address test 

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match interface

Distributes any routes that have their next hop out one of the interfaces specified.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match route-type

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match ip multicast

To configure the IPv4 multicast features for the route-map matching, use the match ip multicast command. To remove the match, use the no form of this command.

match ip multicast {group address/length | source address/length | rp address/length [rp-type asm]}

no match ip multicast

Syntax Description

group address/length

Specifies the group address and the length of the network mask in bits in this format: A.B.C.D/length. The network number can be any valid IP address or prefix. The bit mask can be a number from 0 to 32.

You can configure group, source, and rp options.

source address/length

Specifies the source address and the length of the network mask in bits in this format: A.B.C.D/length. The network number can be any valid IP address or prefix. The bit mask can be a number from 0 to 32.

You can configure group, source, and rp options.

rp address/length

Specifies the IPv4 rendezvous prefix (RP) and the length of the IPv4 prefix mask in bits in this format: A.B.C.D/length. The network number can be any valid IPv4 address or prefix. The bit mask can be a number from 0 to 32.

You can configure group, source, and rp options.

rp-type

(Optional) Specifies the multicast rendezvous point type.

asm

(Optional) Specifies the any-source multicast (ASM) rendezvous point type.


Command Default

None

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

The match ip multicast command is the only match command that is evaluated in the route map. You can specify the group prefix, group range, and source prefix to filter messages with the match ip multicast command.

Use the route-map command to enter route-map configuration mode. Once you enter the route-map command, the prompt changes to the following:

switch(config-route-map)#
 
   

Once you enter route-map configuration mode, you can enter the match ip multicast command.

You can configure both group and rp options.

Examples

This example shows how to specify the group IPv4 prefix and the length of the IPv4 prefix for the neighbors to match:

switch(config)# route-map blueberry
switch(config-route-map)# match ip multicast group 192.0.0.0/19
switch(config-route-map)# 
 
   

This example shows how to specify both the group IPv4 prefix and the rendezvous point of the IPv4 prefix for the neighbors to match:

switch(config)# route-map raspberry
switch(config-route-map)# match ip multicast group 192.0.0.0/19 rp 209.165.201.0/27
switch(config-route-map)# 
 
   

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match interface

Distributes any routes that have their next hop out one of the interfaces specified.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match route-type

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match ip next-hop prefix-list

To redistribute any IPv4 routes that have a next-hop router address passed by one of the access lists specified, use the match ip next-hop prefix-list command. To remove the next hop entry, use the no form of this command.

match ip next-hop prefix-list prefix-list-name [ ...prefix-list-name]

no match ip next-hop prefix-list prefix-list-name [ ...prefix-list-name]

Syntax Description

prefix-list-name

Number or name of a prefix list. It can be any alphanumeric string up to 63 characters. The ellipsis indicates that multiple values can be entered, up to 32 prefix lists.


Command Default

Routes are distributed freely, without being required to match a next hop address.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Command History

Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the prefix-list-name argument.

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

When you are passing routes through a route map, a route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route map section with an explicit match specified.

Examples

This example shows how to distributes routes that have a next-hop router address passed by the prefix list test:

switch(config)# route-map blue
switch(config-route-map)# match ip next-hop prefix-list test
switch(config-route-map)#
 
   

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or expanded access list.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match route-type

Redistributes routes of the specified type.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value.

set communit

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match ip route-source prefix-list

To redistribute IPv4 routes that have been advertised by routers and access servers at the address specified by the access lists, use the match ip route-source prefix-list command. To remove the route-source entry, use the no form of this command.

match ip route-source prefix-list prefix-list-name [ ...prefix-list-name]

no match ip route-source prefix-list prefix-list-name [ ...prefix-list-name]

Syntax Description

prefix-list-name

Number or name of a prefix list. It can be any alphanumeric string up to 63 characters. The ellipsis indicates that multiple values can be entered, up to 32 prefix lists.


Command Default

No filtering on route source.

Command Modes

Route-map mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the prefix-list-name argument.

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order, and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify only some data, you must configure second route map section with an explicit match specified.

There are situations in which the next hop and source router address of the route are not the same.

Examples

This example shows how to distribute routes that have been advertised by routers and access servers at the addresses specified by access lists 5 and 80:

switch(config)# route-map blue
switch(config-route-map)#  match ip route-source prefix-list 5 80
 
   

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip address

Distributes any routes that have a destination network number address that is permitted by a standard or expanded access list.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match route-type

Redistributes routes of the specified type.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set automatic-tag

Automatically computes the tag value.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric (BGP, OSPF, RIP)

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match metric

To redistribute routes in the routing table that match the routing metric value, use the match metric command. To remove the tag entry, use the no form of this command.

match metric metric-value [+- deviation-number] [...metric-value [+- deviation-number]]

no match metric metric-value [+- deviation-number] [...metric-value [+- deviation-number]]

Syntax Description

metric-value

Internal route metric. The range is from 1 to 4,294,967,295.

+ -

Specifies a standard deviation range of the metric. The router matches any metric that falls inclusively in that range.

deviation-number

(Optional) Standard deviation number that offsets the number configured for the metric-value argument. The deviation-number argument can be any number. There is no default.


Command Default

No match values are defined.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

To redistribute routes with the specified metric, use the match metric command in route-map configuration mode. To remove the entry for the redistributed route from the routing table, use the no form of this command.

You can specify one or more metrics (or) range of metrics using the deviation-number argument. At least one of the specified metrics must match for the command to pass.

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the arguments.

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure second route map section with an explicit match specified.

Examples

This example shows how to redistribute routes stored in the routing table with a metric of 5:

switch(config)# route-map blueberry
switch(config-route-map)# match metric 5
 
   

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match mac-list

To redistribute routes in the routing table that match a MAC address in the MAC list, use the match mac-list command. To remove the tag entry, use the no form of this command.

match mac-list listname

no match mac-list listname

Syntax Description

listname

MAC list name. The name can be any case-sensitive, alphanumeric string up to 32 characters.


Command Default

No match values are defined.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route map section with an explicit match specified.

Examples

This example shows how to redistribute routes stored in the routing table that match entries in the Red MAC list:

switch# configure terminal
switch(config)# route-map blueberry
switch(config-route-map)# match mac-list Red
switch(config-route-map)#

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match route-type

To redistribute routes of the specified type, use the match route-type command. To remove the route type entry, use the no form of this command.

match route-type {external | internal | local | nssa-external | type-1 | type-2}

no match route-type {external | internal | local | nssa-external | type-1 | type-2}

Syntax Description

external

Specifies the external route (Border Gateway Protocol [BGP], Enhanced Interior Gateway Routing Protocol [EIGRP], and Open Shortest Path First [OSPF] type 1/2). You can specify more than one keyword.

internal

Specifies the internal route (including the OSPF intra/inter area). You can specify more than one keyword.

local

Specifies the locally generated route. You can specify more than one keyword.

nssa-external

Specifies the nssa-external route (OSPF type 1/2). You can specify more than one keyword.

type-1

Specifies the OSPF external type 1 route. You can specify more than one keyword.

type-2

Specifies the OSPF external type 2 route. You can specify more than one keyword.


Command Default

Disabled

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route map section with an explicit match specified.

You can specify more than one keyword.

Examples

This example shows how to redistribute internal routes:

switch(config)# route-map blueberry
switch(config-route-map)# match route-type internal
 
   

This example shows how to redistribute internal routes and type-1 OSPF routes:

switch(config)# route-map blueberry
switch(config-route-map)# match route-type internal type-1
 
   

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match tag

To redistribute routes in the routing table that match the specified tags, use the match tag command. To remove the tag entry, use the no form of this command.

match tag tag-value [...tag-value]

no match tag tag-value [...tag-value]

Syntax Description

tag-value

List of one or more route tag values. Each can be an integer from 0 to 4,294,967,295. You can configure up to 32 tags.


Command Default

No match tag values are defined.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the tag-value argument.

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route map section with an explicit match specified.

Examples

This example shows how to redistribute routes stored in the routing table with tag 5:

switch(config)# route-map blueberry
switch(config-route-map)# match tag 5

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


match vlan

To filter routes with the specified VLAN, use the match vlan command. To remove the entry for the redistributed route from the routing table, use the no form of this command.

match vlan vlan-range

no match vlan vlan-range

Syntax Description

vlan-range

Range of VLAN that this command matches against. The range is from 1 to 4094.


Command Default

No match VLAN values are defined.

Command Modes

Route-map configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

To filter routes with the specified VLAN, use the match vlan command You can specify one or more VLANs (or) range of VLANs. At least one of the specified VLANs must match for the command to pass. The command matches any VLAN that falls inclusive in the range.

Use the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. 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 which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The match route-map configuration command has multiple formats. The match commands can be given in any order and all match commands must pass to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.

A route map can have several parts. Any route that does not match at least one match clause that relates to a route-map command is ignored; that is, the route is not advertised for outbound route maps and is not accepted for inbound route maps. If you want to modify some particular data, you must configure a second route map section with an explicit match specified

Examples

This example shows how to redistribute routes that match VLANs 5 to 10:

switch(config)# route-map blueberry
switch(config-route-map)# match vlan 5-10
 
   

Related Commands

Command
Description

match as-path

Matches a BGP autonomous system path access list.

match community

Matches a BGP community.

match ip next-hop

Redistributes any routes that have a next-hop router address passed by one of the access lists specified.

match ip route-source

Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.

match metric

Redistributes routes with the metric specified.

match tag

Redistributes routes in the routing table that match the specified tags.

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

set as-path

Modifies an autonomous system path for BGP routes.

set community

Sets the BGP communities attribute.

set level

Indicates where to import routes.

set local-preference

Specifies a preference value for the autonomous system path.

set metric

Sets the metric value for a routing protocol.

set metric-type

Sets the metric type for the destination routing protocol.

set next-hop

Specifies the address of the next hop.

set tag

Sets a tag value of the destination routing protocol.

set weight

Specifies the BGP weight for the routing table.


maxas-limit

To configure the external Border Gateway Protocol (eBGP) to discard routes that have a high number of autonomous system (AS) numbers in the AS-path attribute, use the maxas-limit command. To revert to the default, use the no form of this command.

maxas-limit [number]

no maxas-limit

Syntax Description

number

(Optional) Maximum number of AS numbers allowed in the AS-path attribute. The range is from 1 to 2000.


Command Default

No limit

Command Modes

Router configuration mode

VRF configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

This command requires the LAN Enterprise Services license.

Examples

This example shows how to set the maximum number of AS numbers to 50:

switch(config)# router bgp 64496
switch(config-router)# maxas-limit 50
switch(config-router)#
 
   

Related Commands

Command
Description

feature bgp

Enables the BGP feature.

router bgp

Creates a BGP instance.


maximum-paths (BGP)

To control the maximum number of parallel routes that the Border Gateway Protocol (BGP) can support, use the maximum-paths command. To restore the default number of parallel routes, use the no form of this command.

maximum-paths [ibgp] number-paths

no maximum-paths [ibgp] number-paths

Syntax Description

ibgp

(Optional) Configures the maximum interior BGP (iBGP) paths.

number-paths

Maximum number of parallel routes that an IP routing protocol installs in a routing table. The range is from 1 to 16.


Command Default

8 paths

Command Modes

Router address-family configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Examples

This example shows how to allow a maximum of 16 paths to a destination for a BGP routing process:

switch# configure terminal
switch(config)# router bgp 64496
switch(config-router)# maximum-paths 16
switch(config-router)#
 
   

Related Commands

Command
Description

feature bgp

Enables the BGP feature on the router.

router bgp

Enables BGP.


maximum-prefix

To control how many prefixes can be received from a neighbor, use the maximum-prefix command. To disable this function, use the no form of this command.

maximum-prefix maximum [threshold] [restart restart-interval] [warning-only]

no maximum-prefix

Syntax Description

maximum

Maximum number of prefixes allowed from the specified neighbor. The number of prefixes that can be configured is limited only by the available system resources on a router. Range: 1 to 300000.

threshold

(Optional) Specifies the percentage of the maximum-prefix limit at which the router starts to generate a warning message. Range: 1 to 100. Default: 75.

restart interval

(Optional) Specifies the time interval (in minutes) that a peering session is reestablished. Range: 1 to 65535.

warning-only

(Optional) Allows the router to generate a syslog message when the maximum-prefix limit is exceeded, instead of terminating the peering session.


Command Default

This command is disabled by default. Peering sessions are disabled when the maximum number of prefixes is exceeded. If you do not configure the restart interval, a disabled session stays down after the maximum-prefix limit is exceeded.

Command Modes

Peer template configuration mode

BGP router configuration mode

BGP neighbor address-family configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command was introduced.


Usage Guidelines

The number of prefixes that can be configured is limited only by the available system resources on a router.

The maximum-prefix command allows you to configure a maximum number of prefixes that a Border Gateway Protocol (BGP) routing process accepts from the specified peer. This feature provides a mechanism (in addition to distribute lists, filter lists, and route maps) to control prefixes received from a peer.

When the number of received prefixes exceeds the maximum number configured, BGP disables the peering session (by default). If you configure the restart interval, BGP automatically reestablishes the peering session at the configured time interval. If you do not configure the restart interval and a peering session is terminated because the maximum prefix limit has been exceed, the peering session is not reestablished until you enter the clear ip bgp command. If the warning-only keyword is configured, BGP sends only a log message and continues to peer with the sender.

There is no default limit on the number of prefixes that can be configured with this command. Limitations on the number of prefixes that can be configured are determined by the amount of available system resources.

Examples

This example shows how to set the maximum prefixes that are accepted from the 192.168.1.1 neighbor to 1000:

switch(config)# router bgp 64496
switch(config-router)# network 192.168.0.0
switch(config-router)# maximum-prefix 1000
switch(config-router)#
 
   

This example shows how to set the maximum number of prefixes that are accepted from the 192.168.2.2 neighbor to 5000. The router is also configured to display warning messages when 50 percent of the maximum-prefix limit (2500 prefixes) has been reached.

switch(config)# router bgp 64496
switch(config-router)# network 192.168.0.0
switch(config-router)# maximum-prefix 5000 50
switch(config-router)#
 
   

This example shows how to set the maximum number of prefixes that are accepted from the 192.168.3.3 neighbor to 2000. The router is also configured to reestablish a disabled peering session after 30 minutes.

switch(config)# router bgp 64496
switch(config-router)# network 192.168.0.0
switch(config-router)# maximum-prefix 2000 restart 30
switch(config-router)#
 
   

This example shows how to set the warning messages that are displayed when the maximum-prefix limit (500) for the 192.168.4.4 neighbor is exceeded:

switch(config)# router bgp 64496
switch(config-router)# network 192.168.0.0
switch(config-router)# maximum-prefix 500 warning-only
switch(config-router)#
 
   

This example shows how to set the maximum number of prefixes that are accepted from the 192.168.1.3 neighbor to 1500.

switch(config)# router bgp 64496
switch(config-router)# neighbor 192.168.1.3 remote-as 64497
switch(config-router-neighbor)# address-family ipv4 multicast
switch(config-router-neighbor-af)# maximum-prefix 1500
switch(config-router-neighbor-af)#
 
   

Related Commands

Command
Description

address-family (BGP neighbor)

Enters BGP neighbor address-family configuration mode.

neighbor

Configures a BGP neighbor.

network

Configures an IP prefix to advertise.

show ip bgp

Displays BGP configuration information.