BGP Hide Local Autonomous System

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.

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
• Additional References
• Command Reference

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 featurecan 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.

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
• Configuring BGP to Not Prepend the Local Autonomous System Number to Routes Learned From External Peers
• 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.

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. exit

DETAILED STEPS

Command or ActionPurpose
enable
Example: Router> enable
Enables privileged EXEC mode.
• Enter your password if prompted.
configure terminal
Example: Router# configure terminal
Enters global configuration mode.
router bgp as-number
Example: Router(config)# router bgp 100
Enters router configuration mode, and creates a BGP
routing process.
address-family ipv4 | ipv6 |vpnv4 [multicast |
unicast | vrf {vrf-name}]
Example: Router(config-router-af)# address-family ipv4
unicast
Enter address family configuration mode to configure BGP
peers to accept address family specific configurations.
• The example command creates an IPv4 unicast address
family session.
network ip-address [network-mask] [route-map
map-name] [backdoor]
Example:
Router(config-router-af)# network 10.1.1.1
remote-as 100
Specifies the networks to be advertised by the BGP and
multiprotocol BGP routing processes.
neighbor ip-address remote-as as-number
Example:
Router(config-router-af)# neighbor 10.1.1.1
remote-as 100
Establishes peering with the specified neighbor and
configures the neighbor as internal to the local autonomous
system.
neighbor ip-address local-as
as-number[no-prepend]
Example:
Router(config-router-af)# neighbor 10.1.1.1
local-as 300 no-prepend
Allows the customization of the autonomous system
number for eBGP peer groupings.
• Using the no-prepend keyword configures the router to
not prepend the local autonomous system number to
routes that are received from external peers.
end
Example: Router(config-router)# end
Exits address-family configuration mode, and enters
Privileged EXEC mode.

Examples
The following example configures the router to not prepend autonomous system number 300 to routes that are received from external peers:

router bgp 100
network 10.1.1.0
neighbor 10.1.1.1 remote-as 100
neighbor 10.1.1.1 local-as 300 no-prepend
end

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 link
BGP version 4, remote router ID 10.1.1.1
BGP state = Established, up for 00:00:49
Last read 00:00:49, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
IPv4 MPLS Label capability:
Received 10 messages, 1 notifications, 0 in queue
Sent 10 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds


Command Reference: neighbor local-as, show ip bgp neighbors
For Latest Updates in network Pls log