To redistribute routes from a Border Gateway Protocol (BGP) autonomous system into an International Organization for Standardization (ISO) Intermediate System-to-Intermediate System (IS-IS) routing process, use the
redistribute command in router configuration mode. To remove the
redistribute command from the configuration file and restore the system to its default condition where the software does not redistribute BGP routes into IS-IS, use the
no form of this command.
Source protocol from which routes are being redistributed. It must be the
bgp keyword.
The
bgp keyword is used to redistribute dynamic routes.
autonomous-system-number
The autonomous system number of the BGP routing process from which BGP routes are redistributed into IS-IS. The range of values for this argument is any valid autonomous system number from 1 to 65535.
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, 4-byte autonomous system numbers are supported in the range from 65536 to 4294967295 in asplain notation and in the range from 1.0 to 65535.65535 in asdot notation.
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, 4-byte autonomous system numbers are supported in the range from 1.0 to 65535.65535 in asdot notation only.
For more details about autonomous system number formats, see the
routerbgp command.
route-type
(Optional) The type of route to be redistributed. It can be one of the following keywords:
clns or
ip. The default isip.
The
clns keyword is used to redistribute BGP routes with network service access point (NSAP) addresses into IS-IS.
The
ip keyword is used to redistribute BGP routes with IP addresses into IS-IS.
route-mapmap-tag
(Optional) Identifier of a configured route map. The route map should be examined to filter the importation of routes from this source routing protocol to IS-IS. If not specified, all routes are redistributed. If the keyword is specified, but no route map tags are listed, no routes will be imported.
Command Default
Route redistribution from BGP to ISO IS-IS is disabled.
Command Modes
Router configuration (config-router)
Command History
Release
Modification
12.2(8)T
This command was modified. The
clns keyword was added.
12.2(33)SRB
This command was integrated into Cisco IOS Release 12.2(33)SRB.
12.0(32)S12
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.0(32)SY8
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.4(24)T
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
Cisco IOS XE Release 2.3
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.2(33)SXI1
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.0(33)S3
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
Cisco IOS XE Release 2.4
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
12.2(33)SRE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added. Support for changing autonomous system number of the BGP routing process was removed.
12.2(33)XNE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
Usage Guidelines
The
clns keyword must be specified to redistribute NSAP prefix routes from BGP into an ISO IS-IS routing process. This version of the
redistribute command is used only under router configuration mode for IS-IS processes.
Note
Be aware that when you configure the
no redistribute bgp autonomous-system route-mapmap-name command under the
router isis
router configuration command, IS-IS removes the entire
redistribute command, not just the route map. This behavior differs from the
no redistribute isis
command configured under the
router bgp router configuration command, which removes a keyword.
Examples
The following example configures NSAP prefix routes from BGP autonomous system 64500 to be redistributed into the IS-IS routing process called osi-proc-17:
Specifies the list of networks for the BGP routing process.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another.
routerbgp
Configures the BGP routing process.
showroute-map
Displays all route maps configured or only the one specified.
redistribute (IP)
To redistribute routes from one routing domain into another routing domain, use the
redistribute command in the appropriate configuration mode. To disable all or some part of the redistribution (depending on the protocol), use the
no form of this command. See the “Usage Guidelines” section for detailed, protocol-specific behaviors.
Source protocol from which routes are being redistributed. It can be one of the following keywords: bgp,
connected,
eigrp, isis,
mobile,
ospf, rip, or static [ip].
The
static [ip] keyword is used to redistribute IP static routes. The optional
ip keyword is used when redistributing into the Intermediate System-to-Intermediate System (IS-IS) protocol.
The
connected keyword refers to routes that are established automatically by virtue of having enabled IP on an interface. For routing protocols such as Open Shortest Path First (OSPF) and IS-IS, these routes will be redistributed as external to the autonomous system.
process-id
(Optional) For the
bgp or
eigrp keyword, this is an autonomous system number, which is a 16-bit decimal number.
For the
isis keyword, this is an optional
tag value that defines a meaningful name for a routing process. You can specify only one IS-IS process per router. Creating a name for a routing process means that you use names when configuring routing.
For the
ospf keyword, this is an appropriate OSPF process ID from which routes are to be redistributed. This identifies the routing process. This value takes the form of a nonzero decimal number.
For the
rip keyword, no
process-id value is needed.
By default, no process ID is defined.
level-1
Specifies that, for IS-IS, Level 1 routes are redistributed into other IP routing protocols independently.
level-1-2
Specifies that, for IS-IS, both Level 1 and Level 2 routes are redistributed into other IP routing protocols.
level-2
Specifies that, for IS-IS, Level 2 routes are redistributed into other IP routing protocols independently.
autonomous-system-number
(Optional) Autonomous system number for the redistributed route. The range is from 1 to 65535.
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, 4-byte autonomous system numbers are supported in the range from 65536 to 4294967295 in asplain notation and in the range from 1.0 to 65535.65535 in asdot notation.
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, 4-byte autonomous system numbers are supported in the range from 1.0 to 65535.65535 in asdot notation only.
For more details about autonomous system number formats, see the
routerbgp command.
metricmetric-value
(Optional) When redistributing from one OSPF process to another OSPF process on the same router, the metric will be carried through from one process to the other if no metric value is specified. When redistributing other processes to an OSPF process, the default metric is 20 when no metric value is specified. The default value is 0.
metrictransparent
(Optional) Causes Routing Information Protocol (RIP) to use the routing table metric for redistributed routes as the RIP metric.
metric-typetype value
(Optional) For OSPF, specifies the external link type associated with the default route advertised into the OSPF routing domain. It can be one of two values:
1—Type 1 external route
2—Type 2 external route
If a
metric-type is not specified, the Cisco IOS software adopts a Type 2 external route.
For IS-IS, it can be one of two values:
internal—IS-IS metric that is < 63.
external—IS-IS metric that is > 64 < 128.
The default is
internal.
match {internal |
external1 |
external2}
(Optional) Specifies the criteria by which OSPF routes are redistributed into other routing domains. It can be one of the following:
internal—Routes that are internal to a specific autonomous system.
external1—Routes that are external to the autonomous system, but are imported into OSPF as Type 1 external routes.
external2—Routes that are external to the autonomous system, but are imported into OSPF as Type 2 external routes.
The default is
internal.
tagtag-value
(Optional) Specifies the 32-bit decimal value attached to each external route. This is not used by OSPF itself. It may be used to communicate information between Autonomous System Boundary Routers (ASBRs). If none is specified, the remote autonomous system number is used for routes from Border Gateway Protocol (BGP) and Exterior Gateway Protocol (EGP); for other protocols, zero (0) is used.
route-map
(Optional) Specifies the route map that should be interrogated to filter the importation of routes from this source routing protocol to the current routing protocol. If not specified, all routes are redistributed. If this keyword is specified, but no route map tags are listed, no routes will be imported.
map-tag
(Optional) Identifier of a configured route map.
subnets
(Optional) For redistributing routes into OSPF, the scope of redistribution for the specified protocol. By default, no subnets are defined.
nssa-only
(Optional) Sets the nssa-only attribute for all routes redistributed into OSPF.
Command Default
Route redistribution is disabled.
Command Modes
Router configuration (config-router)
Address family configuration (config-af)
Address family topology configuration (config-router-af-topology)
Command History
Release
Modification
10.0
This command was introduced.
12.0(5)T
This command was modified. Address family configuration mode was added.
12.0(22)S
This command was modified. Address family support under EIGRP was added.
12.2(15)T
This command was modified. Address family support under EIGRP was added.
12.2(18)S
This command was modified. Address family support under EIGRP was added.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2(33)SRB
This command was modified. Address family topology support under EIGRP was added.
12.2(14)SX
This command was integrated into Cisco IOS Release 12.2(14)SX.
12.0(32)S12
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.0(32)SY8
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.4(24)T
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
Cisco IOS XE Release 2.3
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.2(33)SXI1
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.0(33)S3
This command was modified. Support for asplain notation was added, and the default format for 4-byte autonomous system numbers is asplain.
Cisco IOS XE Release 2.4
This command was modified. Support for asplain notation was added, and the default format for 4-byte autonomous system numbers is asplain.
15.0(1)M
This command was modified. The
nssa-only keyword was added.
12.2(33)SRE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
15.1(1)SG
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
Cisco IOS XE Release 3.3SG
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
15.1(2)SNG
This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers
15.2(1)E
This command was integrated into Cisco IOS Release 15.2(1)E.
Usage Guidelines
Using the no Form of the redistribute Command
Caution
Removing options that you have configured for the
redistribute command requires careful use of the
no form of the
redistribute command to ensure that you obtain the result that you are expecting. Changing or disabling any keyword may or may not affect the state of other keywords, depending on the protocol.
It is important to understand that different protocols implement the
no version of the
redistribute command differently:
In BGP, OSPF, and RIP configurations, the
no redistribute command removes only the specified keywords from the
redistribute commands in the running configuration. They use the
subtractive keyword method when redistributing from other protocols. For example, in the case of BGP, if you configure
no redistribute static route-map interior,
only the route map is removed from the redistribution, leaving
redistribute static in place with no filter.
The
no redistribute isis command removes the IS-IS redistribution from the running configuration. IS-IS removes the entire command, regardless of whether IS-IS is the redistributed or redistributing protocol.
EIGRP used the subtractive keyword method prior to EIGRP component version rel5. Starting with EIGRP component version rel5, the
no redistribute command removes the entire
redistribute command when redistributing from any other protocol.
Additional Usage Guidelines for the redistribute Command
A router receiving a link-state protocol with an internal metric will consider the cost of the route from itself to the redistributing router plus the advertised cost to reach the destination. An external metric only considers the advertised metric to reach the destination.
Routes learned from IP routing protocols can be redistributed at Level 1 into an attached area or at Level 2. The
level-1-2 keyword allows both Level 1 and Level 2 routes in a single command.
Redistributed routing information must be filtered by the
distribute-listout router configuration command. This guideline ensures that only those routes intended by the administrator are passed along to the receiving routing protocol.
Whenever you use the
redistribute or the
default-information router configuration commands to redistribute routes into an OSPF routing domain, the router automatically becomes an ASBR. However, an ASBR does not, by default, generate a
default route into the OSPF routing domain.
When routes are redistributed into OSPF from protocols other than OSPF or BGP, and no metric has been specified with the
metric-type keyword and
type-value argument, OSPF will use 20 as the default metric. When routes are redistributed into OSPF from BGP, OSPF will use 1 as the default metric. When routes are redistributed from one OSPF process to another OSPF process, autonomous system external and not-so-stubby-area (NSSA) routes will use 20 as the default metric. When intra-area and inter-area routes are redistributed between OSPF processes, the internal OSPF metric from the redistribution source process is advertised as the external metric in the redistribution destination process. (This is the only case in which the routing table metric will be preserved when routes are redistributed into OSPF.)
When routes are redistributed into OSPF, only routes that are not subnetted are redistributed if the
subnets keyword is not specified.
On a router internal to an NSSA area, the
nssa-only keyword causes the originated type-7 NSSA LSAs to have their propagate (P) bit set to zero, which prevents area border routers from translating these LSAs into type-5 external LSAs. On an area border router that is connected to an NSSA and normal areas, the
nssa-only keyword causes the routes to be redistributed only into the NSSA areas.
Routes configured with the
connected keyword affected by this
redistribute command are the routes not specified by the
network router configuration command.
You cannot use the
default-metric command to affect the metric used to advertise connected routes.
Note
The
metric value specified in the
redistribute command supersedes the
metric value specified using the
default-metric command.
The default redistribution of interior gateway protocol (IGP) or Exterior Gateway Protocol (EGP) into BGP is not allowed unless the
default-information originate router configuration command is specified.
Release 12.2(33)SRB
If you plan to configure the Multi-Topology Routing (MTR) feature, you need to enter the
redistribute command in address family topology configuration mode in order for this OSPF configuration command to become topology-aware.
4-Byte Autonomous System Number Support
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain—65538 for example—as the default regular expression match and output display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain format and the asdot format as described in RFC 5396. To change the default regular expression match and output display of 4-byte autonomous system numbers to asdot format, use the
bgp asnotation dot command.
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, the Cisco implementation of 4-byte autonomous system numbers uses asdot—1.2, for example—as the only configuration format, regular expression match, and output display, with no asplain support.
Examples
The following example shows how OSPF routes are redistributed into a BGP domain:
The following example shows how to redistribute the specified EIGRP process routes into an OSPF domain. The EIGRP-derived metric will be remapped to 100 and RIP routes to 200.
The following example shows how to configure BGP routes to be redistributed into IS-IS. The link-state cost is specified as 5, and the metric type is set to external, indicating that it has lower priority than internal metrics.
The following example shows how BGP routes are redistributed into OSPF and assigned the local 4-byte autonomous system number in asplain format. This example requires Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, or a later release.
The following example shows how to remove the
connected metric 1000 subnets options from the
redistribute connected metric 1000 subnets command and leave the
redistribute connected command in the configuration:
Router(config-router)# no redistribute connected metric 1000 subnets
The following example shows how to remove the metric 1000
options from the
redistribute connected metric 1000 subnets command and leave the redistribute connected subnets command in the configuration:
Router(config-router)# no redistribute connected metric 1000
The following example shows how to remove the
subnets option from the
redistribute connected metric 1000 subnets command and leave the
redistribute connected metric 1000 command in the configuration:
Router(config-router)# no redistribute connected subnets
The following example shows how to remove the
redistribute connected command, and any of the options that were configured for the
redistribute connected command, from the configuration:
Router(config-router)# no redistribute connected
The following example shows how EIGRP routes are redistributed into an EIGRP process in a named EIGRP configuration:
The following example shows how to set and disable the redistributions in EIGRP configuration. Note that,in the case of EIGRP, the
no form of the commands removes the entire set of
redistribute commands from the running configuration.
Router(config)# router eigrp 1
Router(config-router)# network 0.0.0.0
Router(config-router)# redistribute eigrp 2 route-map x
Router(config-router)# redistribute ospf 1 route-map x
Router(config-router)# redistribute bgp 1 route-map x
Router(config-router)# redistribute isis level-2 route-map x
Router(config-router)# redistribute rip route-map x
Router(config)# router eigrp 1
Router(config-router)# no redistribute eigrp 2 route-map x
Router(config-router)# no redistribute ospf 1 route-map x
Router(config-router)# no redistribute bgp 1 route-map x
Router(config-router)# no redistribute isis level-2 route-map x
Router(config-router)# no redistribute rip route-map x
Router(config-router)# end
Router# show running-config | section router eigrp 1
router eigrp 1
network 0.0.0.0
The following example shows how to set and disable the redistributions in OSPF configuration. Note that the
no form of the commands removes only the specified keywords from the
redistribute command in the running configuration.
Router(config)# router ospf 1
Router(config-router)# network 0.0.0.0
Router(config-router)# redistribute eigrp 2 route-map x
Router(config-router)# redistribute ospf 1 route-map x
Router(config-router)# redistribute bgp 1 route-map x
Router(config-router)# redistribute isis level-2 route-map x
Router(config-router)# redistribute rip route-map x
Router(config)# router ospf 1
Router(config-router)# no redistribute eigrp 2 route-map x
Router(config-router)# no redistribute ospf 1 route-map x
Router(config-router)# no redistribute bgp 1 route-map x
Router(config-router)# no redistribute isis level-2 route-map x
Router(config-router)# no redistribute rip route-map x
Router(config-router)# end
Router# show running-config | section router ospf 1
router ospf 1
redistribute eigrp 2
redistribute ospf 1
redistribute bgp 1
redistribute rip
network 0.0.0.0
The following example shows how to remove only the route map filter from the redistribution in BGP; redistribution itself remains in force without a filter:
Router(config)# router bgp 65000
Router(config-router)# no redistribute eigrp 2 route-map x
The following example shows how to remove the EIGRP redistribution to BGP:
Router(config)# router bgp 65000
Router(config-router)# no redistribute eigrp 2
Related Commands
Command
Description
address-family(EIGRP)
Enters address family configuration mode to configure an EIGRP routing instance.
address-familyipv4(BGP)
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.
address-familyvpnv4
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.
bgpasnotationdot
Changes the default display and the regular expression match format of BGP 4-byte autonomous system numbers from asplain (decimal values) to dot notation.
default-informationoriginate(BGP)
Allows the redistribution of network 0.0.0.0 into BGP.
default-informationoriginate(IS-IS)
Generates a default route into an IS-IS routing domain.
default-informationoriginate(OSPF)
Generates a default route into an OSPF routing domain.
distribute-listout(IP)
Suppresses networks from being advertised in updates.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
routerbgp
Configures the BGP routing process.
routereigrp
Configures the EIGRP address-family process.
showroute-map
Displays all route maps configured or only the one specified.
topology(EIGRP)
Configures an EIGRP process to route IP traffic under the specified topology instance and enters address family topology configuration mode.
redistribute (ISO IS-IS to BGP)
To redistribute routes from an International Organization for Standardization (ISO) Intermediate System-to-Intermediate System (IS-IS) routing process into a Border Gateway Protocol (BGP) autonomous system, use the
redistribute command in address family or router configuration mode. To remove the
redistribute command from the configuration file and restore the system to its default condition where the software does not redistribute IS-IS routes into BGP, use the
no form of this command.
Source protocol from which routes are being redistributed. It can be one of the following keywords:isis or
static.
The
isis keyword is used to redistribute dynamic routes.
The
static keyword is used to redistribute static routes.
process-id
(Optional) When IS-IS is used as a source protocol, this argument defines a meaningful name for a routing process. The
process-id argument identifies from which IS-IS routing process routes will be redistributed.
Routes can be redistributed only from IS-IS routing processes that involve Level 2 routes, including IS-IS Level 1-2 and Level 2 routing processes.
The
process-id argument is not used when the
static keyword is used as the
protocol.
route-type
(Optional) The type of route to be redistributed. It can be one of the following keywords:
clns or
ip. The default is
ip.
The
clns keyword is used to redistribute Connectionless Network Service (CLNS) routes with network service access point (NSAP) addresses into BGP.
The
ip keyword is used to redistribute IS-IS routes with IP addresses into BGP.
route-mapmap-tag
(Optional) Identifier of a configured route map. The route map is examined to filter the importation of routes from this source routing protocol to BGP. If no route map is specified, all routes are redistributed. If the
route-map keyword is specified, but no
map-tag value is entered, no routes are imported.
Command Default
Route redistribution from ISO IS-IS to BGP is disabled.
route-type:
ip
Command Modes
Address family configuration (config-router-af) (Cisco IOS 12.3(8)T and later releases)
Router configuration (config-router) (T-releases after Cisco IOS 12.3(8)T)
Command History
Release
Modification
12.2(8)T
The
clns keyword was added.
12.3(8)T
Beginning with Cisco IOS Release 12.3(8)T this version of the
redistribute command should be entered under address family mode rather than router configuration mode.
12.2(33)SRB
This command was integrated into Cisco IOS Release 12.2(33)SRB.
Cisco IOS XE 2.6
This command was integrated into Cisco IOS XE Release 2.6.
Usage Guidelines
The
clns keyword must be specified to redistribute NSAP prefix routes from an ISO IS-IS routing process into BGP. Beginning with Cisco IOS Release 12.3(8)T, this version of the
redistribute command is entered only in address family configuration mode for BGP processes.
Examples
Examples
The following example configures CLNS NSAP routes from the IS-IS routing process called osi-proc-6 to be redistributed into BGP:
Specifies the list of networks for the BGP routing process.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another.
showroute-map
Displays all route maps configured or only the one specified.
router bgp
To configure the Border Gateway Protocol (BGP) routing process, use the
routerbgp command in global configuration mode. To remove a BGP routing process, use the
no form of this command.
routerbgpautonomous-system-number
norouterbgpautonomous-system-number
Syntax Description
autonomous-system-number
Number of an autonomous system that identifies the router to other BGP routers and tags the routing information that is passed along. Number in the range from 1 to 65535.
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, 4-byte autonomous system numbers are supported in the range from 65536 to 4294967295 in asplain notation and in the range from 1.0 to 65535.65535 in asdot notation.
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, 4-byte autonomous system numbers are supported in the range from 1.0 to 65535.65535 in asdot notation only.
For more details about autonomous system number formats, see the “Usage Guidelines” section.
Command Default
No BGP routing process is enabled by default.
Command Modes
Global configuration (config)
Command History
Release
Modification
10.0
This command was introduced.
12.2(25)SG
This command was integrated into Cisco IOS Release 12.2(25)SG.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2(31)SB2
This command was integrated into Cisco IOS Release 12.2(31)SB2.
12.2(33)SRB
This command was modified. Support for IPv6 was added.
12.2(14)SX
This command was integrated into Cisco IOS Release 12.2(14)SX.
12.2(33)SB
This command was modified. Support for IPv6 was added.
12.0(32)S12
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.0(32)SY8
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.4(24)T
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
Cisco IOS XE Release 2.3
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.2(33)SXI1
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.0(33)S3
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
Cisco IOS XE Release 2.4
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
12.2(33)SRE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.2(33)XNE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
15.1(1)SG
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
Cisco IOS XE Release 3.3SG
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
15.1(2)SNG
This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers.
15.2(1)E
This command was integrated into Cisco IOS Release 15.2(1)E.
Usage Guidelines
This command allows you to set up a distributed routing core that automatically guarantees the loop-free exchange of routing information between autonomous systems.
Prior to January 2009, BGP autonomous system numbers that were allocated to companies were 2-octet numbers in the range from 1 to 65535 as described in RFC 4271,
A Border Gateway Protocol 4 (BGP-4) . Due to increased demand for autonomous system numbers, the Internet Assigned Number Authority (IANA) will start in January 2009 to allocate four-octet autonomous system numbers in the range from 65536 to 4294967295. RFC 5396,
Textual Representation of Autonomous System (AS) Numbers , documents three methods of representing autonomous system numbers. Cisco has implemented the following two methods:
Asplain—Decimal value notation where both 2-byte and 4-byte autonomous system numbers are represented by their decimal value. For example, 65526 is a 2-byte autonomous system number and 234567 is a 4-byte autonomous system number.
Asdot—Autonomous system dot notation where 2-byte autonomous system numbers are represented by their decimal value and 4-byte autonomous system numbers are represented by a dot notation. For example, 65526 is a 2-byte autonomous system number and 1.169031 is a 4-byte autonomous system number (this is dot notation for the 234567 decimal number).
For details about the third method of representing autonomous system numbers, see RFC 5396.
Note
In Cisco IOS releases that include 4-byte ASN support, command accounting and command authorization that include a 4-byte ASN number are sent in the asplain notation irrespective of the format that is used on the command-line interface.
Asdot Only Autonomous System Number Formatting
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, Cisco IOS XE Release 2.3, and later releases, the 4-octet (4-byte) autonomous system numbers are entered and displayed only in asdot notation, for example, 1.10 or 45000.64000. When using regular expressions to match 4-byte autonomous system numbers the asdot format includes a period which is a special character in regular expressions. A backslash must be entered before the period for example, 1\.14, to ensure the regular expression match does not fail. The table below shows the format in which 2-byte and 4-byte autonomous system numbers are configured, matched in regular expressions, and displayed in
show command output in Cisco IOS images where only asdot formatting is available.
Table 1 Asdot Only 4-Byte Autonomous System Number Format
Format
Configuration Format
Show Command Output and Regular Expression Match Format
asdot
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
Asplain as Default Autonomous System Number Formatting
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain as the default display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain and asdot format. In addition, the default format for matching 4-byte autonomous system numbers in regular expressions is asplain, so you must ensure that any regular expressions to match 4-byte autonomous system numbers are written in the asplain format. If you want to change the default
show command output to display 4-byte autonomous system numbers in the asdot format, use the
bgpasnotationdot command under router configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte autonomous system numbers must be written using the asdot format, or the regular expression match will fail. The tables below show that although you can configure 4-byte autonomous system numbers in either asplain or asdot format, only one format is used to display
show command output and control 4-byte autonomous system number matching for regular expressions, and the default is asplain format. To display 4-byte autonomous system numbers in
show command output and to control matching for regular expressions in the asdot format, you must configure the
bgpasnotationdot command. After enabling the
bgpasnotationdot command, a hard reset must be initiated for all BGP sessions by entering the
clearipbgp* command.
Note
If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte autonomous system numbers. The
show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format configured for 4-byte autonomous system numbers.
Table 2 Default Asplain 4-Byte Autonomous System Number Format
Format
Configuration Format
Show Command Output and Regular Expression Match Format
asplain
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
asdot
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
Table 3 Asdot 4-Byte Autonomous System Number Format
Format
Configuration Format
Show Command Output and Regular Expression Match Format
asplain
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
asdot
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
Reserved and Private Autonomous System Numbers
In Cisco IOS Release 12.0(32)S12, 12.0(32)SY8, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 12.4(24)T, Cisco IOS XE Release 2.3 and later releases, the Cisco implementation of BGP supports RFC 4893. RFC 4893 was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. A new reserved (private) autonomous system number, 23456, was created by RFC 4893 and this number cannot be configured as an autonomous system number in the Cisco IOS CLI.
RFC 5398,
Autonomous System (AS) Number Reservation for Documentation Use , describes new reserved autonomous system numbers for documentation purposes. Use of the reserved numbers allow configuration examples to be accurately documented and avoids conflict with production networks if these configurations are literally copied. The reserved numbers are documented in the IANA autonomous system number registry. Reserved 2-byte autonomous system numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte autonomous system numbers are from 65536 to 65551 inclusive.
Private 2-byte autonomous system numbers are still valid in the range from 64512 to 65534 with 65535 being reserved for special use. Private autonomous system numbers can be used for internal routing domains but must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise private autonomous system numbers to external networks. Cisco IOS software does not remove private autonomous system numbers from routing updates by default. We recommend that ISPs filter private autonomous system numbers.
Note
Autonomous system number assignment for public and private networks is governed by the IANA. For information about autonomous-system numbers, including reserved number assignment, or to apply to register an autonomous system number, see the following URL: http://www.iana.org/.
Examples
The following example configures a BGP process for autonomous system 45000 and configures two external BGP neighbors in different autonomous systems using 2-byte autonomous system numbers:
The following example configures a BGP process for autonomous system 65538 and configures two external BGP neighbors in different autonomous systems using 4-byte autonomous system numbers in asplain notation. This example is supported i n Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases.
The following example configures a BGP process for autonomous system 1.2 and configures two external BGP neighbors in different autonomous systems using 4-byte autonomous system numbers in asdot notation. This example is supported in Cisco IOS Release 12.0(32)SY8, 12.0(32)S12, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 12.4(24)T, and Cisco IOS XE Release 2.3, and later releases.
Changes the default display and the regular expression match format of BGP 4-byte autonomous system numbers from asplain (decimal values) to dot notation.
neighborremote-as
Adds an entry to the BGP or multiprotocol BGP neighbor table.
network(BGPandmultiprotocolBGP)
Specifies the list of networks for the BGP routing process.
set as-path
To modify an autonomous system path for BGP routes, use the
setas-path command in route-map configuration mode. To not modify the autonomous system path, use the
noform of this command.
setas-path
{ tag | prependas-path-string }
nosetas-path
{ tag | prependas-path-string }
Syntax Description
tag
Converts the tag of a route into an autonomous system path. Applies only when redistributing routes into BGP.
prepend
Appends the string following the keyword
prepend to the autonomous system path of the route that is matched by the route map. Applies to inbound and outbound BGP route maps.
as-path-string
Number of an autonomous system to prepend to the AS_PATH attribute. The range of values for this argument is any valid autonomous system number from 1 to 65535. Multiple values can be entered; up to 10 AS numbers can be entered.
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, 4-byte autonomous system numbers are supported in the range from 65536 to 4294967295 in asplain notation and in the range from 1.0 to 65535.65535 in asdot notation.
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, 4-byte autonomous system numbers are supported in the range from 1.0 to 65535.65535 in asdot notation only.
For more details about autonomous system number formats, see the
routerbgp command.
Command Default
An autonomous system path is not modified.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
11.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2(14)SX
This command was integrated into Cisco IOS Release 12.2(14)SX.
12.0(32)S12
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.0(32)SY8
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.4(24)T
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
Cisco IOS XE Release 2.3
This command was modified. Support for 4-byte autonomous system numbers in asdot notation only was added.
12.2(33)SXI1
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.0(33)S3
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
Cisco IOS XE Release 2.4
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
12.2(33)SRE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.2(33)XNE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
15.1(1)SG
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
Cisco IOS XE Release 3.3SG
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
15.2(1)E
This command was integrated into Cisco IOS Release 15.2(1)E.
Usage Guidelines
The only global BGP metric available to influence the best path selection is the autonomous system path length. By varying the length of the autonomous system path, a BGP speaker can influence the best path selection by a peer further away.
By allowing you to convert the tag into an autonomous system path, the
setas-pathtag variation of this command modifies the autonomous system length. The
setas-pathprepend variation allows you to “prepend” an arbitrary autonomous system path string to BGP routes. Usually the local autonomous system number is prepended multiple times, increasing the autonomous system path length.
In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain--65538 for example--as the default regular expression match and output display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain format and the asdot format as described in RFC 5396. To change the default regular expression match and output display of 4-byte autonomous system numbers to asdot format, use the
bgpasnotationdot command followed by the
clearipbgp* command to perform a hard reset of all current BGP sessions.
In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and Cisco IOS XE Release 2.3, the Cisco implementation of 4-byte autonomous system numbers uses asdot--1.2 for example--as the only configuration format, regular expression match, and output display, with no asplain support.
Examples
The following example converts the tag of a redistributed route into an autonomous system path:
route-map set-as-path-from-tag
set as-path tag
!
router bgp 100
redistribute ospf 109 route-map set-as-path-from-tag
The following example prepends 100 100 100 to all the routes that are advertised to 10.108.1.1:
route-map set-as-path
match as-path 1
set as-path prepend 100 100 100
!
router bgp 100
neighbor 10.108.1.1 route-map set-as-path out
The following example prepends 65538, 65538, and 65538 to all the routes that are advertised to 192.168.1.2. This example requires Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, Cisco IOS XE Release 2.4, or a later release.
route-map set-as-path
match as-path 1.1
set as-path prepend 65538 65538 65538
exit
router bgp 65538
neighbor 192.168.1.2 route-map set-as-path out
Related Commands
Command
Description
matchas-path
Matches a BGP autonomous system path access list.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
routerbgp
Configures the BGP routing process.
settag(IP)
Sets a tag value of the destination routing protocol.
set community
To set the BGP communities attribute, use the setcommunity route map configuration command. To delete the entry, use the no form of this command.
Specifies that community number. Valid values are from 1 to 4294967200, no-export, or no-advertise.
additive
(Optional) Adds the community to the already existing communities.
well-known-community
(Optional) Well know communities can be specified by using the following keywords:
internet
local-as
no-advertise
no-export
none
(Optional) Removes the community attribute from the prefixes that pass the route map.
Command Default
No BGP communities attributes exist.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
10.3
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Usage Guidelines
You must have a match clause (even if it points to a “permit everything” list) if you want to set tags.
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 noroute-map command deletes the route map.
The set route map configuration commands specify the redistribution set actions
to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
Examples
In the following example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to no-export (these routes will not be advertised to any external BGP [eBGP] peers).
route-map set_community 10 permit
match as-path 1
set community 109
route-map set_community 20 permit
match as-path 2
set community no-export
In the following similar example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to local-as (the router will not advertise this route to peers outside the local autonomous system.
route-map set_community 10 permit
match as-path 1
set community 109
route-map set_community 20 permit
match as-path 2
set community local-as
Related Commands
Command
Description
ipcommunity-list
Creates a community list for BGP and control access to it.
matchcommunity
Matches a BGP community.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
setcomm-listdelete
Removes communities from the community attribute of an inbound or outbound update.
showipbgpcommunity
Displays routes that belong to specified BGP communities.
set dampening
To set the BGP route dampening factors, use the setdampening route map configuration command. To disable this function, use the no form of this command.
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. The range of the half life period is from 1 to 45 minutes. The default is 15 minutes.
reuse
Unsuppresses the route if the penalty for a flapping route decreases enough to fall below this value. The process of unsuppressing routes occurs at 10-second increments. The range of the reuse value is from 1 to 20000; the default is 750.
suppress
Suppresses a route when its penalty exceeds this limit. The range is from 1 to 20000; the default is 2000.
max-suppress-time
Maximum time (in minutes) a route can be suppressed. The range is from 1 to 20000; the default is four times the half-life value. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes.
Command Default
This command is disabled by default.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
11.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Usage Guidelines
Use theroute-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 noroute-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.
Examples
The following example sets the half life to 30 minutes, the reuse value to 1500, the suppress value to 10000; and the maximum suppress time to 120 minutes:
route-map tag
match as path 10
set dampening 30 1500 10000 120
!
router bgp 100
neighbor 172.16.233.52 route-map tag in
Related Commands
Command
Description
matchas-path
Matches a BGP autonomous system path access list.
matchcommunity
Matches a BGP community.
matchinterface(IP)
Distributes routes that have their next hop out one of the interfaces specified.
matchipaddress
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
matchipnext-hop
Redistributes any routes that have a next hop router address passed by one of the access lists specified.
matchiproute-source
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
matchmetric(IP)
Redistributes routes with the metric specified.
matchroute-type(IP)
Redistributes routes of the specified type.
matchtag
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.
setautomatic-tag
Automatically computes the tag value.
setcommunity
Sets the BGP communities attribute.
setipnext-hop
Specifies the address of the next hop.
setlevel(IP)
Indicates where to import routes.
setlocal-preference
Specifies a preference value for the autonomous system path.
setmetric(BGP,OSPF,RIP)
Sets the metric value for a routing protocol.
setmetric-type
Sets the metric type for the destination routing protocol.
setorigin(BGP)
Sets the BGP origin code.
settag(IP)
Sets the value of the destination routing protocol.
setweight
Specifies the BGP weight for the routing table.
showroute-map
Displays all route maps configured or only the one specified.
set ip next-hop (BGP)
To indicate where to output packets that pass a match clause of a route map for policy routing, use the
setipnext-hop command in route-map configuration mode. To delete an entry, use the
no form of this command.
set ip next-hopip-address [ ...ip-address ] [ peer-address ]
no set ip next-hopip-address [ ...ip-address ] [ peer-address ]
Syntax Description
ip-address
IP address of the next hop to which packets are output. It need not be an adjacent router.
peer-address
(Optional) Sets the next hop to be the BGP peering address.
Command Default
This command is disabled by default.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
11.0
This command was introduced.
12.0
The
peer-address keyword was added.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Cisco IOS XE Release 2.1
This command was introduced on Cisco ASR 1000 Series Routers.
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the
ip-address argument.
Use the
ippolicyroute-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
ippolicyroute-map command identifies a route map by name. 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.
If the first next hop specified with the
setipnext-hop command is down, the optionally specified IP addresses are tried in turn.
When the
setipnext-hop command is used with the
peer-address keyword in an inbound route map of a BGP peer, the next hop of the received matching routes will be set to be the neighbor peering address, overriding any third-party next hops. So the same route map can be applied to multiple BGP peers to override third-party next hops.
When the
setipnext-hop command is used with the
peer-address keyword in an outbound route map of a BGP peer, the next hop of the advertised matching routes will be set to be the peering address of the local router, thus disabling the next hop calculation. The
setipnext-hop command has finer granularity than the (per-neighbor)
neighbornext-hop-self command, because you can set the next hop for some routes, but not others. The
neighbornext-hop-self command sets the next hop for all routes sent to that neighbor.
The set clauses can be used in conjunction with one another. They are evaluated in the following order:
setipnext-hop
setinterface
setipdefaultnext-hop
setdefaultinterface
Note
To avoid a common configuration error for reflected routes, do not use the
setipnext-hop command in a route map to be applied to BGP route reflector clients.
Configuring the
setipnext-hop...ip-address command on a VRF interface allows the next hop to be looked up in a specified VRF address family. In this context, the
...ip-address argument matches that of the specified VRF instance.
Examples
In the following example, three routers are on the same FDDI LAN (with IP addresses 10.1.1.1, 10.1.1.2, and 10.1.1.3). Each is in a different autonomous system. The
setipnext-hoppeer-address command specifies that traffic from the router (10.1.1.3) in remote autonomous system 300 for the router (10.1.1.1) in remote autonomous system 100 that matches the route map is passed through the router bgp 200, rather than sent directly to the router (10.1.1.1) in autonomous system 100 over their mutual connection to the LAN.
router bgp 200
neighbor 10.1.1.3 remote-as 300
neighbor 10.1.1.3 route-map set-peer-address out
neighbor 10.1.1.1 remote-as 100
route-map set-peer-address permit 10
set ip next-hop peer-address
Related Commands
Command
Description
ippolicyroute-map
Identifies a route map to use for policy routing on an interface.
matchipaddress
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
matchlength
Bases policy routing on the Level 3 length of a packet.
neighbornext-hop-self
Disables next hop processing of BGP updates on the router.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.
setdefaultinterface
Indicates where to output packets that pass a match clause of a route map for policy routing and that have no explicit route to the destination.
setinterface
Indicates where to output packets that pass a match clause of a route map for policy routing.
setipdefaultnext-hop
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination.
set ipv6 next-hop (BGP)
To indicate where to output IPv6 packets that pass a match clause of a route map for policy routing, use the
setipv6next-hop command in route-map configuration mode. To delete an entry, use the
no form of this command.
IPv6 global address of the next hop to which packets are output. It need not be an adjacent router.
This argument must be in the form documented in RFC 2373 where the address is specified in hexadecimal using 16-bit values between colons.
link-local-address
(Optional) IPv6 link-local address of the next hop to which packets are output. It must be an adjacent router.
This argument must be in the form documented in RFC 2373 where the address is specified in hexadecimal using 16-bit values between colons.
encapsulatel3vpn
Sets the encapsulation profile for VPN nexthop.
profilename
Name of the Layer 3 encapsulation profile.
peer-address
(Optional) Sets the next hop to be the BGP peering address.
Command Default
IPv6 packets are forwarded to the next hop router in the routing table.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
12.2(4)T
This command was introduced.
12.0(21)ST
This command was integrated into Cisco IOS Release 12.0(21)ST.
12.0(22)S
This command was integrated into Cisco IOS Release 12.0(22)S.
12.2(14)S
This command was integrated into Cisco IOS Release 12.2(14)S.
12.2(25)SG
This command was integrated into Cisco IOS Release 12.2(25)SG.
Cisco IOS XE Release 2.1
This command was introduced on Cisco ASR 1000 Series Routers.
12.2(33)SRE
This command was modified. The
encapsulatel3vpn keyword was added.
Usage Guidelines
The
setipv6next-hop command is similar to the
setipnext-hop command, except that it is IPv6-specific.
The
set commands specify the
set actions --the particular routing actions to perform if the criteria enforced by the
match commands are met.
When the
setipv6next-hop command is used with the
peer-address keyword in an inbound route map of a BGP peer, the next hop of the received matching routes will be set to be the neighbor peering address, overriding any third-party next hops. So the same route map can be applied to multiple BGP peers to override third-party next hops.
When the
setipv6next-hop command is used with the
peer-address keyword in an outbound route map of a BGP peer, the next hop of the advertised matching routes will be set to be the peering address of the local router, thus disabling the next hop calculation. The
setipv6next-hop command has finer granularity than the per-neighbor
neighbornext-hop-self command, because you can set the next hop for some routes, but not others. The
neighbornext-hop-self command sets the next hop for all routes sent to that neighbor.
The set clauses can be used in conjunction with one another. They are evaluated in the following order:
setipv6next-hop
setinterface
setipv6defaultnext-hop
setdefaultinterface
Configuring the
setipv6next-hopipv6-address command on a VRF interface allows the next hop to be looked up in a specified VRF address family. In this context, the
ipv6-address argument matches that of the specified VRF instance.
Examples
The following example configures the IPv6 multiprotocol BGP peer FE80::250:BFF:FE0E:A471 and sets the route map named nh6 to include the IPv6 next hop global addresses of Fast Ethernet interface 0 of the neighbor in BGP updates. The IPv6 next hop link-local address can be sent to the neighbor by the nh6 route map or from the interface specified by the
neighborupdate-source router configuration command.
If you specify only the global IPv6 next hop address (the ipv6-address argument) with the
setipv6next-hop command after specifying the neighbor interface (the
interface-type argument) with the
neighborupdate-source command, the link-local address of the neighbor interface is included as the next hop in the BGP updates. Therefore, only one route map that sets the global IPv6 next hop address in BGP updates is required for multiple BGP peers that use link-local addresses.
Related Commands
Command
Description
ippolicyroute-map
Identifies a route map to use for policy routing on an interface.
matchipv6address
Distributes IPv6 routes that have a prefix permitted by a prefix list.
matchipv6next-hop
Distributes IPv6 routes that have a next hop prefix permitted by a prefix list.
matchipv6route-source
Distributes IPv6 routes that have been advertised by routers at an address specified by a prefix list.
neighbornext-hop-self
Disables next-hop processing of BGP updates on the router.
neighborupdate-source
Specifies that the Cisco IOS software allow BGP sessions to use any operational interface for TCP connections
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
set metric (BGP-OSPF-RIP)
To set the metric value for a routing protocol, use the
setmetric command in route-map configuration mode. To return to the default metric value, use the
no form of this command.
setmetricmetric-value
nosetmetricmetric-value
Syntax Description
metric-value
Metric value; an integer from -294967295 to 294967295. This argument applies to all routing protocols except Enhanced Interior Gateway Routing Protocol (EIGRP).
Command Default
The dynamically learned metric value.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
10.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Usage Guidelines
We recommend that you consult your Cisco technical support representative before changing the default value.
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
noroute-map command deletes the route map.
The
set route-map configuration commands specify the redistribution
setactions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
Examples
The following example sets the metric value for the routing protocol to 100:
route-map set-metric
set metric 100
Related Commands
Command
Description
matchas-path
Matches a BGP autonomous system path access list.
matchcommunity
Matches a BGP community.
matchinterface(IP)
Distributes routes that have their next hop out one of the interfaces specified.
matchipaddress
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
matchipnext-hop
Redistributes any routes that have a next hop router address passed by one of the access lists specified.
matchiproute-source
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
matchmetric(IP)
Redistributes routes with the metric specified.
matchroute-type(IP)
Redistributes routes of the specified type.
matchtag
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.
setautomatic-tag
Automatically computes the tag value.
setcommunity
Sets the BGP communities attribute.
setipnext-hop
Specifies the address of the next hop.
setlevel(IP)
Indicates where to import routes.
setlocal-preference
Specifies a preference value for the autonomous system path.
setmetric(BGP,OSPF,RIP)
Sets the metric value for a routing protocol.
setmetric-type
Sets the metric type for the destination routing protocol.
setorigin(BGP)
Sets the BGP origin code.
settag(IP)
Sets the value of the destination routing protocol.
set origin (BGP)
To set the BGP origin code, use thesetorigin command in route-map configuration mode. To delete an entry, use the no form of this command.
Number of a remote autonomous system number. The range of values for this argument is any valid autonomous system number from 1 to 65535.
incomplete
Unknown heritage.
Command Default
The origin of the route is based on the path information of the route in the main IP routing table.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
10.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2(14)SX
This command was integrated into Cisco IOS Release 12.2(14)SX.
12.4(2)T
This command was modified. The egp keyword and autonomous-system-number argument were removed.
12.0(33)S3
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
Cisco IOS XE Release 2.4
This command was modified. Support for asplain notation was added and the default format for 4-byte autonomous system numbers is now asplain.
12.2(33)SRE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
12.2(33)XNE
This command was modified. Support for 4-byte autonomous system numbers in asplain and asdot notation was added.
15.2(1)E
This command was integrated into Cisco IOS Release 15.2(1)E.
Usage Guidelines
You must have a match clause (even if it points to a “permit everything” list) if you want to set the origin of a route. Use this command to set a specific origin when a route is redistributed into BGP. When routes are redistributed, the origin is usually recorded as incomplete, identified with a ? in the BGP table.
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 noroute-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions
to be performed when all of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
Examples
The following example sets the origin of routes that pass the route map to IGP:
route-map set_origin
match as-path 10
set origin igp
Related Commands
Command
Description
matchas-path
Matches a BGP autonomous system path access list.
route-map(IP)
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
routerbgp
Configures the BGP routing process.
setas-path
Modifies an autonomous system path for BGP routes.
set weight
To specify the BGP weight for the routing table, use the setweight command in route-map configuration mode. To delete an entry, use the no form of this command.
setweightnumber
nosetweightnumber
Syntax Description
number
Weight value. It can be an integer ranging from 0 to 65535.
Command Default
The weight is not changed by the specified route map.
Command Modes
Route-map configuration (config-route-map)
Command History
Release
Modification
10.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Usage Guidelines
The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands. In other words, the weights assigned with the setweight route-map configuration command override the weights assigned using the neighborweight command.
Examples
The following example sets the BGP weight for the routes matching the autonomous system path access list to 200:
route-map set-weight
match as-path 10
set weight 200
Related Commands
Command
Description
matchas-path
Matches a BGP autonomous system path access list.
matchcommunity
Matches a BGP community.
matchinterface(IP)
Distributes routes that have their next hop out one of the interfaces specified.
matchipaddress
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
matchipnext-hop
Redistributes any routes that have a next hop router address passed by one of the access lists specified.
matchiproute-source
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
matchmetric(IP)
Redistributes routes with the metric specified.
matchroute-type(IP)
Redistributes routes of the specified type.
matchtag
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.
setautomatic-tag
Automatically computes the tag value.
setcommunity
Sets the BGP communities attribute.
setipnext-hop
Specifies the address of the next hop.
setlevel(IP)
Indicates where to import routes.
setlocal-preference
Specifies a preference value for the autonomous system path.
setmetric(BGP,OSPF,RIP)
Sets the metric value for a routing protocol.
setmetric-type
Sets the metric type for the destination routing protocol.
setorigin(BGP)
Sets the BGP origin code.
settag(IP)
Sets the value of the destination routing protocol.