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 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.
redistribute protocol autonomous-system-number [route-type] [ route-map map-tag ]
no redistribute protocol autonomous-system-number [route-type] [ route-map map-tag ]
Route redistribution from BGP to ISO IS-IS is disabled.
Router configuration (config-router)
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. |
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-map map-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. |
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:
router isis osi-proc-17 redistribute bgp 64500 clns
Command |
Description |
---|---|
network (BGP and multiprotocol 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. |
router bgp |
Configures the BGP routing process. |
show route-map |
Displays all route maps configured or only the one specified. |
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.
redistribute protocol [ process-id ] { level-1 | level-1-2 | level-2 } [ autonomous-system-number ] [ metric { metric-value | transparent } ] [ metric-type type-value ] [ match { internal | external 1 | external 2 } ] [ tag tag-value ] [ route-map map-tag ] [subnets] [nssa-only]
no redistribute protocol [ process-id ] { level-1 | level-1-2 | level-2 } [ autonomous-system-number ] [ metric { metric-value | transparent } ] [ metric-type type-value ] [ match { internal | external 1 | external 2 } ] [ tag tag-value ] [ route-map map-tag ] [subnets] [nssa-only]
Route redistribution is disabled.
Router configuration (config-router)
Address family configuration (config-af)
Address family topology configuration (config-router-af-topology)
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. |
![]() 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:
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-list out 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.
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.
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.
The following example shows how OSPF routes are redistributed into a BGP domain:
Router(config)# router bgp 109 Router(config-router)# redistribute ospf
The following example shows how to redistribute EIGRP routes into an OSPF domain:
Router(config)# router ospf 110 Router(config-router)# redistribute eigrp
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.
Router(config)# router ospf 109 Router(config-router)# redistribute eigrp 108 metric 100 subnets Router(config-router)# redistribute rip metric 200 subnets
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.
Router(config)# router isis Router(config-router)# redistribute bgp 120 metric 5 metric-type external
In the following example, network 172.16.0.0 will appear as an external LSA in OSPF 1 with a cost of 100 (the cost is preserved):
Router(config)# interface ethernet 0 Router(config-if)# ip address 172.16.0.1 255.0.0.0 Router(config-if)# exit Router(config)# ip ospf cost 100 Router(config)# interface ethernet 1 Router(config-if)# ip address 10.0.0.1 255.0.0.0 ! Router(config)# router ospf 1 Router(config-router)# network 10.0.0.0 0.255.255.255 area 0 Router(config-if)# exit Router(config-router)# redistribute ospf 2 subnet Router(config)# router ospf 2 Router(config-router)# network 172.16.0.0 0.255.255.255 area 0
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.
Router(config)# router ospf 2 Router(config-router)# redistribute bgp 65538
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:
Router(config)# router eigrp virtual-name Router(config-router)# address-family ipv4 autonomous-system 1 Router(config-router-af)# topology base Router(config-router-af-topology)# redistribute eigrp 6473 metric 1 1 1 1 1
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
Command |
Description |
---|---|
address-family (EIGRP) |
Enters address family configuration mode to configure an EIGRP routing instance. |
address-family ipv4 (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-family vpnv4 |
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. |
bgp asnotation dot |
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-information originate (BGP) |
Allows the redistribution of network 0.0.0.0 into BGP. |
default-information originate (IS-IS) |
Generates a default route into an IS-IS routing domain. |
default-information originate (OSPF) |
Generates a default route into an OSPF routing domain. |
distribute-list out (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. |
router bgp |
Configures the BGP routing process. |
router eigrp |
Configures the EIGRP address-family process. |
show route-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. |
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.
redistribute protocol [process-id] [route-type] [ route-map [map-tag] ]
no redistribute protocol [process-id] [route-type] [ route-map [map-tag] ]
Route redistribution from ISO IS-IS to BGP is disabled.
route-type : ip
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)
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. |
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.
The following example configures CLNS NSAP routes from the IS-IS routing process called osi-proc-6 to be redistributed into BGP:
Router(config)# router bgp 64352 Router(config-router)# redistribute isis osi-proc-6 clns
The following example configures CLNS NSAP routes from the IS-IS routing process called osi-proc-15 to be redistributed into BGP:
Router(config)# router bgp 404 Router(config-router)# address-family nsap Router(config-router-af)# redistribute isis osi-proc-15 clns
Command |
Description |
---|---|
network (BGP and multiprotocol 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. |
show route-map |
Displays all route maps configured or only the one specified. |
To configure the Border Gateway Protocol (BGP) routing process, use the router bgp command in global configuration mode. To remove a BGP routing process, use the no form of this command.
router bgp autonomous-system-number
no router bgp autonomous-system-number
No BGP routing process is enabled by default.
Global configuration (config)
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. |
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:
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.
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 bgp asnotation dot 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 bgp asnotation dot command. After enabling the bgp asnotation dot command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * 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. |
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 |
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/. |
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:
router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family
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.
router bgp 65538 neighbor 192.168.1.2 remote-as 65536 neighbor 192.168.3.2 remote-as 65550 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family
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.
router bgp 1.2 neighbor 192.168.1.2 remote-as 1.0 neighbor 192.168.3.2 remote-as 1.14 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family
Command |
Description |
---|---|
bgp asnotation dot |
Changes the default display and the regular expression match format of BGP 4-byte autonomous system numbers from asplain (decimal values) to dot notation. |
neighbor remote-as |
Adds an entry to the BGP or multiprotocol BGP neighbor table. |
network (BGP and multiprotocol BGP) |
Specifies the list of networks for the BGP routing process. |
To modify an autonomous system path for BGP routes, use the set as-path command in route-map configuration mode. To not modify the autonomous system path, use the noform of this command.
set as-path { tag | prepend as-path-string }
no set as-path { tag | prepend as-path-string }
An autonomous system path is not modified.
Route-map configuration (config-route-map)
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. |
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 set as-path tag variation of this command modifies the autonomous system length. The set as-path prepend 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 bgp asnotation dot command followed by the clear ip bgp * 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.
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
Command |
Description |
---|---|
match as-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. |
router bgp |
Configures the BGP routing process. |
set tag (IP) |
Sets a tag value of the destination routing protocol. |
To set the BGP communities attribute, use the set community route map configuration command. To delete the entry, use the no form of this command.
set community { community-number [additive] [well-known-community] | none }
no set community
No BGP communities attributes exist.
Route-map configuration (config-route-map)
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. |
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 no route-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.
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
Command |
Description |
---|---|
ip community-list |
Creates a community list for BGP and control access to it. |
match community |
Matches a BGP community. |
route-map (IP) |
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing. |
set comm-list delete |
Removes communities from the community attribute of an inbound or outbound update. |
show ip bgp community |
Displays routes that belong to specified BGP communities. |
To set the BGP route dampening factors, use the set dampening route map configuration command. To disable this function, use the no form of this command.
set dampening half-life reuse suppress max-suppress-time
no set dampening
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. 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. |
This command is disabled by default.
Route-map configuration (config-route-map)
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. |
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria --the conditions under which redistribution is allowed for the current route-mapcommand. The set commands specify the set actions --the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
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.
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
Command |
Description |
---|---|
match as-path |
Matches a BGP autonomous system path access list. |
match community |
Matches a BGP community. |
match interface (IP) |
Distributes routes that have their next hop out one of the interfaces specified. |
match ip address |
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. |
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 (IP) |
Redistributes routes with the metric specified. |
match route-type (IP) |
Redistributes routes of the specified type. |
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 automatic-tag |
Automatically computes the tag value. |
set community |
Sets the BGP communities attribute. |
set ip next-hop |
Specifies the address of the next hop. |
set level (IP) |
Indicates where to import routes. |
set local-preference |
Specifies a preference value for the autonomous system path. |
set metric (BGP, OSPF, RIP) |
Sets the metric value for a routing protocol. |
set metric-type |
Sets the metric type for the destination routing protocol. |
set origin (BGP) |
Sets the BGP origin code. |
set tag (IP) |
Sets the value of the destination routing protocol. |
set weight |
Specifies the BGP weight for the routing table. |
show route-map |
Displays all route maps configured or only the one specified. |
To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.
set ip next-hop ip-address [ ...ip-address ] [ peer-address ]
no set ip next-hop ip-address [ ...ip-address ] [ peer-address ]
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. |
This command is disabled by default.
Route-map configuration (config-route-map)
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. |
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.
Use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map 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 set ip next-hop command is down, the optionally specified IP addresses are tried in turn.
When the set ip next-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 set ip next-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 set ip next-hop command has finer granularity than the (per-neighbor) neighbor next-hop-self command, because you can set the next hop for some routes, but not others. The neighbor next-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:
![]() Note |
To avoid a common configuration error for reflected routes, do not use the set ip next-hop command in a route map to be applied to BGP route reflector clients. |
Configuring the set ip next-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.
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 set ip next-hop peer-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
Command |
Description |
---|---|
ip policy route-map |
Identifies a route map to use for policy routing on an interface. |
match ip address |
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. |
match length |
Bases policy routing on the Level 3 length of a packet. |
neighbor next-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. |
set default interface |
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. |
set interface |
Indicates where to output packets that pass a match clause of a route map for policy routing. |
set ip default next-hop |
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination. |
To indicate where to output IPv6 packets that pass a match clause of a route map for policy routing, use the set ipv6 next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.
set ipv6 next-hop { ipv6-address [link-local-address] | encapsulate l3vpn profile name | peer-address }
no set ipv6 next-hop { ipv6-address [link-local-address] | encapsulate l3vpn profile name | peer-address }
ipv6-address |
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. |
encapsulate l3vpn |
Sets the encapsulation profile for VPN nexthop. |
profile name |
Name of the Layer 3 encapsulation profile. |
peer-address |
(Optional) Sets the next hop to be the BGP peering address. |
IPv6 packets are forwarded to the next hop router in the routing table.
Route-map configuration (config-route-map)
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 encapsulate l3vpn keyword was added. |
The set ipv6 next-hop command is similar to the set ip next-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 set ipv6 next-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 set ipv6 next-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 set ipv6 next-hop command has finer granularity than the per-neighbor neighbor next-hop-self command, because you can set the next hop for some routes, but not others. The neighbor next-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:
Configuring the set ipv6 next-hop ipv6-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.
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 neighbor update-source router configuration command.
router bgp 170 neighbor FE80::250:BFF:FE0E:A471 remote-as 150 neighbor FE80::250:BFF:FE0E:A471 update-source fastether 0 address-family ipv6 neighbor FE80::250:BFF:FE0E:A471 activate neighbor FE80::250:BFF:FE0E:A471 route-map nh6 out route-map nh6 set ipv6 next-hop 3FFE:506::1
![]() Note |
If you specify only the global IPv6 next hop address (the ipv6-address argument) with the set ipv6 next-hop command after specifying the neighbor interface (the interface-type argument) with the neighbor update-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. |
Command |
Description |
---|---|
ip policy route-map |
Identifies a route map to use for policy routing on an interface. |
match ipv6 address |
Distributes IPv6 routes that have a prefix permitted by a prefix list. |
match ipv6 next-hop |
Distributes IPv6 routes that have a next hop prefix permitted by a prefix list. |
match ipv6 route-source |
Distributes IPv6 routes that have been advertised by routers at an address specified by a prefix list. |
neighbor next-hop-self |
Disables next-hop processing of BGP updates on the router. |
neighbor update-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. |
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.
set metric metric-value
no set metric metric-value
metric-value |
Metric value; an integer from -294967295 to 294967295. This argument applies to all routing protocols except Enhanced Interior Gateway Routing Protocol (EIGRP). |
The dynamically learned metric value.
Route-map configuration (config-route-map)
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. |
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.
The following example sets the metric value for the routing protocol to 100:
route-map set-metric set metric 100
Command |
Description |
---|---|
match as-path |
Matches a BGP autonomous system path access list. |
match community |
Matches a BGP community. |
match interface (IP) |
Distributes routes that have their next hop out one of the interfaces specified. |
match ip address |
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. |
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 (IP) |
Redistributes routes with the metric specified. |
match route-type (IP) |
Redistributes routes of the specified type. |
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 automatic-tag |
Automatically computes the tag value. |
set community |
Sets the BGP communities attribute. |
set ip next-hop |
Specifies the address of the next hop. |
set level (IP) |
Indicates where to import routes. |
set local-preference |
Specifies a preference value for the autonomous system path. |
set metric (BGP, OSPF, RIP) |
Sets the metric value for a routing protocol. |
set metric-type |
Sets the metric type for the destination routing protocol. |
set origin (BGP) |
Sets the BGP origin code. |
set tag (IP) |
Sets the value of the destination routing protocol. |
To set the BGP origin code, use the set origin command in route-map configuration mode. To delete an entry, use the no form of this command.
set origin { igp | egp autonomous-system-number | incomplete }
no set origin { igp | egp autonomous-system-number | incomplete }
igp |
Remote Interior Gateway Protocol (IGP) system. |
egp |
Local Exterior Gateway Protocol (EGP) system. |
autonomous-system-number |
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. |
The origin of the route is based on the path information of the route in the main IP routing table.
Route-map configuration (config-route-map)
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. |
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 no route-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.
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
Command |
Description |
---|---|
match as-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. |
router bgp |
Configures the BGP routing process. |
set as-path |
Modifies an autonomous system path for BGP routes. |
To specify the BGP weight for the routing table, use the set weight command in route-map configuration mode. To delete an entry, use the no form of this command.
set weight number
no set weight number
number |
Weight value. It can be an integer ranging from 0 to 65535. |
The weight is not changed by the specified route map.
Route-map configuration (config-route-map)
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. |
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 set weight route-map configuration command override the weights assigned using the neighbor weight command.
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
Command |
Description |
---|---|
match as-path |
Matches a BGP autonomous system path access list. |
match community |
Matches a BGP community. |
match interface (IP) |
Distributes routes that have their next hop out one of the interfaces specified. |
match ip address |
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. |
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 (IP) |
Redistributes routes with the metric specified. |
match route-type (IP) |
Redistributes routes of the specified type. |
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 automatic-tag |
Automatically computes the tag value. |
set community |
Sets the BGP communities attribute. |
set ip next-hop |
Specifies the address of the next hop. |
set level (IP) |
Indicates where to import routes. |
set local-preference |
Specifies a preference value for the autonomous system path. |
set metric (BGP, OSPF, RIP) |
Sets the metric value for a routing protocol. |
set metric-type |
Sets the metric type for the destination routing protocol. |
set origin (BGP) |
Sets the BGP origin code. |
set tag (IP) |
Sets the value of the destination routing protocol. |
set weight |
Specifies the BGP weight for the routing table. |