|
Contents
- BGP Support for 4-byte ASN
- Finding Feature Information
- Information About BGP Support for 4-byte ASN
- BGP Autonomous System Number Formats
- Cisco Implementation of 4-Byte Autonomous System Numbers
- How to Configure BGP Support for 4-byte ASN
- Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers
- Troubleshooting Tips
- Modifying the Default Output and Regular Expression Match Format for 4-Byte Autonomous System Numbers
- Configuration Examples for BGP Support for 4-byte ASN
- Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers
- Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number
- Additional References
- Feature Information for BGP Support for 4-byte ASN
BGP Support for 4-byte ASN
The Cisco implementation of 4-byte autonomous system numbers uses asplain (65538, for example) as the default regular expression match and the output display format for AS numbers. However, you can configure 4-byte autonomous system numbers in both the asplain format and the asdot format as described in RFC 5396.
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Information About BGP Support for 4-byte ASN
BGP Autonomous System Number Formats
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.
Asdot Only Autonomous System Number Formatting
In Cisco IOS XE Release 2.3, 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.
Asplain as Default Autonomous System Number Formatting
In 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.
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 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.
Cisco Implementation of 4-Byte Autonomous System Numbers
In 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. For more details about 4-byte autonomous system number formats, see the "BGP Autonomous System Number Formats" section.
In 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. For an example of BGP peers in two autonomous systems using 4-byte numbers, see the figure below. To view a configuration example of the configuration between three neighbor peers in separate 4-byte autonomous systems configured using asdot notation, see the "Example: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers" section.
Cisco also supports RFC 4893, which was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. To ensure a smooth transition, we recommend that all BGP speakers within an autonomous system that is identified using a 4-byte autonomous system number be upgraded to support 4-byte autonomous system numbers.
Note | A new 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. |
How to Configure BGP Support for 4-byte ASN
- Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers
- Modifying the Default Output and Regular Expression Match Format for 4-Byte Autonomous System Numbers
Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers
Perform this task to configure a BGP routing process and BGP peers when the BGP peers are located in an AS that uses 4-byte autonomous system numbers. The address family configured here is the default IPv4 unicast address family, and the configuration is done at Router B in the figure above (in the "Cisco Implementation of 4-Byte Autonomous System Numbers" section). The 4-byte autonomous system numbers in this task are formatted in the default asplain (decimal value) format; for example, Router B is in autonomous system number 65538 in the figure above. Remember to perform this task for any neighbor routers that are to be BGP peers.
DETAILED STEPS
Examples
The following output from the show ip bgp command at Router B shows the BGP routing table entry for network 10.1.1.0 learned from the BGP neighbor at 192.168.1.2 in Router A in the figure above with its 4-byte autonomous system number of 65536 displayed in the default asplain format.
RouterB# show ip bgp 10.1.1.0
BGP routing table entry for 10.1.1.0/24, version 2
Paths: (1 available, best #1)
Advertised to update-groups:
2
65536
192.168.1.2 from 192.168.1.2 (10.1.1.99)
Origin IGP, metric 0, localpref 100, valid, external, best
The following output from the show ip bgp summary command shows the 4-byte autonomous system number 65536 for the BGP neighbor 192.168.1.2 of Router A in the figure above after this task has been configured on Router B:
RouterB# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 65538
BGP table version is 3, main routing table version 3
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 444 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 806 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Stated
192.168.1.2 4 65536 6 6 3 0 0 00:01:33 1
Modifying the Default Output and Regular Expression Match Format for 4-Byte Autonomous System Numbers
Perform this task to modify the default output format for 4-byte autonomous system numbers from asplain format to asdot notation format. The show ip bgp summary command is used to display the changes in output format for the 4-byte autonomous system numbers.
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable
Example: Router> enable |
Enables privileged EXEC mode. | ||
Step 2 |
show
ip
bgp
summary
Example: Router# show ip bgp summary |
Displays the status of all BGP connections. | ||
Step 3 |
configure
terminal
Example: Router# configure terminal |
Enters global configuration mode. | ||
Step 4 |
router
bgp
autonomous-system-number
Example: Router(config)# router bgp 65538 |
Enters router configuration mode for the specified routing process. | ||
Step 5 |
bgp
asnotation
dot
Example: Router(config-router)# bgp asnotation dot |
Changes the default output format of BGP 4-byte autonomous system numbers from asplain (decimal values) to dot notation.
| ||
Step 6 |
end
Example: Router(config-router)# end |
Exits address family configuration mode and returns to privileged EXEC mode. | ||
Step 7 |
clear
ip
bgp
*
Example: Router# clear ip bgp * |
Clears and resets all current BGP sessions.
| ||
Step 8 |
show
ip
bgp
summary
Example: Router# show ip bgp summary |
Displays the status of all BGP connections. | ||
Step 9 |
show
ip
bgp
regexp
regexp
Example: Router# show ip bgp regexp ^1\.0$ |
Displays routes that match the autonomous system path regular expression. | ||
Step 10 |
configure
terminal
Example: Router# configure terminal |
Enters global configuration mode. | ||
Step 11 |
router
bgp
autonomous-system-number
Example: Router(config)# router bgp 65538 |
Enters router configuration mode for the specified routing process. | ||
Step 12 |
no
bgp
asnotation
dot
Example: Router(config-router)# no bgp asnotation dot |
Resets the default output format of BGP 4-byte autonomous system numbers back to asplain (decimal values).
| ||
Step 13 |
end
Example: Router(config-router)# end |
Exits router configuration mode and returns to privileged EXEC mode. | ||
Step 14 |
clear
ip
bgp
*
Example: Router# clear ip bgp * |
Clears and resets all current BGP sessions.
|
Examples
The following output from the show ip bgp summary command shows the default asplain format of the 4-byte autonomous system numbers. Note the asplain format of the 4-byte autonomous system numbers, 65536 and 65550.
Router# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 65538
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd
192.168.1.2 4 65536 7 7 1 0 0 00:03:04 0
192.168.3.2 4 65550 4 4 1 0 0 00:00:15 0
After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions), the output is converted to asdot notation format as shown in the following output from the show ip bgp summary command. Note the asdot format of the 4-byte autonomous system numbers, 1.0 and 1.14 (these are the asdot conversions of the 65536 and 65550 autonomous system numbers.
Router# show ip bgp summary
BGP router identifier 172.17.1.99, local AS number 1.2
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd
192.168.1.2 4 1.0 9 9 1 0 0 00:04:13 0
192.168.3.2 4 1.14 6 6 1 0 0 00:01:24 0
After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions), the regular expression match format for 4-byte autonomous system paths is changed to asdot notation format. Although a 4-byte autonomous system number can be configured in a regular expression using either asplain format or asdot format, only 4-byte autonomous system numbers configured using the current default format are matched. In the first example below, the show ip bgp regexp command is configured with a 4-byte autonomous system number in asplain format. The match fails because the default format is currently asdot format and there is no output. In the second example using asdot format, the match passes and the information about the 4-byte autonomous system path is shown using the asdot notation.
Note | The asdot notation uses a period, which is a special character in Cisco regular expressions. To remove the special meaning, use a backslash before the period. |
Router# show ip bgp regexp ^65536$ Router# show ip bgp regexp ^1\.0$ BGP table version is 2, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 1.0 i
Configuration Examples for BGP Support for 4-byte ASN
- Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers
- Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number
Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers
Asplain Format
The following example shows the configuration for Router A, Router B, and Router E in the figure below with a BGP process configured between three neighbor peers (at Router A, at Router B, and at Router E) in separate 4-byte autonomous systems configured using asplain notation. IPv4 unicast routes are exchanged with all peers.
Router A
router bgp 65536 bgp router-id 10.1.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.1 remote-as 65538 ! address-family ipv4 neighbor 192.168.1.1 activate no auto-summary no synchronization network 10.1.1.0 mask 255.255.255.0 exit-address-family
Router B
router bgp 65538 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 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
Router E
router bgp 65550 bgp router-id 10.2.2.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.3.1 remote-as 65538 ! address-family ipv4 neighbor 192.168.3.1 activate no auto-summary no synchronization network 10.2.2.0 mask 255.255.255.0 exit-address-family
Asdot Format
The following example shows how to create the configuration for Router A, Router B, and Router E in the figure below with a BGP process configured between three neighbor peers (at Router A, at Router B, and at Router E) in separate 4-byte autonomous systems configured using the default asdot format. IPv4 unicast routes are exchanged with all peers.
Router A
router bgp 1.0 bgp router-id 10.1.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.1 remote-as 1.2 ! address-family ipv4 neighbor 192.168.1.1 activate no auto-summary no synchronization network 10.1.1.0 mask 255.255.255.0 exit-address-family
Router B
router bgp 1.2 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 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
Router E
router bgp 1.14 bgp router-id 10.2.2.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.3.1 remote-as 1.2 ! address-family ipv4 neighbor 192.168.3.1 activate no auto-summary no synchronization network 10.2.2.0 mask 255.255.255.0 exit-address-family
Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number
Asplain Default Format in Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, and Later Releases
The following example is available in Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases and shows how to create a VRF with a route-target that uses a 4-byte autonomous system number, 65537, and how to set the route target to extended community value 65537:100 for routes that are permitted by the route map.
ip vrf vpn_red rd 64500:100 route-target both 65537:100 exit route-map red_map permit 10 set extcommunity rt 65537:100 end
After the configuration is completed, use the show route-map command to verify that the extended community is set to the route target that contains the 4-byte autonomous system number of 65537.
RouterB# show route-map red_map
route-map red_map, permit, sequence 10
Match clauses:
Set clauses:
extended community RT:65537:100
Policy routing matches: 0 packets, 0 bytes
Asdot Default Format in Cisco IOS Release 12.0(32)S12, and 12.4(24)T
The following example is available in Cisco IOS Release 12.0(32)S12, and 12.4(24)T and shows how to create a VRF with a route-target that uses a 4-byte autonomous system number, 1.1, and how to set the route target to extended community value 1.1:100 for routes that are permitted by the route map.
Note | In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SXI1, and later releases, this example works if you have configured asdot as the default display format using the bgp asnotation dot command. |
ip vrf vpn_red rd 64500:100 route-target both 1.1:100 exit route-map red_map permit 10 set extcommunity rt 1.1:100 end
After the configuration is completed, use the show route-map command to verify that the extended community is set to the route target that contains the 4-byte autonomous system number of 1.1.
RouterB# show route-map red_map
route-map red_map, permit, sequence 10
Match clauses:
Set clauses:
extended community RT:1.1:100
Policy routing matches: 0 packets, 0 bytes
Additional References
Technical Assistance
Description | Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for BGP Support for 4-byte ASN
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 4 | Feature Information for BGP Support for 4-byte ASN |
Feature Name | Releases | Feature Information |
---|---|---|
BGP Support for 4-byte ASN |
12.0(32)S12 12.0(32)SY8 12.0(33)S3 12.2(33)SRE 12.2(33)XNE 12.2(33)SXI1 12.4(24)T 15.0(1)S Cisco IOS XE Release 2.3 Cisco IOS XE Release 2.4 Cisco IOS XE Release 3.1.0SG 15.1(1)SG Cisco IOS XE Release 3.3SG |
The BGP Support for 4-Byte ASN feature introduced support for 4-byte autonomous system numbers. In Cisco IOS XE Release 2.4 and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain 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. The following commands were introduced or modified by this feature: bgp asnotation dot, bgp confederation identifier, bgp confederation peers, all clear ip bgpcommands that configure an autonomous system number, ip as-path access-list, ip extcommunity-list, match source-protocol, neighbor local-as, neighbor remote-as, redistribute (IP), router bgp, route-target, set as-path, set extcommunity, set origin, all show ip bgp commands that display an autonomous system number, and show ip extcommunity-list. |
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.