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 inject routes from one routing domain into the Border Gateway Protocol (BGP), use the redistribute command. To remove the redistribute command from the configuration file and restore the system to its default condition in which the software does not redistribute routes, use the no form of this command.
redistribute { direct | eigrp instance-tag | isis instance-tag | ospf instance-tag | rip instance-tag | static } [ route-map map-name ]
no redistribute { direct | eigrp instance-tag | isis instance-tag | ospf instance-tag | rip instance-tag | static } [ route-map map-name ]
direct |
Distributes routes that are directly connected on an interface. |
eigrp instance-tag |
Specifies the name of an EIGRP instance. The instance-tag can be any case-sensitive, alphanumeric string up to 20 characters. |
isis instance-tag |
Distributes routes from the IS-IS protocol. The instance-tag can be any case-sensitive, alphanumeric string up to 64 characters. |
ospf instance-tag |
Distributes routes from the OSPF protocol. This protocol is supported in the IPv4 address family. The instance-tag can be any case-sensitive, alphanumeric string up to 64 characters. |
rip instance-tag |
Distributes routes from the RIP protocol. The instance-tag can be any case-sensitive, alphanumeric string up to 64 characters. |
static |
Redistributes IP static routes. |
route-map map-name |
(Optional) Specifies the identifier of a configured route map. Use a route map to filter which routes are redistributed into EIGRP. |
Disabled
Address family configurationRouter configurationRouter VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
4.1(2) |
Added the eigrp keyword. |
Use the redistribute command to import routes from other routing protocols into BGP. You should always use a route map to filter these routes to ensure that BGP redistributes only the routes that you intend to redistribute.
You must configure a default metric to redistribute routes from another protocol into BGP. You can configure the default metric with the default-metric command or with the route map configured with the redistribute command.
This command requires the Enterprise Services license.
This example shows how to redistribute BGP routes into an EIGRP autonomous system:
switch(config)# router bgp 64496 switch(config-router) address-family ipv4 unicast switch(config-router-af)# redistribute eigrp 100
Command |
Description |
---|---|
default-metric (BGP) |
Sets the default metrics for routes redistributed into BGP. |
To inject routes from one routing domain into the Enhanced Interior Gateway Routing Protocol (EIGRP), use the redistribute command. To remove the redistribute command from the configuration file and restore the system to its default condition in which the software does not redistribute routes, use the no form of this command.
redistribute { bgp as-number | direct | eigrp id | isis instance-tag | ospf instance-tag | rip instance-tag | static } [ route-map map-name ]
no redistribute { bgp as-number | direct | eigrp as-number | isis instance-tag | ospf instance-tag | rip instance-tag | static }
bgp as-number |
Distributes routes from BGP. The as-number is a 2-byte or 4-byte autonomous system number. The range for 2-byte numbers is from 1 to 65535. The range for 4-byte numbers is from 1.0 to 65535.65535. |
direct |
Distributes routes that are directly connected on an interface. |
eigrp id |
Specifies the name of an EIGRP instance. The instance-tag can be any case-sensitive, alphanumeric string up to 20 characters. |
isis instance-tag |
Distributes routes from the IS-IS protocol. |
ospf instance-tag |
Distributes routes from the OSPF protocol. This protocol is supported in the IPv4 address family. |
rip instance-tag |
Distributes routes from the RIP protocol. |
static |
Redistributes IP static routes. |
route-map map-name |
(Optional) Specifies the identifier of a configured route map. Use a route map to filter which routes are redistributed into EIGRP. |
Disabled
Address family configurationRouter configurationRouter VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the redistribute command to import routes from other routing protocols into EIGRP. You should always use a route map to filter these routes to ensure that EIGRP redistributes only the routes that you intend to redistribute.
You must configure a default metric to redistribute routes from another protocol into EIGRP. You can configure the default metric with the default-metric command or with the route map configured with the redistribute command.
This command requires the Enterprise Services license.
This example shows how to redistribute cause BGP routes into an EIGRP autonomous system:
switch(config)# router eigrp 209 switch(config-router) address-family ipv4 unicast switch(config-router-af)# redistribute bgp 64496
This example shows how to redistribute the specified IS-IS process routes into an EIGRP autonomous system within a virtual routing and forwarding instance (VRF). The IS-IS routes are redistributed using route map IsIsMap.
switch(config)# router eigrp 109 switch(config-router)# vrf Red switch(config-router-vrf)# redistribute isis 108 route-map IsIsMap
Command |
Description |
---|---|
default-metric (EIGRP) |
Sets the default metrics for routes redistributed into EIGRP. |
To redistribute other protocol routes into Intermediate System-to-Intermediate System (IS-IS), use the redistribute command. To disable the redistribution, use the no form of this command.
{ redistribute protocol as-num [ . as-num ] | process-tag route-map name }
{ no redistribute protocol as-num [ . as-num ] | process-tag route-map name }
protocol |
Source protocol from which routes are being redistributed ; see the “Usage Guidelines” section for additional information about valid values. |
as-num |
AS number. Range: 1 to 65535 |
.as-num |
(Optional) AS number. Range: 0 to 65535 |
process-tag |
Process tag. |
route-map name |
Prevents distribution of a specific route map. |
Cisco NX-OS software does not redistribute routes.
Address family configurationRouter configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
The command syntax is supported for IPv4 and IPv6.
The valid values for the protocol argument are as follows:
This example shows how to redistribute routes from an IS-IS routing process into a BGP system:
switch(config)# router isis firstcompany switch(config-router)# redistribute bgp 34535 route-map test1
This example shows how to disable redistribution:
switch(config)# router isis firstcompany switch(config-router)# no redistribute bgp 34535 route-map test1
Command |
Description |
---|---|
address-family |
Enters the address family mode or a VRF address-family mode. |
feature isis |
Enables IS-IS on the router. |
router isis |
Enables IS-IS. |
To limit the number of routes redistributed into Open Shortest Path First (OSPF), use the redistribute maximum-prefix command. To return to the default setting, use the no form of this command.
redistribute maximum-prefix max [threshold] [ warning-only | withdraw [ num-retries timeout ] ]
no redistribute maximum-prefix max [threshold] [ warning-only | withdraw [ num-retries timeout ] ]
max |
Maximum number of prefixes that OSPF will distribute. The range is from 0 to 65536. |
threshold |
(Optional) Percentage of maximum prefixes that will trigger a warning message. The range is from 1 to 100. The default is 75%. |
warning-only |
(Optional) Logs a warning message when the maximum number of prefixes is exceeded. |
withdraw |
(Optional) Withdraws all redistributed routes. |
num-retries |
(Optional) Number of times OSPF will try to retrieve the redistributed routes. The range is from 1 to 12. The default is 1. |
timeout |
(Optional) Time between retry attempts. The range is from 60 to 600 seconds. The default is 300. |
No limit
Router configurationVRF configuration
Release |
Modification |
---|---|
4.2(1) |
This command was introduced. |
Use the redistribute maximum-prefix command to limit the number of routes redistributed into OSPF. Use the clear ip ospf redistribute command if all routes are withdrawn.
This command requires the Enterprise Services license.
This example shows how to limit the number of redistributed routes into OSPF:
switch# config t switch(config)# router ospfv3 201 switch(config-router)# address-family ipv6 unicast switch(config-router-af)# redistribute bgp route-map FilterExternalBGP switch(config-router-af)# redistribute maximum-prefix 1000 75
Command |
Description |
---|---|
feature ospf |
Enables the OSPF feature. |
feature ospfv3 |
Enables the OSPFv3 feature. |
To limit the number of routes redistributed into Enhanced Interior Gateway Routing Protocol (EIGRP), use the redistribute maximum-prefix command. To return to the default setting, use the no form of this command.
redistribute maximum-prefix max [threshold] [ warning-only | withdraw [ num-retries timeout ] ]
no redistribute maximum-prefix max [threshold] [ warning-only | withdraw [ num-retries timeout ] ]
max |
Maximum number of prefixes that EIGRP will distribute. The range is from 0 to 65536. |
threshold |
(Optional) Percentage of maximum prefixes that will trigger a warning message. The range is from 1 to 100. The default is 75%. |
warning-only |
(Optional) Logs a warning message when the maximum number of prefixes is exceeded. |
withdraw |
(Optional) Withdraws all redistributed routes. |
num-retries |
(Optional) Number of times EIGRP will try to retrieve the redistributed routes. The range is from 1 to 12. The default is 1. |
timeout |
(Optional) Time between retry attempts. The range is from 60 to 600 seconds. The default is 300. |
No limit
Router configurationVRF configuration
Release |
Modification |
---|---|
4.2(1) |
This command was introduced. |
Use the redistribute maximum-prefix command to limit the number of routes redistributed into IEIGR. Use the clear ip eigrp redistribute command if all routes are withdrawn.
This example shows how to limit the number of redistributed routes into EIGRP:
switch# config t switch(config)# router eigrp 201 switch(config-router)# address-family ipv6 unicast switch(config-router-af)# redistribute bgp route-map FilterExternalBGP switch(config-router-af)# redistribute maximum-prefix 1000 75
Command |
Description |
---|---|
feature eigrp |
Enables the EIGRP feature. |
redistribute (EIGRP) |
Configures route redistribution for EIGRP. |
To limit the number of routes redistributed into Intermediate System to Intermediate System (IS-IS), use the redistribute maximum-prefix command. To return to the default setting, use the no form of this command.
redistribute maximum-prefix max [threshold] [ warning-only | withdraw [ num-retries timeout ] ]
no redistribute maximum-prefix max [threshold] [ warning-only | withdraw [ num-retries timeout ] ]
max |
Maximum number of prefixes that IS-IS will distribute. The range is from 0 to 65536. |
threshold |
(Optional) Percentage of maximum prefixes that will trigger a warning message. The range is from 1 to 100. The default is 75%. |
warning-only |
(Optional) Logs a warning message when the maximum number of prefixes is exceeded. |
withdraw |
(Optional) Withdraws all redistributed routes. |
num-retries |
(Optional) Number of times IS-IS will try to retrieve the redistributed routes. The range is from 1 to 12. The default is 1. |
timeout |
(Optional) Time between retry attempts. The range is from 60 to 600 seconds. The default is 300. |
No limit
Router configurationVRF configuration
Release |
Modification |
---|---|
4.2(1) |
This command was introduced. |
Use the redistribute maximum-prefix command to limit the number of routes redistributed into IS-IS. Use the clear isis redistribute command if all routes are withdrawn.
This example shows how to limit the number of redistributed routes into IS-IS:
switch# config t switch(config)# router isis 201 switch(config-router)# address-family ipv6 unicast switch(config-router-af)# redistribute bgp route-map FilterExternalBGP switch(config-router-af)# redistribute maximum-prefix 1000 75
Command |
Description |
---|---|
feature isis |
Enables the IS-IS feature. |
redistribute (IS-IS) |
Configures route redistribution for IS-IS. |
To inject routes from one routing domain into Open Shortest Path First (OSPF), use the redistribute command. To remove the redistribute command from the configuration file and restore the system to its default condition in which the software does not redistribute routes, use the no form of this command.
redistribute { bgp as-number | direct | eigrp id | isis instance-tag | ospf instance-tag | rip instance-tag | static } [ route-map map-name ]
no redistribute { bgp as-number | direct | eigrp as-number | isis instance-tag | ospf instance-tag | rip instance-tag | static }
bgp as-number |
(Optional) Distributes routes from BGP. The as-number is a 2-byte or 4-byte autonomous system number. The range for 2-byte numbers is from 1 to 65535. The range for 4-byte numbers is from 1.0 to 65535.65535. |
direct |
Distributes routes that are directly connected on an interface. |
eigrp id |
Distributes routes from EIGRP. The instance-tag argument can be any case-sensitive, alphanumeric string. |
isis instance-tag |
Distributes routes from the IS-IS protocol. The instance-tag argument can be any case-sensitive, alphanumeric string. |
ospf instance-tag |
Distributes routes from the OSPF protocol. This protocol is supported in the IPv4 address family. The instance-tag argument can be any case-sensitive, alphanumeric string. |
static |
Redistributes IP static routes, including the default static route. |
route-map map-name |
(Optional) Specifies the identifier of a configured route map. Use a route map to filter which routes are redistributed into EIGRP. The route-map argument can be any alphanumeric string. |
Route redistribution is disabled.
Router configurationRouter VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
4.1(2) |
Changed the eigrp keyword to use a process tag. |
Use the redistribute command to import routes from other routing protocols into OSPF. You should always use a route map to filter these routes to ensure that OSPF redistributes only the routes that you intend.
You need to configure a default metric to redistribute routes from another protocol into OSPF. You can configure the default metric with the default-metric command or with the route map configured with the redistribute command.
Note | If you redistribute static routes, Cisco NX-OS also redistributes the default static route. |
This command requires the Enterprise Services license.
This example shows how to redistribute BGP routes into an OSPF autonomous system:
switch(config)# router ospf 209 switch(config-router)# redistribute bgp 64496
This example shows how to redistribute the specified IS-IS process routes into an OSPF autonomous system within a virtual routing and forwarding instance (VRF). The IS-IS routes are redistributed using route map IsIsMap.
switch(config)# router ospf 109 switch(config-router)# vrf Red switch(config-router-vrf)# redistribute isis 108 route-map IsIsMap
Command |
Description |
---|---|
default-metric (OSPF) |
Sets the default metrics for routes redistributed into OSPF. |
To inject routes from one routing domain into Open Shortest Path First version 3 (OSPFv3), use the redistribute command. To remove the redistribute command from the configuration file and restore the system to its default condition in which the software does not redistribute routes, use the no form of this command.
redistribute { bgp as-number | direct | isis instance-tag | rip instance-tag | static } [ route-map map-name ]
no redistribute { bgp as-number | direct | eigrp as-number | isis instance-tag | ospfv3 instance-tag | rip instance-tag | static }
bgp as-number |
(Optional) Distributes routes from the BGP protocol. The as-number is a 2-byte or 4-byte autonomous system number. The range for 2-byte numbers is from 1 to 65535. The range for 4-byte numbers is from 1.0 to 65535.65535. |
direct |
Distributes routes that are directly connected on an interface. |
eigrp as-number |
Distributes routes from EIGRP. The instance-tag argument can be any case-sensitive, alphanumeric string. |
isis instance-tag |
Distributes routes from the IS-IS protocol.The instance-tag argument can be any case-sensitive, alphanumeric string. |
static |
Redistributes IP static routes, including the default static route. |
route-map map-name |
(Optional) Specifies the identifier of a configured route map. Use a route map to filter which routes are redistributed into EIGRP. The route-map argument can be any alphanumeric string. |
Route redistribution is disabled.
Address-family configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
4.1(2) |
Changed the eigrp keyword to use a process tag. |
Use the redistribute command to import routes from other routing protocols into OSPFv3. You should always use a route map to filter these routes to ensure that OSPFv3 redistributes only the routes that you intend.
You need to configure a default metric to redistribute routes from another protocol into OSPFv3. You can configure the default metric with the default-metric command or with the route map configured with the redistribute command.
Note | If you redistribute static routes, Cisco NX-OS also redistributes the default static route. |
This command requires the Enterprise Services license.
This example shows how to redistribute BGP routes into an OSPFv3 autonomous system:
switch(config)# router ospfv3 209 switch(config-router)# address-family ipv6 unicast switch(config-router-af)# redistribute bgp 64496
Command |
Description |
---|---|
default-metric (OSPFv3) |
Sets the default metrics for routes redistributed into OSPFv3. |
To redistribute routes from another routing domain into the Routing Information Protocol (RIP), use the redistribute command. To restore the system to its default condition in which the software does not redistribute routes, use the no form of this command.
redistribute { bgp id | direct | eigrp id | isis id | ospf id | ospfv3 id | static } route-map map-name
bgp |
Redistributes routes from the Border Gateway Protocol (BGP). |
direct |
Redistributes routes from directly connected routes only. |
eigrp |
Redistributes routes from the Enhanced Interior Gateway Routing Protocol (EIGRP). |
isis |
Redistributes routes from the Intermediate-System to Intermediate-System (IS-IS) routing protocol. |
ospf |
Redistributes routes from the Open Shortest Path First (OSPF) protocol. |
ospfv3 |
Redistributes routes from the Open Shortest Path First version 3 (OSPFv3) protocol. |
static |
Redistributes routes from IP static routes. |
id |
For the bgp keyword, an autonomous system number. The range for 2-byte numbers is from 1 to 65535. The range for 4-byte numbers is from 1.0 to 65535.65535. For the eigrp keyword, an EIGRP instance name from which routes are to be redistributed. The value takes the form of a string. You can enter decimal number, but Cisco NX-OS stores it internally as a string. For the isis keyword, an IS-IS instance name from which routes are to be redistributed. The value takes the form of a string. You can enter decimal number, but Cisco NX-OS stores it internally as a string. For the ospf keyword, an OSPF instance name from which routes are to be redistributed. The value takes the form of a string. A decimal number can be entered, but it is stored internally as a string. |
route-map map-name |
Associates a route map to set the redistribution policy for RIP. |
Route redistribution is disabled.
Router address-family configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Cisco NX-OS filters redistributed routing information using a route map. You can configure the route map to set the RIP metric used for redistributed routes. If you do not set the RIP metric with a route map, Cisco NX-OS determines the metric based on the redistributed protocol or by the default-metric command. If Cisco NX-OS cannot determine a valid metric, then it does not redistribute the routes.
This command does not require a license.
This example shows how to redistribute BGP routes into a RIP process:
switch(config)# router rip Enterprise switch(config-router)# address-family ipv4 unicast switch(config-router-af)# redistribute bgp 64496
Command |
Description |
---|---|
address-family |
Enters address-family configuration mode. |
default-information originate |
Generates a default route for routes redistributed into RIP. |
default-metric |
Sets default metric values for routes redistributed from other protocols into RIP. |
To redistribute the default route, use the redistribute static route-map allow command.
redistribute static route-map allow
This command has no arguments or keywords.
None
config-router-af mode
Release |
Modification |
---|---|
6.2(2) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to redistributes the default route:
switch# configure terminal switch(config)# route map allow permit switch(config)# ip route 0.0.0.0 0.0.0.0 null 0 switch(config)# router bgp 100 switch(config-router)# address-family ipv4 unicast switch(config-router-af)# default-information originate switch(config-router-af)# redistribute static route-map allow switch(config-router-af)#
Command |
Description |
---|---|
route map allow permit |
Enters router map configuration mode and defines the conditions for redistributing routes. |
To change the reference bandwidth used to assign the IS-IS cost, use the reference-bandwidth command. To return to the default setting, use the no form of this command.
reference-bandwidth { gbps | mbps } [ gbps | mbps ]
no reference-bandwidth
gbps |
Reference bandwidth in gigabits per second (gbps). Range: 1 to 4000. Default: 40. |
mbps |
Reference bandwidth in megabits per second (mbps). Range: 1 to 4000000. Default: 40000. |
gbps |
(Optional) Specifies Gbps. |
mbps |
(Optional) Specifies Mbps. |
route-map name |
Prevents distribution of a specific route map. |
Bandwidth is in Mbps.
Router configurationVRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
If you do not enter the gbps or the mbps keyword, Mbps is the default.
The cost of interfaces is calculated by comparing the interface bandwidth with a reference bandwidth. The reference-bandwidth command configures the reference bandwidth.
This example shows how to set the reference bandwidth to 3500 Gbps:
switch(config)# router isis firstcompany switch(config-router)# reference-bandwidth 3500 gbps
This example shows how to return to the default reference bandwidth:
switch(config)# router isis firstcompany switch(config-router)# no reference-bandwidth
Command |
Description |
---|---|
feature isis |
Enables IS-IS on the router. |
router isis |
Enables IS-IS. |
To specify the autonomous system (AS) number for a neighbor, use the remote-as command. To remove an AS number, use the no form of this command.
remote-as number
no remote-as number
number |
AS number. The format is x for a two-byte value or x.x for a four-byte value. The range is from 1 to 65535. |
None
Neighbor configuration
Release |
Modification |
---|---|
4.1(2) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to configure the neighbor AS number:
switch(config)# router bgp 64496 switch(config-router)# neighbor 10.0.0.100 switch(config-router-neighbor)# remote-as 64497
Command |
Description |
---|---|
feature bgp |
Enables BGP on the router. |
neighbor |
Configures BGP peers. |
To specify the time between link-state advertisement (LSA) retransmissions for adjacencies that belong to the virtual link, use the retransmit-interval command. To return to the default, use the no form of this command.
retransmit-interval seconds
retransmit-interval
seconds |
Time (in seconds) between retransmissions. The time must be greater than the expected round-trip delay between any two routers on the attached network. The range is from 1 to 65535 seconds. The default is 5 seconds. |
5 seconds
Virtual link configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the retransmit-interval command to set the LSA retransmission time. If a router receives no acknowledgment that an LSA was received, the router resends the LSA at the retransmission interval.
You should set this value larger for virtual links.
This command requires the Enterprise Services license.
This example shows how to set the retransmit interval value to 8 seconds:
switch(config)# router ospf 109 switch(config-router)# area 33 virtual-link 192.0.2.2 switch(config-router-vrf)# retransmit-interval 8
Command |
Description |
---|---|
area virtual-link |
Creates a virtual link in an OSPF area. |
To specify the time between link-state advertisement (LSA) retransmissions for adjacencies that belong to the virtual link, use the retransmit-interval command. To return to the default, use the no form of this command.
retransmit-interval seconds
retransmit-interval
seconds |
Time (in seconds) between retransmissions. The time must be greater than the expected round-trip delay between any two routers on the attached network. The range is from 1 to 65535 seconds. The default is 5 seconds. |
5 seconds
Virtual link configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the retransmit-interval command to set the LSA retransmission time. If a router receives no acknowledgment that an LSA was received, the router resends the LSA at the retransmission interval.
You should set this value larger for virtual links.
This command requires the Enterprise Services license.
This example shows how to set the retransmit interval value to 8 seconds:
switch(config)# router ospfv3 109 switch(config-router)# area 33 virtual-link 192.0.2.2 switch(config-router-vrf)# retransmit-interval 8
Command |
Description |
---|---|
area virtual-link |
Creates a virtual link in an OSPFv3 area. |
To configure RFC 1583 compatibility as the method used to calculate summary route costs and select AS-external paths, use the rfc1583compatibility command. To disable RFC 1583 compatibility, use the no form of this command.
rfc1583compatibility
no rfc1583compatibility
This command has no arguments or keywords.
RFC 1583 compatibility is disabled.
Router configuration
Release |
Modification |
---|---|
5.0(2a) |
This command was introduced. |
To minimize the chance of routing loops, all Open Shortest Path First (OSPF) routers in an OSPF routing domain should have RFC compatibility set identically.
OSPFv2 on Cisco NX-OS supports RFC 2328. This RFC introduced a different method to calculate route summary costs which is not compatible with the calculation used by RFC1583. RFC 2328 also introduced different selection criteria for AS-external paths. It is important to ensure that all routers support the same RFC. Use the rfc1583compatibility command if your network includes routers that are only compliant with RFC1583. The default supported RFC standard for OSPFv2 may be different for Cisco NX-OS and Cisco IOS. You must make adjustments to set the values identically. For more OSPF RFC Compatibility Mode example, see the Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 6.x.
You must configure RFC 1583 compatibility on any virtual routing and forwarding (VRF) that connects to routers running only RFC1583 compatible OSPF.
Note | The default values for Cisco NX-OS might be different from that of Cisco IOS. You should make adjustments to set the values identically. |
This example shows how to specify that the router process is compatible with RFC 1583:
switch# configure terminal switch(config)# feature ospf switch(config)# router ospf Test1 switch(config-router)# rfc1583compatibility switch(config-router)# vrf A switch(config-router-vrf)# rfc1583compatibility
To create a route map, enter the route-map configuration mode, or define the conditions for redistributing routes from one routing protocol into another, use the route-map command. To delete an entry, use the no form of this command.
route-map map-tag [ deny | permit ] [sequence-number]
no route-map map-tag [ permit | deny ] [sequence-number]
map-tag |
Route map name. |
deny |
(Optional) Specifies that the route or packet is not distributed as follows:
|
permit |
(Optional) Specifies that the route or packet is distributed as follows:
|
sequence-number |
(Optional) Number that indicates the position a new route map will have in the list of route maps already configured with the same name. The no form of this command deletes the position of the route map. Range: 0 to 65535. |
The permit keyword is the default.
Global configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
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)#
If you make changes to a route map that is used by a client, you must exit the route-map configuration submode before the changes take effect in the client. The route-map changes are not propagated to its clients until you exit from the route-map configuration submode or 60 seconds expires since entering the submode.
Once you enter the route-map configuration mode, the following keywords are available:
address {access-list-name [access-list-name] | prefix-list ipv4-list-name ipv4-list-name]}— Specifies the address of the route or packet to match. See the match ip address command for additional information.
multicast {group address/length | rp address/length}—Specifies the multicast attributes to match. See the match ip multicast command for additional information.
next-hop—Matches the next-hop address of route. See the match ip next-hop command for additional information.
route-source—Matches the advertising source address of route. See the match ip route-source command for additional information.
address {access-list-name [access-list-name] | prefix-list ipv6-list-name ipv6-list-name]}— Specifies the address of the route or packet to match. See the match ipv6 address prefix-list command for additional information.
Note | The IPv6 access-list name is for use in route-maps for PBR only. |
multicast {group address/length | rp address/length}—Specifies the multicast attributes to match. See the match ipv6 multicast command for additional information.
next-hop prefix-list—Matches the next-hop address of route. See the match ipv6 next-hop prefix-list command for additional information.
route-source—Matches the advertising source address of route. See the match ipv6 route-source prefix-list command for additional information.
Note | The default-information originate command ignores match statements in the optional route map. |
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. See the set ip default next-hop command for additional information.
set ip next-hop—Indicates where to output packets that pass a match clause of a route map for policy routing. See the set ip next-hop command for additional information.
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. See the set ipv6 default next-hop command for additional information.
set ipv6 next-hop—Indicates where to output packets that pass a match clause of a route map for policy routing. See the set ipv6 next-hop command for additional information.
Use route maps to redistribute routes or to subject packets to policy routing. Both purposes are described in this section.
Redistribution
The redistribute router configuration command uses the map-tag name to reference the route map. Multiple route maps may share the same map tag name.
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.
Use route maps when you want detailed control over how routes are redistributed between routing processes. The destination routing protocol is the one you specify with the router global configuration command. The source routing protocol is the one you specify with the redistribute router configuration command. See the “Examples” section for an illustration of how route maps are configured.
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.
Policy Routing
Use the ip policy route-maor ipv6 policy route-mapp command, in addition to the route-map command, and the match and set commands to define the conditions for policy routing packets. The match commands specify the conditions under which policy routing occurs. The set commands specify the routing actions to perform if the criteria enforced by the match commands are met. You might want to policy route packets some way other than the obvious shortest path.
The guidelines for the sequence-number argument are as follows:
If the no route-map map-tag command is specified (with no sequence-number argument), the whole route map is deleted.
This example shows how to redistribute Routing Information Protocol (RIP) routes with a hop count equal to 1 into Open Shortest Path First (OSPF). These routes will be redistributed into OSPF as external link-state advertisements (LSAs) with a metric type of Type 1, and a tag equal to 1.
switch(config)# router ospf 109 switch(config-route-map)# redistribute rip route-map rip-to-ospf switch(config-route-map)# route-map rip-to-ospf permit switch(config-route-map)# set metric 5 switch(config-route-map)# set metric-type type1 switch(config-route-map)# set tag 1
This example for IPv6 shows how to redistribute Routing Information Protocol (RIP) routes with a hop count equal to 1 into Open Shortest Path First (OSPF). These routes will be redistributed into OSPF as external link-state advertisements (LSAs) with a tag equal to 42 and a metric type equal to type1.
switch(config)# router 1 switch(config-route-map)# redistribute rip one route-map ripng-to-ospfv3 switch(config)# route-map ripng-to-ospfv3 switch(config-route-map)# match tag 42 switch(config-route-map)# set metric-type type1
This example sets the autonomous system path to match BGP autonomous system path access list 20:
switch(config)#route-map IGP2BGP switch(config-route-map)#match as-path 20
This example shows how to configure that the routes matching community list 1 will have the weight set to 100. Any route that has community 109 will have the weight set to 100.
switch(config)#ip community-list 1 permit 109 switch(config)#route-map set_weight switch(config-route-map)#match community 1 switch(config-route-map)#set weight 100
This example shows how to configure that the routes matching community list 1 will have the weight set to 200. Any route that has community 109 alone will have the weight set to 200.
switch(config)#ip community-list 1 permit 109 switch(config)#route-map set_weight switch(config-route-map)#match community 1 exact switch(config-route-map)#set weight 200
This example shows how to configure that the routes match community list LIST_NAME will have the weight set to 100. Any route that has community 101 alone will have the weight set to 100.
switch(config)#ip community-list 1 permit 101 switch(config)#route-map set_weight switch(config-route-map)#match community LIST_NAME switch(config-route-map)#set weight 100
To enter router map configuration mode and define the conditions for redistributing routes, use the route-map allow permit command. To delete the configuration for redistributing routes, use the no form of this command.
route-map allow permit
no route-map allow permit
This command has no arguments or keywords.
None
Global configuration mode
Release |
Modification |
---|---|
6.2(2) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to enter router map configuration mode and define the conditions for redistributing routes:
switch# configure terminal switch(config)# route map allow permit switch(config)#
This example shows how to delete the configuration for redistributing routes:
switch(config)# no route map allow permit switch(config)#
Command |
Description |
---|---|
router bgp |
Enters Border Gateway Protocol (BGP) configuration mode and assigns the autonomous system number to the local BGP speaker. |
To set the Border Gateway Protocol (BGP) route dampening factors, use the route-map command. To disable this function, use the no form of this command.
half-life reuse suppress max-suppress-time
half-life reuse suppress max-suppress-time
half-life |
Time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. Range: 1 to 45. Default: 15. |
reuse |
Routes that are unsuppressed if the penalty for a flapping route decreases enough to fall below this value. The process of unsuppressing routes occurs at 10-second increments. Range: 1 to 20000. Default: 750. |
suppress |
Route that is suppressed when its penalty exceeds this limit. Range: 1 to 20000. Default: 2000. |
max-suppress-time |
Maximum time (in minutes) a route can be suppressed. Range: 1 to 255. Default: Four times the half-life value. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes. |
This command is disabled by default.
Route-map configuration (config-route-map)
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the route-map command, and the match and set 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.
When a BGP peer is reset, the route is withdrawn and the flap statistics cleared. In this instance, the withdrawal does not incur a penalty even though route flap dampening is enabled.
This command does not require a license.
This example shows how to set the half life to 30 minutes, the reuse value to 1500, the suppress value to 10000; and the maximum suppress time to 120 minutes:
switch(config)# route-map test1 10 permit switch(config-route-map)# 30 1500 10000 120
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 (IP) |
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 enable policy-based statistics for a route map, use the route-map pbr statistics command. To disable statistics, use the no form of this command.
route-map name pbr-statistics
no route-map name pbr-statistics
name |
Name of the route map. The name can be any alphanumeric string up to 63 characters. |
None
Any
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the route-map pbr-statistics command to enable policy-based routing statistics. You must enable policy-based routing with the feature pbr command before you can enable policy-based routing statistics.
Note | This command may fail if the same interface is configured for some other policy such as ACLs. |
This command requires the Enterprise Services license.
This example shows how to enable the policy-based routing statistics for a route map:
switch(config)# feature pbr switch(config)# route-map testmap pbr-statistics
Command |
Description |
---|---|
clear route-map pbr-statistics |
Clears policy-based routing statistics for a route map. |
To assign an autonomous system (AS) number to a router and enter the router BGP configuration mode, use the router bgp command. To remove an AS number assignment, use the no form of this command.
router bgp as-num [ . as-num ]
no router bgp as-num [ . as-num ]
as-num |
Number of an autonomous system that identifies the router to other BGP routers and tags the routing information passed along; valid values are from 1 to 65535. |
.as-num |
(Optional) Number of an autonomous system that identifies the router to other BGP routers and tags the routing information passed along; valid values are from 0 to 65535. |
No BGP routing process is enabled by default.
Address-family configurationNeighbor address-family configurationRouter BGP configuration
The as-num is the number for the local BGP speaker and allows you to create a unique identifier for the BGP process on the router.
Once you enter the router BGP configuration mode, the following parameters are available:
The confederation command is used to configure a single autonomous system number to identify a group of smaller autonomous systems as a single confederation.You can use a confederation to divide a large single autonomous system into multiple subautonomous systems and then group them into a single confederation. The subautonomous systems within the confederation exchange routing information. External peers interact with the confederation as if it is a single autonomous system.
Each subautonomous system is fully meshed within itself and has a few connections to other autonomous systems within the confederation. Next hop, Multi Exit Discriminator (MED), and local preference information is preserved throughout the confederation, allowing you enables to you to retain a single Interior Gateway Protocol (IGP) for all the autonomous systems.
The fast-external-fallover command is used to disable or enable fast external fallover for BGP peering sessions with directly connected external peers. The session is immediately reset if link goes down. Only directly connected peering sessions are supported.
If BGP fast external fallover is disabled, the BGP routing process will wait until the default hold timer expires (three keepalives) to reset the peering session.
Using the log-neighbor-changes command to enable status change message logging does not cause a substantial performance impact, unlike, for example, enabling per BGP update debugging. If the UNIX syslog facility is enabled, messages are sent to the UNIX host running the syslog daemon so that the messages can be stored and archived. If the UNIX syslog facility is not enabled, the status change messages are retained in the internal buffer of the router, and are not stored to disk. You can set the size of this buffer, which is dependent upon the available RAM, using the logging buffered command.
The neighbor status change messages are not tracked if the bgp log-neighbor-changes command is not enabled, except for the reset reason, which is always available as output of the show ip bgp neighbors and show bgp ipv6 neighbors commands.
The eigrp log-neighbor-changes command enables logging of Enhanced Interior Gateway Routing Protocol (EIGRP) neighbor adjacencies, but messages for BGP neighbors are logged only if they are specifically enabled with the bgp log-neighbor-changes command.
Use the show logging command to display the log for the BGP neighbor changes.
This example shows how to configure a BGP process for autonomous system 120:
switch(config)# router bgp 120 switch(config-router)#
This example shows how to log neighbor changes for BGP in router configuration mode:
switch(config# bgp router 40000 switch(config-router)# log-neighbor-changes
In This example, the BGP fast external fallover feature is disabled. If the link through which this session is carried flaps, the connection will not be reset.
switch(config# bgp router 64496 switch(config-router)# no fast-external-fallover
In This example, all incoming updates from eBGP peers are examined to ensure that the first autonomous system number in the AS_PATH is the local AS number of the transmitting peer. In the follow example, updates from the 10.100.0.1 peer will be discarded if the first AS number is not 65001.
switch(config# router bgp 64496 switch(config-router)# bgp enforce-first-as switch(config-router)# address-family ipv4 switch(config-router-af)# neighbor 10.100.0.1 remote-as 64496 switch(config-router-af)#
To configure a routing process and enter router configuration mode for Enhanced Interior Gateway Routing Protocol (EIGRP), use the router eigrp command. To turn off the EIGRP routing process, use the no form of this command.
router eigrp instance-tag
no router eigrp instance-tag
instance-tag |
Name of an EIGRP instance. The instance-tag can be any case-sensitive, alphanumeric string up to 20 characters. |
None
Global
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to configure a routing process for EIGRP:
switch(config)# router eigrp 1 switch(config-router)#
Command |
Description |
---|---|
default-information |
Controls the distribution of a default route. |
default-metric |
Configures the default metric for routes redistributed into EIGRP. |
distance |
Configures the administrative distance. |
maximum-paths |
Configures the maximum number of equal-cost paths. |
redistribute |
Configures route redistribution for EIGRP. |
router-id |
Configures the router ID. |
timers |
Configures the EIGRP timers. |
To configure a routing process and enter router configuration mode for Intermediate System to Intermediate System (IS-IS), use the router isis command. To turn off the IS-IS routing process, use the no form of this command.
router isis instance-tag
no router isis instance-tag
instance-tag |
Instance name. The name can be any alphanumeric string up to 20 characters. |
None
Global
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to configure a routing process for IS-IS:
switch(config)# router isis test1 switch(config-router)#
Command |
Description |
---|---|
default-information |
Controls the distribution of a default route. |
distance |
Configures the administrative distance. |
maximum-paths |
Configures the maximum number of equal-cost paths. |
redistribute |
Configures route redistribution for IS-IS. |
To configure an Open Shortest Path First (OSPF) routing instance, use the router ospf command. To terminate an OSPF routing process, use the no form of this command.
router ospf instance-tag
no router ospf instance-tag
instance-tag |
Internally used identification parameter for an OSPF routing instance. It is locally assigned and can be any word or positive integer. The instance-tag argument can be any alphanumeric string. |
No OSPF routing instance is defined.
Global configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the router ospf command to specify multiple OSPF routing instances in each router.
This command requires the Enterprise Services license.
This example shows how to configure a basic OSPF instance:
switch(config)# router ospf 12
To configure an Open Shortest Path First (OSPF) process tag, use the router ospf p1 command. To terminate an OSPF process tag, use the no form of this command.
router ospf p1
no router ospf p1
This command has no arguments or keywords.
None.
Global configuration
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
This command requires the Enterprise Services license.
This example shows how to configure an Open Shortest Path First (OSPF) process tag:
switch(config)# router ospf p1 switch(config)#
To configure an Open Shortest Path First version 3 (OSPFv3) routing instance, use the router ospfv3 command. To terminate an OSPFv3 routing process, use the no form of this command.
router ospfv3 instance-tag
no router ospfv3 instance-tag
instance-tag |
Internally used identification parameter for an OSPFv3 routing instance. It is locally assigned and can be any word or positive integer. The instance-tag argument can be any alphanumeric string. |
No OSPFv3 routing instance is defined.
Global configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the router ospfv3 command to specify multiple OSPFv3 routing instances in each router.
This command requires the Enterprise Services license.
This example shows how to configure a basic OSPFv3 instance:
switch(config)# router ospfv3 12
To configure the Routing Information Protocol (RIP) routing process, use the router rip command. To turn off the RIP routing process, use the no form of this command.
router rip instance-tag
no router rip
instance-tag |
Name for this RIP instance. |
No RIP routing process is defined.
Global configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
This example shows how to begin the RIP routing process:
switch(config)# router rip Enterprise
Command |
Description |
---|---|
ip router rip |
Specifies a RIP instance for an interface. |
To configure a router ID for an Enhanced Interior Gateway Routing Protocol (EIGRP) process, use the router-id command. To cause the software to use the default method of determining the router ID, use the no form of this command.
router-id router-id
no router-id
router-id |
32-bit router ID value specified in four-part, dotted-decimal notation. |
If this command is not configured, EIGRP chooses an IPv4 address as the router ID from one of its interfaces.
Address family configurationRouter configurationRouter VRF configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the router-id command to manually specify a unique 32-bit numeric value for the router ID. This action ensures that EIGRP can function regardless of the interface address configuration.
This command requires the Enterprise Services license.
This example shows how to assign the IP address of 192.0.2.1 to the EIGRP process 1:
switch(config)# router eigrp 1 switch(config-router) address-family ipv4 switch(config-router-af)# router-id 192.0.2.1
To use a fixed router ID for an Open Shortest Path First (OSPF) instance, use the router-id command. To revert to the previous OSPF router ID behavior, use the no form of this command.
router-id ip-address
no router-id ip-address
ip-address |
Router ID in IP address format. |
If this command is not configured, OSPF chooses an IPv4 address as the router ID from one of its interfaces.
Router configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the router-id command to manually specify a unique 32-bit numeric value for the router ID.
If this command is used on an OSPF instance that has neighbors, the connections to the neighbors are re-established and the new router ID is available immediately for use by OSPF.
This command requires the Enterprise Services license.
This example shows how to configure the router ID:
switch(config)# router ospf 12 switch(config-router)# router-id 192.0.2.1
Command |
Description |
---|---|
router ospf |
Configures the OSPF routing process. |
To use a fixed router ID for an Open Shortest Path First version 3 (OSPFv3) instance, use the router-id command. To revert to the previous OSPFv3 router ID behavior, use the no form of this command.
router-id ip-address
no router-id ip-address
ip-address |
Router ID in IP address format. |
If this command is not configured, OSPFv3 chooses an IPv4 address as the router ID from one of its interfaces.
Router configuration
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the router-id command to manually specify a unique 32-bit numeric value for the router ID.
If this command is used on an OSPFv3 instance that has neighbors, the connections to the neighbors are re-established and the new router ID is available immediately for use by OSPFv3.
This command requires the Enterprise Services license.
This example shows how to configure the router ID:
switch(config)# router ospfv3 12 switch(config-router)# router-id 192.0.2.1
Command |
Description |
---|---|
router ospfv3 |
Configures the OSPFv3 routing process. |
To set the virtual routing and forwarding (VRF) scope for all EXEC commands, use the routing-context vrf command. To revert to default behavior, use the no form of this command.
routing-context vrf vrf-name
no routing-context vrf vrf-name
vrf-name |
Name of the VRF instance. The name can be any case-sensitive, alphanumeric string up to 63 characters. |
default VRF
EXEC
Release |
Modification |
---|---|
4.0(1) |
This command was introduced. |
Use the routing-context vrf command to set the VRF scope for all EXEC commands (for example, show commands). This automatically restricts the scope of the output of EXEC commands to the configured VRF. You can override this scope by using the VRF keywords available for some EXEC commands.
This command does not require a license.
This example shows how to limit EXEC commands to the management VRF:
switch# routing-context vrf management switch%management#
Command |
Description |
---|---|
show routing-context |
Displays the current routing context. |