Contents
Introduction
This document explains the Border Gateway Protocol (BGP) local-AS feature, which was first available in Cisco IOS® Software Release 12.0(5)S.
The local-AS feature allows a router to appear to be a member of a second autonomous system (AS), in addition to its real AS. This feature can only be used for true eBGP peers. You cannot use this feature for two peers that are members of different confederation sub-ASs.
Prerequisites
Requirements
This document requires an understanding of the BGP routing protocol and its operations. Refer to the BGP Case Studies.
Components Used
The information in this document applies to these software and hardware versions.
- Cisco IOS Software Release 12.2(28)
- Cisco 2500 Series Routers
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Command Syntax
This list shows the syntax of the commands that the configurations in this document use.
Local-AS cannot be customized for individual peers in a peer group.
Local-AS cannot have the local BGP protocol AS number or the AS number of the remote peer.
The local-as command is valid only if the peer is a true eBGP peer. It does not work for two peers in different sub-ASs in a confederation.
Conventions
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Background Information
The local-AS feature is useful if ISP-A purchases ISP-B, but ISP-B's customers do not want to modify any peering arrangements or configurations. The local-AS feature allows routers in ISP-B to become members of ISP-A's AS. At the same time, these routers appear to their customers to retain their ISP-B AS number.
In Figure 1, ISP-A has not yet purchased ISP-B. In Figure 2, ISP-A has purchased ISP-B, and ISP-B uses the local-AS feature.
In Figure 2, ISP-B belongs to AS 100, and ISP-C to AS 300. When peering with ISP-C, ISP-B uses AS 200 as its AS number with the use of the neighbor ISP-C local-as 200 command. In updates sent from ISP-B to ISP-C, the AS_SEQUENCE in the AS_PATH attribute contains "200 100". The "200" is prepended by ISP-B due to the local-as 200 command configured for ISP-C.
Normally a combined ISP-A/B renumbers the routers in ISP-B to be part of AS 100. What if ISP-C is unable to change its eBGP configurations with ISP-B? Prior to the local-AS feature, the combined ISP-A/B has to maintain two AS numbers. The local-ascommand allows ISP-A/B to physically be one AS while it appears to be two ASs to ISP-C.
Configure
This section presents you with the information to configure the features this document describes.
Note: In order to find additional information on the commands this document uses, use the Command Lookup Tool (registeredcustomers only) .
Network Diagrams
This document uses these network setups.
Figure 1Configurations
This document uses these configurations.
ISP-B (AS 100, local-as 200) |
---|
ISP-C (AS 300) |
---|
Verify
This section provides information you can use to confirm your configuration properly works.
Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
Refer to the BGP Command Reference Guide in order to learn more about the show commands used in this section.
View the BGP routing table to see how the local-as command changed the AS_PATH. What you observe is that ISP-B prepends AS 200 to updates that are sent to and received from ISP-C. In addition, note that ISP-B is in AS number 100.
In this output, note that ISP-C sees ISP-B as part of AS 200.
Note in this output that ISP-B prepends "200" to the routes learned from ISP-C.
Note that ISP-C sees routes from ISP-B with an AS_PATH of "200 100".
These commands show the configured local-as values in their output:
Troubleshoot
The debug ip bgp updates command displays the received prefixes with its attributes from the neighbor. This output shows that the prefix 192.168.4.0/24 is received with AS PATH 200, 100.