The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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]
mac-list name [ seq number ] { permit | deny } mac-address [mac-mask]
name |
MAC list name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
seq number |
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 |
Portion of the MAC address to match against, in MAC address format. |
No match values are defined.
global configuration
Release |
Modification |
---|---|
5.0(2) |
This command was introduced. |
To filtean Overlay Transport Virtualization (OTV) packetr based on MAC address, use the mac-list command. You can match against this MAC list in a route map associated with OTV redistribution.
This command requires the LAN Enterprise license.
This example shows how to create the Red MAC list:
switch#configure terminal switch(config)# mac-list Red seq 1 permit 0022.5579.a4c1 ffff.ffff.0000
Command |
Description |
---|---|
match mac-list |
Matches a MAC address in a MAC list for OTV. |
show mac-list |
Displays information about a MAC list. |
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 ] }
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. |
None
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.1(2) |
This command was introduced. |
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 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.
This command does not require a license.
This example shows how to configure a list of AS numbers:
switch#configure terminal switch(config)# route-map IGP2BGP switch(config-route-map)# match as-number 64496, 64498-64510
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, or enables policy routing. |
To match a BGP autonomous system path access list, use the match as-path command in route-map configuration mode. To remove a path list entry, use the no form of this command.
match as-path name [ . .. name ]
no match as-path name [ . .. name ]
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 . |
No path lists are defined.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
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 will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.
This command does not require a license.
This example sets the autonomous system path to match BGP autonomous system path access list 20:
switch#configure terminal switch(config)# route-map IGP2BGP switch(config-route-map)# match as-path 20
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, and performs policy routing on packets. |
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, or enables policy routing. |
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 vrf |
Sets the VRF for next-hop resolution. |
set weight |
Specifies the BGP weight for the routing table. |
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.
community name [ . .. name ] [exact-match]
no community name [ . .. name ] [exact-match]
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. |
No community list is matched by the route map.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
A route map can have several parts. Any route that does not match at least one match command relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some 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.
This command does not require a license.
This example shows how to match two BGP communities:
switch#configure terminal switch(config)# route-map test2 switch(config-route-map)# match community bgpLow bgpHigh
This example shows that the routes matching community list 1 will have the weight set to 200. Any route that has the standard community 109 only will have the weight set to 200.
switch#configure terminal 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 that the routes that match the community list 500. Any route that has expanded community 1 will have the weight set to 150.
switch#configure terminal 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
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. |
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.
extcommunity name [ . .. name ] [exact-match]
no extcommunity name [ . .. name ] [exact-match]
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. |
No community list is matched by the route map.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.2(1) |
This command was introduced. |
A route map can have several parts. Any route that does not match at least one match command in the route map will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some 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.
This command does not require a license.
This example shows how to match two BGP extended community lists:
switch#configure terminal switch(config)# route-map test2 switch(config-route-map)# match extcommunity bgpLocal bgpRemote
This example shows how to that the routes that match the extended community list bgpLocal will change from nontransitive to transitive:
switch#configure terminal 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
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. |
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 ... ] }
nomatch interface { interface-type number [ , interface-type number ... ] }
interface-type |
Interface type. Use ? to see a list of supported interfaces. |
number |
(Optional) Interface number. Use ? to see the range. |
None
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.1(2) |
This command was introduced. |
Use the match interface command to provide a list of interfaces to match a route against. Route next-hop addresses that are reached by one of these 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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.
This command does not require a license.
This example shows how to configure a list of interfaces:
switch#configure terminal switch(config)# route-map test1 switch(config-route-map)# match interface ethernet 2/1, ethernet 4/3
Command |
Description |
---|---|
route-map |
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing. |
To distribute any routes that have a destination IPv4 network number address that is permitted by a standard access list, an expanded access list, or a prefix list, or to perform policy routing on packets, use the match ip address command. To remove the match ip address entry, use the no form of this command.
match ip address { access-list-name [access-list-name ...] | prefix-list prefix-list-name [ prefix-list-name...] }
nomatch ip address { access-list-name [access-list-name ...] | prefix-list prefix-list-name [ prefix-list-name...] }
access-list-name... |
Name of a standard or expanded access 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. |
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. |
No access list names or prefix lists are specified.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
The access-list-name argument is supported in route maps for Policy based-routing (PBR) only.
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the access-list-name or the prefix-list-name arguments .
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. 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 or to subject packets to policy routing.
Redistribution
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
Policy Routing
Another purpose of route maps is to enable policy routing. The match ip address command allows you to policy route packets based on criteria that can be matched with an expanded access list; for example, a protocol, protocol service, and source or destination IP address. To define the conditions for policy routing packets, use the ip policy route-map interface configuration command, in addition to the route-map global configuration command, and the match and set route-map configuration commands. 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 policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met. You might want to policy route packets based on their source, for example, using an access list.
This command does not require a license.
This example shows how to match routes that have addresses specified by an access list test:
switch#configure terminal switch(config)# feature pbr switch(config)# interface ethernet 2/10 switch(config-if)# ip policy route-map chicago switch(config-if)# exit switch(config)# route-map chicago switch(config-route-map)# match ip address test
Command |
Description |
---|---|
ip policy route-map |
Identifies a route map to use for policy routing on an interface. |
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 length |
Bases policy routing on the Level 3 length of a packet. |
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, or enables policy routing. |
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 ip default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco NX-OS software has no explicit route to a destination. |
set ip next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
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. |
To configure the IPv4 multicast features for the route-map matching, use the match ip multicast route-map configuration 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 | bidir } ] }
no match ip multicast
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 |
Specifies the any-source multicast (ASM) rendezvous point type. |
bidir |
Specifies the bidirectional (bidir) multicast rendezvous point type. |
None
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
4.1(2) |
Added source keyword. |
To specify the multicast attributes to match, use 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.
This command does not require a license.
This example shows how to specify the group IPv4 prefix and the length of the IPv4 prefix for the neighbors to match:
switch#configure terminal 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 the IPv4 prefix for the neighbors to match:
switch#configure terminal 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)#
Command |
Description |
---|---|
ip policy route-map |
Identifies a route map to use for policy routing on an interface. |
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 length |
Bases policy routing on the Level 3 length of a packet. |
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, or enables policy routing. |
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 ip default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco NX-OS software has no explicit route to a destination. |
set ip next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
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. |
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 in route-map configuration mode. 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 ]
nomatch ip next-hop prefix-list prefix-list-name [ .. .prefix-list-name ]
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. |
Routes are distributed freely, without being required to match a next hop address.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
This command does not require a license.
This example shows how to distributes routes that have a next hop router address passed by the prefix list test:
switch#configure terminal switch(config)# route-map blue switch(config-route-map)# match ip next-hop prefix-list test
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
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 in route-map configuration mode. 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 ]
nomatch ip route-source prefix-list prefix-list-name [ .. .prefix-list-name ]
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. |
No filtering on route source.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
This command does not require a license.
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#configure terminal switch(config)# route-map blue switch(config-route-map)# match ip route-source prefix-list 5 80
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
To distribute any routes that have a destination IPv6 network number address that is permitted by a standard access list, an expanded access list, or a prefix list, or to perform policy routing on packets, use the match ipv6 address command in route-map configuration mode. To remove the match statement from the route map, use the no form of this command.
match ipv6 address { prefix-list prefix-list-name [ prefix-list-name . .. ] | access-list-name }
nomatch ipv6 address { prefix-list prefix-list-name [ prefix-list-name . .. ] | access-list-name }
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. You can configure up to 32 prefix lists. |
access-list-name... |
Name of a standard or expanded access list. It can be any alphanumeric string up to 63 characters. You can only use access lists for policy-based routing. |
No access list names or prefix lists are specified.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
The access-list-name argument is supported in route-maps for PBR only.
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 or to subject packets to policy routing. Both purposes are described in this section.
Redistribution
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
Policy Routing
Another purpose of route maps is to enable policy routing. The match ipv6 address command allows you to policy route packets based on criteria that can be matched with an expanded access list; for example, a protocol, protocol service, and source or destination IP address. To define the conditions for policy routing packets, use the ipv6 policy route-map interface configuration command, in addition to the route-map global configuration command, and the match and set route-map configuration commands. 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 policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met. You might want to policy route packets based on their source, for example, using an access list.
This command does not require a license.
This example shows how to match routes that have addresses specified by the access list named red:
switch#configure terminal switch(config)# feature pbr switch(config)# route-map blue switch(config-route-map)# match ipv6 address red
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 length |
Bases policy routing on the Level 3 length of a packet. |
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, or enables policy routing. |
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 ip default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco NX-OS software has no explicit route to a destination. |
set ip next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
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. |
To configure the IPv6 multicast features for the route-map matching, use the match ipv6 multicast route-map configuration command.
match ipv6 multicast { group address /length | source address /length | rp address /length [ rp-type { asm | bidir } ] }
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 IPv6 address or prefix. The range for length is 0 to 0x7FFFFFFF . You can specify the 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 IPv6 address or prefix. The range for length is 0 to 0x7FFFFFFF . You can specify the group, source, and rp options. |
rp address/length |
Specifies the IPv6 rendezvous prefix (RP) and the length of the IPv6 prefix mask in bits, in this format: A:B::C:D/length. The network number can be any valid IPv6 address or prefix. The bit mask can be a number from 0 to 32. You can specify the group, source, and rp options. |
rp-type |
(Optional) Specifies the multicast rendezvous point type. |
asm |
Specifies the any-source multicast (ASM) rendezvous point type. |
bidir |
Specifies the bidirectional (bidir) multicast rendezvous point type. |
None
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
4.1(2) |
Added the source keyword. |
To specify the multicast attributes to match, use the match ipv6 multicast route-map configuration command. You must enter the feature pbr global configuration mode command to enable PBR before entering the route-map 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 ipv6 multicast command.
You can specify the group, source, and rp options.
This command does not require a license.
This example shows how to specify the group IPv6 prefix and the length of the IPv6 prefix for the neighbors to match:
switch#configure terminal switch(config)# route-map blueberry switch(config-route-map)#match ipv6 multicast group 30:0::0:0/12 switch(config-route-map)#
This example shows how to specify both the group IPv6 prefix and the rendezvous point IPv6 prefix for the neighbors to match:
switch#configure terminal switch(config)# route-map red switch(config-route-map)#match ipv6 multicast group 30:0::0:0/12 rp 2001:0DB8::/48 switch(config-route-map)#
Command |
Description |
---|---|
match as-path |
Matches a BGP autonomous system path access list. |
match community |
Matches a BGP community. |
match ipv6 next-hop |
Redistributes any routes that have a next hop router address passed by one of the access lists specified. |
match ipv6 route-source |
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists. |
match length |
Bases policy routing on the Level 3 length of a packet. |
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, or enables policy routing. |
set as-path |
Modifies an autonomous system path for BGP routes. |
set community |
Sets the BGP communities attribute. |
set ipv6 default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco NX-OS software has no explicit route to a destination. |
set ipv6 next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
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. |
To redistribute any IPv6 routes that have a next hop router address passed by one of the access lists specified, use the match ipv6 next-hop prefix-list command. To remove the next hop entry, use the no form of this command.
match ipv6 next-hop prefix-list name [ .. .name ]
nomatch ipv6 next-hop prefix-list name [ .. .name ]
name... |
Prefix list name. It can be any alphanumeric string up to 63 characters. The ellipsis indicates that multiple values can be entered, up to 32 prefix lists. |
Routes are distributed freely, without being required to match a next hop address.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the 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.
Note | A permit route map containing only set commands and no match commands permits all routes. |
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
This command does not require a license.
This example shows how to distribute routes that have a next hop router address passed by prefix list 5:
switch# configure terminal switch(config)# route-map blue switch(config-route-map)#match ipv6 next-hop prefix-list test
Command |
Description |
---|---|
match as-path |
Matches a BGP autonomous system path access list. |
match community |
Matches a BGP community. |
match ipv6 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 length |
Bases policy routing on the Level 3 length of a packet. |
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, or enables policy routing. |
set as-path |
Modifies an autonomous system path for BGP routes. |
set community |
Sets the BGP communities attribute. |
set ipv6 default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco NX-OS software has no explicit route to a destination. |
set ipv6 next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
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. |
To redistribute IPv6 routes that have been advertised by routers and access servers at the address specified by the access lists, use the match ipv6 route-source prefix-list command in route-map configuration mode. To remove the route-source entry, use the no form of this command.
match ipv6 route-source prefix-list name [ .. .name ]
nomatch ipv6 route-source prefix-list name [ .. .name ]
name... |
Prefix list name. It can be any alphanumeric string up to 63 characters. The ellipsis indicates that multiple values can be entered, up to 32 prefix lists. |
No filtering on route source.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the 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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
This command does not require a license.
This example shows how to distribute routes that have been advertised by routers and access servers at the addresses specified by the prefix list test:
switch# configure terminal switch(config)# route-map blue switch(config-route-map)# match ipv6 route-source prefix-list test
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
To base policy routing on the Level 3 length of a packet, use the match length command. To remove the entry, use the no form of this command.
match length minimum-length maximum-length
no match length minimum-length maximum-length
minimum-length |
Minimum Level 3 length of the packet, inclusive, allowed for a match. Range: 0 to 2147483647. |
maximum-length |
Maximum Level 3 length of the packet, inclusive, allowed for a match. Range: 0 to 2147483647. |
No policy routing occurs on the length of a packet.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
In IPv4, use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
In PBR for IPv6, use the ipv6 policy route-map or ipv6 local policy route-map command to define conditions for policy routing packets.
In IPv4, 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 packet to be routed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.
In IPv4, you might want to base your policy routing on the length of packets so that your interactive traffic and bulk traffic are directed to different routers.
This command does not require a license.
This example shows how to set the packets 3 to 200 bytes long:
switch# configure terminal switch(config)# route-map blue switch(config-route-map)# match length 3 200
Command |
Description |
---|---|
match ip address |
Distributes any routes that have a destination network number address that is permitted by a standard or expanded access list, and performs policy routing on packets. |
match ipv6 address |
Specifies an IPv6 access list to use to match packets for PBR for IPv6. |
match length |
Bases policy routing on the Level 3 length of a packet. |
route-map |
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing. |
set ip default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco NX-OS software has no explicit route to a destination. |
set ipv6 default next-hop |
Specifies an IPv6 default next hop to which matching packets will be forwarded. |
set ipv6 next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
set ipv6 precedence |
Sets the precedence value in the IPv6 packet header. |
To redistribute routes in the routing table that match the routing metric value, use the match metriccommand. To remove the tag entry, use the no form of this command.
match metric metric-value [+-deviation-number] [ . .. metric-value [+-deviation-number] ]
nomatch metric metric-value [+-deviation-number] [ . .. metric-value [+-deviation-number] ]
metric-value |
Internal route metric. The range is from 1 to 4294967295. |
+ - |
Specifies a standard deviation range of the metric. The router will match any metric that falls inclusively in that range. |
deviation-number |
(Optional) Standard deviation number that will offset the number configured for the metric-value argument. The deviation-number argument can be any number. There is no default. |
No match values are defined.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
5.0(2) |
This command was introduced. |
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
This command requires the LAN Enterprise license.
This example shows how to redistribute routes stored in the routing table with a metric of 5:
switch# configure terminal switch(config)# route-map blueberry switch(config-route-map)# match metric 5
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
To redistribute routes in the routing table that match a MAC address in the MAC list, use the match mac-listcommand in route-map configuration mode. To remove the tag entry, use the no form of this command.
match mac-list listname
no match mac-list listname
listname |
MAC list name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
No match values are defined.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
5.0(2) |
This command was introduced. |
To redistribute routes with the specified MAC address into an Overlay Transport Virtualization (OTV) network, use the match mac-list 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.
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
This command requires the LAN Enterprise license.
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
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
To redistribute routes of the specified type, use the match route-type command in route-map configuration mode. To remove the route type entry, use the no form of this command.
match route-type { external | inter-area | internal | intra-area | level-1 | level-2 | local | nssa-external | type-1 | type-2 }
no match route-type { external | inter-area | internal | intra-area | level-1 | level-2 | local | nssa-external | type-1 | type-2 }
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. |
inter-area |
Specifies OSPF inter area route. 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. |
intra-area |
Specifies OSPF intra area route. You can specify more than one keyword. |
level-1 |
Specifies the Intermediate System-to-Intermediate System (IS-IS) level-1 route. You can specify more than one keyword. |
level-2 |
Specifies the IS-IS level-2 route. 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. |
This command is disabled by default.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
6.1(1) |
Added inter-area and intra-area keywords to the syntax description. |
4.0(1) |
This command was introduced. |
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
You can specify more than one keyword.
This command does not require a license.
This example shows how to redistribute internal routes:
switch# configure terminal 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# configure terminal switch(config)# route-map blueberry switch(config-route-map)# match route-type internal type-1
This example shows how to specifies OSPF inter area route:
switch# configure terminal switch(config)# route-map blueberry switch(config-route-map)# match route-type inter-area switch(config-route-map)#
This example shows how to specifies OSPF intra area route:
switch# configure terminal switch(config)# route-map blueberry switch(config-route-map)# match route-type intra-area switch(config-route-map)#
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
To specify a match clause that matches external routes from sources that match the source protocol, use the match source-protocol command.
match source-protocol source-protocol [as-number]
source-protocol |
Source protocol. The valid options are bgp, connected, eigrp, isis, ospf, rip, and static. |
as-number |
Autonomous System Number (ASN). The range is from 1 to 65535. |
None
config-router mode
Release |
Modification |
---|---|
6.2(2) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to specify a match clause that matches external routes from sources that match the source protocol:
switch# configure terminal switch(config)# route-map metric-rangeouter eigrp Test1 switch(config-router)# match metric external 500 +- 100 switch(config-router)# match source-protocol bgp 45000 switch(config-router)#
Command |
Description |
---|---|
set tag |
Sets a tag value on the route in the destination routing protocol when all the match criteria of a route map are met. |
To redistribute routes in the routing table that match the specified tags, use the match tagcommand. To remove the tag entry, use the no form of this command.
match tag tag-value [ .. .tag-value ]
nomatch tag tag-value [ .. .tag-value ]
tag-value |
List of one or more route tag values. Each can be an integer from 0 to 4294967295. You can configure up to 32 tags. |
No match tag values are defined.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
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-mapcommand. 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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
This command does not require a license.
This example shows how to redistribute routes stored in the routing table with tag 5:
switch# configure terminal switch(config)# route-map blueberry switch(config-route-map)# match tag 5
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
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
vlan-range |
Range of VLAN that this command matches against. The range is from 1 to 4094. |
No match VLAN values are defined.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
5.0(2) |
This command was introduced. |
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 relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be 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.
This command does not require a license.
This example redistributes routes that match VLANs 5-10:
switch# configure terminal switch(config)# route-map blueberry switch(config-route-map)# match vlan 5-10
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, and performs policy routing on packets. |
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, or enables policy routing. |
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. |
To set the maximum time for which link-state packets (LSPs) persist without being refreshed, use the max-lsp-lifetime command. To restore the default time, use the no form of this command.
max-lsp-lifetime value
no max-lsp-lifetime
value |
(Optional) Maximum LSP lifetime in seconds. Range: 1 to 65535. Default: 1200. |
The default is 1200 seconds.
Router configurationVRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
The maximum LSP lifetime must be greater than the LSP refresh interval.
This command requires the Enterprise Services license.
This example shows how to set the maximum time that the LSP persists to 11,000 seconds (more than three hours):
switch# configure terminal switch(config)# router isis switch(config-router)# max-lsp-lifetime 11000
Command |
Description |
---|---|
feature isis |
Enables IS-IS on the router. |
router isis |
Enables IS-IS. |
To configure the Open Shortest Path First (OSPF) protocol to advertise a maximum metric so that other routers do not prefer the router as an intermediate hop in their shortest path first (SPF) calculations, use the max-metric router-lsa command. To disable the advertisement of a maximum metric, use the no form of this command.
max-metric router-lsa [ external-lsa [max-metric-value] [include-stub] ] [ on-startup [ seconds | wait-for bgp tag ] ] [ summary-lsa [max-metric-value] ]
nomax-metric router-lsa [ external-lsa [max-metric-value] [include-stub] ] [ on-startup [ seconds | wait-for bgp tag ] ] [ summary-lsa [max-metric-value] ]
external-lsa |
Specifies the external LSAs. |
max-metric-value |
(Optional) Specifies the max-metric values for external LSAs. The range is 1-65535. |
include-stub |
Advertises the max-metric for stub links. |
on-startup |
(Optional) Configures the router to advertise a maximum metric at startup. |
seconds |
(Optional) Maximum metric (in seconds) that is advertised for the specified time interval. The configurable range is from 5 to 86400 seconds. The default is 600 seconds. |
wait-for bgp tag |
(Optional) Advertises a maximum metric until Border Gateway Protocol (BGP) routing tables have converged or the default timer has expired. The default timer is 600 seconds. |
summary-lsa |
Specifies the summary LSAs. |
max-metric-value |
(Optional) Specifies the max-metric value for summary LSAs. The range is from 1-65535. |
Originates router link-state advertisements (LSAs) with normal link metrics.
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the max-metric router-lsa command to originate LSAs with a maximum metric (LSInfinity: 0xFFFF) through all nonstub links, which allows BGP routing tables to converge without attracting transit traffic (if there are not alternate lower cost paths to the router). The router advertises accurate (normal) metrics after the configured or default timers expire or after BGP sends a notification that routing tables have converged.
Updates hold true to all releases that have this command and option.
wait-for-bgp is a feature to avoid the IGP from declaring its ready to be used for transit after a reload, if BGP on the device has not converged yet (received the entire routing table from its peers and installed in FIB). This prevents an upstream node sending externally bound (BGP) traffic to this node prematurely and causing traffic blackholing.
Note | Directly connected links in a stub network are not affected by the configuration of a maximum or infinite metric because the cost of a stub link is always set to the output interface cost. |
You can use the max-metric router-lsa command in the following situations:
Note | You should not save the running configuration of a router that is configured for a graceful shutdown because the router will continue to advertise a maximum metric after it is reloaded. |
This command requires the Enterprise Services license.
This example shows how to configure a router that is running OSPF to advertise a maximum metric for 100 seconds:
switch# configure terminal switch(config)# router ospf 100 switch(config-router)# max-metric router-lsa on-startup 100
This example shows how to configure a router to advertise a maximum metric until BGP routing tables converge or until the default timer expires (600 seconds):
switch# configure terminal switch(config)# router ospf 100 switch(config-router)# max-metric router-lsa on-startup wait-for bgp bgpTag
Command |
Description |
---|---|
show ip ospf |
Displays general information about OSPF routing processes. |
To configure the Open Shortest Path First version 2 (OSPFv2) protocol to advertise a maximum metric so that other routers do not prefer the router as an intermediate hop in their shortest path first (SPF) calculations, use the max-metric router-lsa (OSPFv2) command. To disable the advertisement of a maximum metric, use the no form of this command.
max-metric router-lsa [ external-lsa [max-metric-value] ] [include-stub] [ on-startup [seconds] | wait-for bgp tag ] [ summary-lsa [max-metric-value] ]
no max-metric router-lsa [ external-lsa [max-metric-value] ] [include-stub] [ on-startup [seconds] | wait-for bgp tag ] [ summary-lsa [max-metric-value] ]
external-lsa |
(Optional) Specifies the external link-state advertisements (LSAs). |
max-metric-value |
(Optional) Max-metric values for summary LSAs. The range is from 1 to 167777215. |
include-stub |
Advertises the max-metric for stub links. |
on-startup |
(Optional) Configures the router to advertise a maximum metric at startup. |
seconds |
(Optional) Maximum metric (in seconds) that is advertised for the specified time interval. The configurable range is from 5 to 86400 seconds. The default is 600 seconds. |
wait-for bgp |
(Optional) Advertises a maximum metric until Border Gateway Protocol (BGP) routing tables have converged or the default timer has expired. The default timer is 600 seconds. |
tag |
(Optional) Tag of the BGP instance. The maximum size is 20 characters. |
summary-lsa |
Specifies the summary LSAs. |
Originates router link-state advertisements (LSAs) with normal link metrics.
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
6.2(8) |
This command was introduced. |
Use the max-metric router-lsa command to originate LSAs with a maximum metric (LSInfinity: 0xFFFF) through all nonstub links, which allows BGP routing tables to converge without attracting transit traffic (if there are not alternate lower cost paths to the router). The router advertises accurate (normal) metrics after the configured or default timers expire or after BGP sends a notification that routing tables have converged.
Updates hold true to all releases that have this command and option.
The wait-for bgp keywords allow you to avoid the IGP from declaring it is ready to be used for transit after a reload, if BGP on the device has not converged yet (received the entire routing table from its peers and installed in FIB). This process prevents an upstream node sending externally bound (BGP) traffic to this node prematurely and causing traffic blackholing.
Note | Directly connected links in a stub network are not affected by the configuration of a maximum or infinite metric because the cost of a stub link is always set to the output interface cost. |
You can use the max-metric router-lsa (OSPFv2) command in the following situations:
Note | You should not save the running configuration of a router that is configured for a graceful shutdown because the router continues to advertise a maximum metric after it is reloaded. |
This command requires the Enterprise Services license.
This example shows how to configure a router that is running OSPF to advertise a maximum metric for 100 seconds:
switch# configure terminal switch(config)# router ospf 100 switch(config-router)# max-metric router-lsa on-startup 100
This example shows how to configure a router to advertise a maximum metric until BGP routing tables converge or until the default timer expires (600 seconds):
switch# configure terminal switch(config)# router ospf 100 switch(config-router)# max-metric router-lsa on-startup wait-for bgp bgpTag
Command |
Description |
---|---|
max-metric router-lsa (OSPFv3) |
Configures the OSPFv3 protocol to advertise a maximum metric. |
show ip ospf |
Displays general information about OSPF routing processes. |
To configure the Open Shortest Path First version 3 (OSPFv3) protocol to advertise a maximum metric so that other routers do not prefer the router as an intermediate hop in their shortest path first (SPF) calculations, use the max-metric router-lsa (OSPFv3) command. To disable the advertisement of a maximum metric, use the no form of this command.
max-metric router-lsa [ external-lsa [max-metric-value] ] [stub-prefix-lsa] [ on-startup [seconds] | wait-for bgp tag ] [ inter-area-prefix-lsa [max-metric-value] ]
no max-metric router-lsa [ external-lsa [max-metric-value] ] [stub-prefix-lsa] [ on-startup [seconds] | wait-for bgp tag ] [ inter-area-prefix-lsa [max-metric-value] ]
external-lsa |
(Optional) Specifies the external link-state advertisements (LSAs). |
max-metric-value |
(Optional) Max-metric values for summary LSAs. The range is from 1 to 167777215. |
stub-prefix-lsa |
(Optional) Advertises the max-metric for the stub links. |
on-startup |
(Optional) Configures the router to advertise a maximum metric at startup. |
seconds |
(Optional) Maximum metric (in seconds) that is advertised for the specified time interval. The configurable range is from 5 to 86400 seconds. The default is 600 seconds. |
wait-for bgp |
(Optional) Advertises a maximum metric until Border Gateway Protocol (BGP) routing tables have converged or the default timer has expired. The default timer is 600 seconds. |
tag |
(Optional) Tag of the BGP instance. The maximum size is 20 characters. |
inter-area-prefix-lsa |
(Optional) Advertises the inter-area LSAs. |
Originates router link-state advertisements (LSAs) with normal link metrics.
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
6.2(8) |
This command was introduced. |
Use the max-metric router-lsa (OSPFv3) command to originate LSAs with a maximum metric (LSInfinity: 0xFFFF) through all nonstub links, which allows BGP routing tables to converge without attracting transit traffic (if there are not alternate lower cost paths to the router). The router advertises accurate (normal) metrics after the configured or default timers expire or after BGP sends a notification that routing tables have converged.
Updates hold true to all releases that have this command and option.
The wait-for bgp keywords allow you to avoid the IGP from declaring it is ready to be used for transit after a reload, if BGP on the device has not converged yet (received the entire routing table from its peers and installed in FIB). This process prevents an upstream node sending externally bound (BGP) traffic to this node prematurely and causing traffic blackholing.
Note | Directly connected links in a stub network are not affected by the configuration of a maximum or infinite metric because the cost of a stub link is always set to the output interface cost. |
You can use the max-metric router-lsa (OSPFv3) command in the following situations:
Note | You should not save the running configuration of a router that is configured for a graceful shutdown because the router continues to advertise a maximum metric after it is reloaded. |
This command requires the Enterprise Services license.
This example shows how to configure a router that is running OSPFv3 to advertise a maximum metric for 100 seconds:
switch# configure terminal switch(config)# router ospfv3 200 switch(config-router)# max-metric router-lsa on-startup 100
This example shows how to configure a router to advertise a maximum metric for the stub links:
switch# configure terminal switch(config)# router ospfv3 200 switch(config-router)# max-metric router-lsa stub-prefix-lsa
Command |
Description |
---|---|
max-metric router-lsa (OSPFv2) |
Configures the OSPFv2 protocol to advertise a maximum metric. |
show ip ospf |
Displays general information about OSPF routing processes. |
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
number |
(Optional) Maximum number of AS numbers allowed in the AS-path attribute. The range is from 1 to 2000. |
No limit
Router configuration
VRF configuration
Release |
Modification |
---|---|
4.1(2) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to set the maximum number of AS numbers to 50:
switch# configure terminal switch(config)# router bgp 64496 switch(config-router)# maxas-limit 50
Command |
Description |
---|---|
feature bgp |
Enables the BGP feature. |
router bgp |
Creates a BGP instance. |
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
ibgp |
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 8. |
1 path
Router address family configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
There are no usage guidelines for this command.
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)# address-family ipv4 unicast switch(config-router-af)# maximum-paths 16
Command |
Description |
---|---|
feature bgp |
Enables the BGP feature on the router. |
router bgp |
Enables BGP. |
To control the maximum number of parallel routes that the Enhanced Interior Gateway Routing Protocol (EIGRP) can support, use the maximum-paths command. To remove the maximum-paths command from the configuration file and restore the default, use the no form of this command.
maximum-paths maximum
no maximum-paths
maximum |
Maximum number of parallel routes that EIGRP can install in a routing table. The range is from 1 to 16 routes. |
8 paths
Address-family configuration
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
4.0(2) |
The default maximum paths was changed to 8 from 16. |
Use the maximum-paths command to allow EIGRP to install multiple paths into the routing table for each prefix. Multiple paths are installed for both internal and external routes that are learned in the same autonomous system and that are equal cost (according to the EIGRP best path algorithm).
This command requires the Enterprise Services license.
This example shows how to allow a maximum of 10 paths to a destination:
switch# configure terminal switch(config)# router eigrp 1 switch(config-router)# maximum-paths 10
To control the maximum number of parallel routes that an IP routing protocol can support, use the maximum-paths configuration mode command. To restore the default number of parallel routes, use the no form of this command.
maximum-paths number-paths
no maximum-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. |
8 paths
Router configurationVRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
There are no usage guidelines for this command.
This example shows how to allow a maximum of 16 paths to a destination for an IS-IS routing process:
switch# configure terminal switch(config)# router isis 3 switch(config-router)# maximum-paths 16
Command |
Description |
---|---|
feature isis |
Enables IS-IS on the router. |
router isis |
Enables IS-IS. |
To configure the maximum number of equal cost parallel routes that the Routing Information Protocol (RIP) will install into the routing table, use the maximum-paths command. To remove the maximum-paths command and restore the system to its default condition with respect to RIP, use the no form of this command.
maximum-paths maximum
no maximum-paths
maximum |
Maximum number of parallel routes that RIP can install in a routing table. The range is from 1 to 16. |
8 paths
Router address-family configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
This command does not require a license.
This example shows how to allow a maximum of 16 equal cost paths to a destination:
switch# configure terminal switch(config)# router rip Enterprise switch(config-router)# address-family ipv4 unicast switch(config-router-af)# maximum-paths 16
Command |
Description |
---|---|
address-family |
Enters address-family configuration mode. |
To control the maximum number of parallel routes that Open Shortest Path First (OSPF) can support, use the maximum-paths command. To remove the maximum-paths command from the configuration file and restore the system to the default, use the no form of this command.
maximum-paths maximum
no maximum-paths
maximum |
Maximum number of parallel routes that OSPF can install in a routing table. The range is from 1 to 16 routes. |
8 paths
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the maximum-paths command to allow OSPF to install multiple paths into the routing table for each prefix. Multiple paths are installed for both internal and external routes that are learned in the same autonomous system and that have an equal cost (according to the OSPF shortest path first algorithm).
This command requires the Enterprise Services license.
This example shows how to allow a maximum of 10 paths to a destination:
switch# configure terminal switch(config)# router ospf 1 switch(config-router)# maximum-paths 10
To control the maximum number of parallel routes that Open Shortest Path First version 3 (OSPFv3) can support, use the maximum-paths command. To remove the maximum-paths command from the configuration file and restore the system to the default, use the no form of this command.
maximum-paths maximum
no maximum-paths
maximum |
Maximum number of parallel routes that OSPFv3 can install in a routing table. The range is from 1 to 16 routes. |
8 paths
Address-family configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the maximum-paths command to allow OSPFv3 to install multiple paths into the routing table for each prefix. Multiple paths are installed for both internal and external routes that are learned in the same autonomous system and that have an equal cost (according to the OSPFv3 shortest path first algorithm).
This command requires the Enterprise Services license.
This example shows how to allow a maximum of 10 paths to a destination:
switch# configure terminal switch(config)# router ospfv3 1 switch(config-router)# address-family ipv6 unicast switch(config-router-af)# maximum-paths 10
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
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 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. |
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 will stay down after the maximum-prefix limit is exceeded.
Peer template configuration
Router bgp configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
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 will accept 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 the restart keyword is configured, BGP will automatically reestablish the peering session at the configured time interval. If the restart keyword is not configured and a peering session is terminated because the maximum prefix limit has been exceed, the peering session will not be be reestablished until the clear ip bgp command is entered. 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.
In this example, the maximum prefixes that will be accepted from the 192.168.1.1 neighbor is set to 1000:
switch# configure terminal switch(config)# router bgp 64496 switch(config-router)# network 192.168.0.0 switch(config-router)# maximum-prefix 1000
This example shows the maximum number of prefixes that will be accepted from the 192.168.2.2 neighbor is set 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# configure terminal switch(config)# router bgp 64496 switch(config-router)# network 192.168.0.0 switch(config-router)# maximum-prefix 5000 50
This example shows the maximum number of prefixes that will be accepted from the 192.168.3.3 neighbor is set to 2000. The router is also configured to reestablish a disabled peering session after 30 minutes.
switch# configure terminal switch(config)# router bgp 64496 switch(config-router)# network 192.168.0.0 switch(config-router)# maximum-prefix 2000 restart 30
This example shows the warning messages that will be displayed when the maximum-prefix limit (500) for the 192.168.4.4 neighbor is exceeded:
switch# configure terminal switch(config)# router bgp 64496 switch(config-router)# network 192.168.0.0 switch(config-router)# maximum-prefix 500 warning-only
To enable Open Shortest Path First (OSPF) Message Digest 5 (MD5) authentication on a virtual link, use the message-digest-key command. To remove an old MD5 key, use the noform of this command.
message-digest-key key-id md5 [ 0 | 3 ] key
no message-digest-key key-id
key-id |
Identifier in the range from 1 to 255. |
0 |
Specifies to use an unencrypted password to generate the md5 key. |
3 |
Specifies to use an encrypted 3DES password to generate the md5 key. |
key |
Alphanumeric password of up to 16 bytes. |
Unencrypted
Virtual link configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the message-digest-key command when you configure the MD5 digest authentication mode. Both interfaces on the virtual link must have the same key value.
This command requires the Enterprise Services license.
This example shows how to set key 19 with the password 8ry4222:
switch# configure terminal switch(config-router)# area 22 virtual-link 192.0.2.2 switch(config-router-vlink)# message-digest-key 19 md5 8ry4222
Command |
Description |
---|---|
authentication (virtual-link) |
Configures the authentication mode on a virtual link. |
To enable the cost of direct routes, use the metric direct 0 command. To disable this function, use the no form of this command.
metric direct 0
no metric direct 0
This command has no arguments or keywords.
Disabled
RIP router configuration mode
Release |
Modification |
---|---|
6.1(1) |
This command was introduced. |
When Cisco IOS and NX-OS are connected in a network, the metric direct command needs to be configured on all the NX-OS routers for them to be compatible with Cisco IOS RIP.
When metric-direct 0 is enabled:
When the metric-direct is disabled (which is the default behavior):
This command requires the Enterprise Services license.
This example shows how to enable the cost of direct routes:
switch# configure terminal switch(config)# feature rip switch(config)# router rip 1 switch(config-router)# metric direct 0
Command |
Description |
---|---|
metric weights |
Tunes the EIGRP metric calculations. |
To advertise that those Enhanced Interior Gateway Routing Protocol (EIGRP) routes with a higher hop count than you specified are unreachable, use the metric maximum-hops command. To reset the value to the default, use the no form of this command.
metric maximum-hops hops-number
no metric maximum-hops
hops-number |
Maximum hop count. The range is from 1 to 255 hops. |
hops-number:100
Address-family configuration
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the metric maximum-hops command to provide a safety mechanism that causes EIGRP to advertise as unreachable routes with a hop count greater than the value assigned to the hops-number argument.
This command requires the Enterprise Services license.
This example shows how to configure a hop count to 200:
switch# configure terminal switch(config)# router eigrp 1 switch(config-router) address-family ipv4 unicast switch(config-router-af)# metric maximum-hops 200
Command |
Description |
---|---|
metric weights |
Tunes the EIGRP metric calculations. |
To set the default metrics for the Enhanced Interior Gateway Routing Protocol (EIGRP), use the metric rib-scale command. To restore the default state, use the no form of this command.
metric rib-scale scale-value
no metric rib-scale scale-value
scale-value |
Scale value to divide the EIGRP wide metric by converting it to a 4-byte RIB metric. The range is from 1 to 256. |
128
Router eigrp submode
Release |
Modification |
---|---|
5.2(1) |
This command was introduced. |
You can set or modify the rib scale value only in 64-bit metric mode.
This command does not require a license.
This example shows how to set the rib-scaling factor for EIGRP:
switch# configure terminal switch(config)# router eigrp csco123 switch(config-router)# metric rib-scale 130 switch(config-router)#
This example shows how to remove the rib-scaling factor for EIGRP and restore the default state:
switch# configure terminal switch(config)# router eigrp csco123 switch(config-router)# no metric rib-scale 130 switch(config-router
Command |
Description |
---|---|
metric version |
Changes the metric version to the 64-bit mode. |
metric weights |
Tunes the Enhanced Interior Gateway Routing Protocol (EIGRP) metric calculations. |
To tune the Enhanced Interior Gateway Routing Protocol (EIGRP) metric calculations, use the metric weights command. To reset the values to their defaults, use the no form of this command.
metric weights tos k1 k2 k3 k4 k5 k6
no metric weights
tos |
Type of service (ToS) which must always be zero. |
k1 k2 k3 k4 k5 k6 |
Constants that convert an EIGRP metric vector into a scalar quantity. The arguments are as follows:
|
tos: 0
k1: 1
k2: 0
k3: 1
k4: 0
k5: 0
k:6 0
Address-family configuration
Router configuration
Router VRF configuration
Release |
Modification |
---|---|
5.2(1) |
Added the k6 keyword. |
4.0(1) |
This command was introduced. |
Use the metric weights command to alter the default behavior of EIGRP routing and metric computation and allow the tuning of the EIGRP metric calculation for a particular ToS.
If k5 equals 0, Cisco NX-OS computes the composite EIGRP metric according to the following formula:
metric = [k1 x bandwidth + (k2 x bandwidth)/(256 – load) + k3 x delay]
If k5 does not equal zero, Cisco NX-OS performs an additional calculation:
metric = metric x [k5/(reliability + k4)]
Use the bandwidth command in interface configuration mode to set the bandwidth metric.
Use the delay command in interface configuration mode to set the delay.
255 is a reliability of 100 percent or a perfectly stable link. A load of 255 indicates a completely saturated link.
Configuration of k6 is supported only in 64-bit metric version mode.
This command requires the Enterprise Services license.
This example shows how to set the metric weights to change the default values:
switch# configure terminal switch(config)# router eigrp 1 switch(config-router) address-family ipv4 unicast switch(config-router-af)# metric weights 0 2 0 2 0 2
Command |
Description |
---|---|
bandwidth |
Sets the EIGRP bandwidth metric in interface configuration mode. |
delay |
Sets the EIGRP delay metric in interface configuration mode. |
To configure the metric style that Intermediate-System-to-Intermediate System (IS-IS) uses in advertised link-state update messages (LSPs), use the metric-style transition command. To revert to the default setting, use the no form of this command.
metric-style transition
no metric-style transition
This command has no keywords or arguments.
Wide metric style
Router configuration
VRF configuration
Release |
Modification |
---|---|
4.1(2) |
This command was introduced. |
Use the metric-style transition command to configure IS-IS to generate and accept both narrow metric style and wide metric style Type Length Value (TLV) objects.
This command requires the Enterprise Services license.
This example shows how to configure the metric style:
switch# configure terminal switch(config-router)# metric-style transition switch(config-router)#
Command |
Description |
---|---|
feature isis |
Enables IS-IS on the router. |
router isis |
Creates an IS-IS instance. |
To configure the switch to run in the 64-bit metric version, use the metric version command. To restore the default state, use the no form of this command.
metric version 64bit
no metric version 64bit
64-bit |
64-bit metric version. |
32-bit mode
Router eigrp submode
VRF submode
Release |
Modification |
---|---|
5.2(1) |
This command was introduced. |
This command does not require a license.
This example shows how to configure the switch to run in the 64-bit metric version:
switch# configure terminal switch(config)# router eigrp csco123 switch(config-router)# metric version 64bits switch(config-router)#
This example shows how to remove the 64-bit metric version configuration from the switch:
switch(config-router)# no metric version 64bits switch(config-router)#
Command |
Description |
---|---|
metric rib-scale |
Sets the default metrics for Enhanced Interior Gateway Routing Protocol (EIGRP). |
metric weights |
Tunes the Enhanced Interior Gateway Routing Protocol (EIGRP) metric calculations. |