![]() |
Table Of Contents
BGP Hide Local-Autonomous System
Prerequisites for BGP Hide Local-Autonomous System
Restrictions for BGP Hide Local-Autonomous System
Information About BGP Hide Local-Autonomous System
Changing the Autonomous System Number in a BGP Network
Configuring the BGP Hide Local-Autonomous System Feature
Benefits of the BGP Hide Local-Autonomous System Feature
How to Configure BGP Hide Local-Autonomous System
Configuring the no-prepend Keyword
Verifying the Configuration of the BGP Hide Local-Autonomous Feature
BGP Hide Local-Autonomous System
The BGP Hide Local-Autonomous System feature simplifies the task of changing the autonomous system number in a Border Gateway Protocol (BGP) network. Without this feature, this task can be difficult because, during the transition, internal BGP (iBGP) peers will reject external routes from peers with a local autonomous system number in the autonomous system number path to prevent routing loops. This feature allows you to transparently change the autonomous system number for the entire BGP network and ensure that routes can be propagated throughout the autonomous system, while the autonomous system number transition is incomplete.
Feature History for BGP Hide Local-Autonomous System
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Prerequisites for BGP Hide Local-Autonomous System
•
Restrictions for BGP Hide Local-Autonomous System
•
Information About BGP Hide Local-Autonomous System
•
How to Configure BGP Hide Local-Autonomous System
Prerequisites for BGP Hide Local-Autonomous System
This document assumes that BGP is enabled and peering has been established in all participating networks.
Restrictions for BGP Hide Local-Autonomous System
•
This feature can be configured for only external BGP (eBGP) peers.
•
This feature should be deconfigured after the transition to the new autonomous system number is completed to minimize the possible creation of routing loops.
Information About BGP Hide Local-Autonomous System
To configure the BGP Hide Local-Autonomous System feature, you must understand the following concepts:
•
Changing the Autonomous System Number in a BGP Network
•
Configuring the BGP Hide Local-Autonomous System Feature
•
Benefits of the BGP Hide Local-Autonomous System Feature
Changing the Autonomous System Number in a BGP Network
Changing the autonomous system number may be necessary when 2 separate BGP networks are combined under a single autonomous system. This typically occurs when one ISP purchases another ISP. The neighbor local-as command is used initially to configure BGP peers to support 2 local autonomous system numbers to maintain peering between 2 separate BGP networks. This configuration allows the ISP to immediately make the transition without any impact on existing customer configurations.
When the customer configurations have been updated, The next step is to complete the transition from the old autonomous system number to the new autonomous system number. However, when the neighbor local-as command is configured on a BGP peer, the local autonomous system number is automatically prepended to all routes that are learned from eBGP peers by default. This behavior, however, makes changing the autonomous system number for a service provider or large BGP network difficult because routes, with the prepended autonomous system number, will be rejected by internal BGP (iBGP) peers that are configured with the same autonomous system number. For example, if you configure an iBGP peer with the neighbor 10.0.0.2 local-as 20 statement, all routes that are learned from the 10.0.0.2 external peer will automatically have the autonomous system number 20 prepended. Internal routers that are configured with the autonomous number 20 will detect these routes as routing loops and reject them. This behavior requires you to change the autonomous system number for all iBGP peers at the same time.
Configuring the BGP Hide Local-Autonomous System Feature
The BGP Hide Local-Autonomous System feature introduces the no-prepend keyword to the neighbor local-as command. The use of the no-prepend keyword will allow you to configure a BGP speaker to not prepend the local autonomous system number to any routes that are received from eBGP peers. This feature can be used to help transparently change the autonomous system number of a BGP network and ensure that routes are propagated throughout the autonomous system, while the autonomous system number transition is incomplete. Because the local autonomous system number is not prepended to these routes, external routes will not be rejected by internal peers during the transition from one autonomous system number to another.
CautionBGP prepends the autonomous system number from each BGP network that a route traverses. This behavior is designed to maintain network reachability information and to prevent routing loops from occurring. Configuring this feature incorrectly could create routing loops. So, the configuration of this feature should only be attempted by an experienced network operator.
Benefits of the BGP Hide Local-Autonomous System Feature
You can use the BGP Hide Local-Autonomous System feature to transparently change the autonomous system number of a BGP network and ensure that routes can be propagated throughout the autonomous system while the autonomous system number transition is incomplete.
How to Configure BGP Hide Local-Autonomous System
This section contains the following procedures:
•
Verifying the Configuration of the BGP Hide Local-Autonomous Feature
Configuring BGP to Not Prepend the Local Autonomous System Number to Routes Learned From External Peers
To configure a router that is running BGP with the BGP Hide Local-Autonomous System feature to not prepend the local autonomous system number to routes that are received from external peers, use the following steps.
Configuring the no-prepend Keyword
The no-prepend keyword should be used only to change the autonomous system number in a BGP network and should be deconfigured after the transition is complete because routing loops can be created if this feature is used incorrectly.
CautionBGP prepends the autonomous system number from each BGP network that a route traverses. This behavior is designed to maintain network reachability information and to prevent routing loops from occurring. Configuring this feature incorrectly could create routing loops. So, the configuration of this feature should only be attempted by an experienced network operator.
Restrictions
•
This feature can only be configured for eBGP peers.
•
This feature should be deconfigured after the transition to the new autonomous system number is completed to minimize the possible creation of routing loops.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
router bgp as-number
4.
address-family {ipv4 | ipv6 | vpnv4| [multicast | unicast | vrf {vrf-name}]}
5.
network ip-address [network-mask] [route-map map-name] [backdoor]
6.
neighbor ip-address remote-as as-number
7.
neighbor ip-address local-as as-number no-prepend
8.
end
DETAILED STEPS
Examples
The following example configures the router to not prepend autonomous system number 300 to routes that are received from external peers:
router bgp 100network 10.1.1.0neighbor 10.1.1.1 remote-as 100neighbor 10.1.1.1 local-as 300 no-prependendWhat to Do Next
You can verify that this feature is configured correctly with the show ip bgp neighbors command. Go to the Verifying the Configuration of the BGP Hide Local-Autonomous Feature section for instructions and example output.
Verifying the Configuration of the BGP Hide Local-Autonomous Feature
To verify that the local autonomous system number is not prepended to received external routes, use the show ip bgp neighbors command. The output of this command will display the local autonomous system number and then "no-prepend" for received external routes when this feature is configured.
The following example shows that autonomous system number 300 will not be prepended to the 10.1.1.1 peer:
Router# show ip bgp neighbors
BGP neighbor is 10.1.1.1, remote AS 100, local AS 300 no-prepend, external linkBGP version 4, remote router ID 10.1.1.1BGP state = Established, up for 00:00:49Last read 00:00:49, hold time is 180, keepalive interval is 60 secondsNeighbor capabilities:Route refresh: advertised and received(new)Address family IPv4 Unicast: advertised and receivedIPv4 MPLS Label capability:Received 10 messages, 1 notifications, 0 in queueSent 10 messages, 0 notifications, 0 in queueDefault minimum time between advertisement runs is 30 secondsAdditional References
The following sections provide references related to BGP Prefix-Based Outbound Route Filtering feature.
Related Documents
Related Topic Document TitleThe BGP Hide Local-Autonomous System feature is an extension of the BGP routing protocol. For more information about configuring BGP, autonomous systems, and route filtering, refer to the "Configuring BGP" chapter of the Release 12.2 Cisco IOS IP Configuration Guide and Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols.
•
Cisco IOS IP Configuration Guide, Release 12.3
•
Cisco IOS IP Command Reference, Volume 2 of 4: Routing Protocols, Release 12.3
Standards
Standards TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
RFCs TitleNo new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
—
Technical Assistance
Description LinkTechnical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
TAC Home Page:
http://www.cisco.com/public/support/tac/home.shtml
BGP Support Page:
http://www.cisco.com/cgi-bin/Support/browse/psp_view.pl?p=Internetworking:BGP
Command Reference
This section documents modified commands. All other commands used with this feature are documented in the Cisco IOS command reference publications.
neighbor local-as
To allow customization of the autonomous system number for external BGP (eBGP) peer groupings, use the neighbor local-as command in address family or router configuration mode. To disable this function, use the no form of this command.
neighbor {ip-address | peer-group-name} local-as as-number [no-prepend]
no neighbor {ip-address | peer-group-name} local-as as-number
Syntax Description
Defaults
The local autonomous system number is prepended to all external routes unless the no-prepend keyword is used.
Command Modes
Address family configuration
Router configuration
Command History
Release Modification12.0(5)S
This command was introduced.
12.0(5)T
Address family configuration mode was added.
12.0(18)S
12.2(8)T
12.2(14)S
The no-prepend keyword was added.
Usage Guidelines
Each Border Gateway Protocol (BGP) peer or peer group can be configured to have a local autonomous system value for the purpose of peering. In the case of peer groups, the local autonomous system value is valid for all peers within the peer group. This feature, however, cannot be customized for individual peers within the peer group.
If this command is configured, you cannot use the local BGP autonomous system number or the autonomous system number of the remote peer.
This command is valid only if the peer is a true eBGP peer. This feature does not work for two peers in different subautonomous systems of a confederation.
The no-prepend keyword should be used only to change the autonomous system number in a BGP network and should be deconfigured after the transition has been completed.
CautionBGP prepends the autonomous system number from each BGP network that a route traverses. This behavior is designed to maintain network reachability information and to prevent routing loops from occurring. Configuring this command, using the no-prepend keyword, incorrectly could create routing loops. So, the configuration of this feature should only be attempted by an experienced network operator.
Examples
The following address family configuration example shows the customization of neighbor 172.20.1.1 configured to use autonomous system number 300 for the purpose of peering:
router bgp 109address-family ipv4 multicastnetwork 172.20.0.0neighbor 172.20.1.1 local-as 300The following configuration example shows the customization of neighbor 172.20.1.1 configured to not prepend autonomous system number 300 to routes that are received from eBGP peers:
router bgp 109address-family ipv4 unicastnetwork 172.20.0.0neighbor 172.20.1.1 remote-as 200neighbor 172.20.1.1 local-as 300 no-prepend
Related Commands
show ip bgp neighbors
To display information about TCP and Border Gateway Protocol (BGP) connections to neighbors, use the show ip bgp neighbors EXEC command in privileged EXEC mode.
show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | {paths regexp} | dampened-routes]
Syntax Description
Command Modes
Privileged EXEC
Command History
Release Modification10.0
This command was introduced.
11.2
The received-routes keyword was added.
12.0(18)S
12.2(8)T
12.2(14)S
The no-prepend configuration option was added to the display output.
Examples
The following is sample output from the show ip bgp neighbors command:
Router# show ip bgp neighbors 172.16.232.178BGP neighbor is 172.16.232.178, remote AS 35, local AS 2 no-prepend, external linkBGP version 4, remote router ID 192.168.3.3BGP state = Established, up for 1w1dLast read 00:00:53, hold time is 180, keepalive interval is 60 secondsNeighbor capabilities:Route refresh: advertised and receivedAddress family IPv4 Unicast: advertised and receivedAddress family IPv4 Multicast: advertised and receivedReceived 12519 messages, 0 notifications, 0 in queueSent 12523 messages, 0 notifications, 0 in queueRoute refresh request: received 0, sent 0Minimum time between advertisement runs is 30 secondsFor address family: IPv4 UnicastBGP table version 5, neighbor version 5Index 1, Offset 0, Mask 0x2Community attribute sent to this neighborInbound path policy configuredOutbound path policy configuredRoute map for incoming advertisements is uni-inRoute map for outgoing advertisements is uni-out3 accepted prefixes consume 108 bytesPrefix advertised 6, suppressed 0, withdrawn 0For address family: IPv4 MulticastBGP table version 5, neighbor version 5Index 1, Offset 0, Mask 0x2Inbound path policy configuredOutbound path policy configuredRoute map for incoming advertisements is mul-inRoute map for outgoing advertisements is mul-out3 accepted prefixes consume 108 bytesPrefix advertised 6, suppressed 0, withdrawn 0Connections established 2; dropped 1Last reset 1w1d, due to Peer closed the sessionConnection state is ESTAB, I/O status: 1, unread input bytes: 0Local host: 172.16.232.178, Local port: 179Foreign host: 172.16.232.179, Foreign port: 11002Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)Event Timers (current time is 0x2CF49CF8):Timer Starts Wakeups NextRetrans 12518 0 0x0TimeWait 0 0 0x0AckHold 12514 12281 0x0SendWnd 0 0 0x0KeepAlive 0 0 0x0GiveUp 0 0 0x0PmtuAger 0 0 0x0DeadWait 0 0 0x0iss: 273358651 snduna: 273596614 sndnxt: 273596614 sndwnd: 15434irs: 190480283 rcvnxt: 190718186 rcvwnd: 15491 delrcvwnd: 893SRTT: 300 ms, RTTO: 607 ms, RTV: 3 ms, KRTT: 0 msminRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 msFlags: passive open, nagle, gen tcbsDatagrams (max data segment is 1460 bytes):Rcvd: 24889 (out of order: 0), with data: 12515, total data bytes: 237921Sent: 24963 (retransmit: 0), with data: 12518, total data bytes: 237981Table 1 describes the significant fields shown in the display.
The following is sample output from the show ip bgp neighbors command with the advertised-routes keyword:
Router# show ip bgp neighbors 172.16.232.178 advertised-routesBGP table version is 27, local router ID is 172.16.232.181Status codes: s suppressed, d damped, h history, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*>i110.0.0.0 172.16.232.179 0 100 0 ?*> 200.2.2.0 0.0.0.0 0 32768 iThe following is sample output from the show ip bgp neighbors command with the routes keyword:
Router# show ip bgp neighbors 172.16.232.178 routesBGP table version is 27, local router ID is 172.16.232.181Status codes: s suppressed, d damped, h history, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path*> 10.0.0.0 172.16.232.178 40 0 10 ?*> 20.0.0.0 172.16.232.178 40 0 10 ?Table 2 describes the significant fields shown in the displays.
The following is sample output from the show ip bgp neighbors command entered with a specific IP address, the paths keyword, and a regular expression:
Router# show ip bgp neighbors 171.69.232.178 paths ^10Address Refcount Metric Path0x60E577B0 2 40 10 ?Table 3 describes the significant fields shown in the display.
Copyright © 2003 Cisco Systems, Inc. All rights reserved.