Monday, June 30, 2014

BGP Remove Private AS


BGP AS are 2 byte in size, ranging from 0-65535. AS 0 is reserved to identify nonrouted networks, ASN 23456 is reserved for use in ASN pool transition & the ASN 65535 is also reserved.

The block of ASNs from 64,512 through 65,534 is designated for private use. The remainder of the values, from 1 through to 64,511 except 23,456 are available for use in Internet routing.

As the ASN pool from IANA approaching exhaustion with 2 Byes / 16 Bit, BGP Support for 4 Bytes / 32 Bit Autonomous System (AS) Number Space is introduced. 4 Bytes ASN's are "backwards compatible" and overlap the 2 Bytes ASN's.  IANA refers to the 2 Bytes AS number list as a "sub-registry" of the 4 Bytes list. We will stop here on the 4 Bytes ASN support as this is out of scope for todays discussion. Just wanted to give you a heads up that 4 Bytes ASN are in use already.


Coming back to today's discussion on the BGP private AS numbers range 64512 – 65535. Because they are private, it means they are not globally unique and ISP’s need to strip private-as numbers off BGP updates from the AS_PATH attribute to eBGP peers when announcing routing information across the internet. One way to do that is by using the remove-private-as command.

In our topology, the customer  is using the private as number 65000. We are going to configure the router at the ISP IOU1 so that it does not advertise the customers Private AS number out to the internet. This means that all his prefixes will appear as though they came directly from the ISP AS.





IOU1
interface Loopback1
ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
ip address 10.10.10.1 255.255.255.0
!
router bgp 65000
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 10.10.10.2 remote-as 2222
neighbor 10.10.10.2 soft-reconfiguration inbound


IOU2
interface Loopback2
ip address 2.2.2.2 255.255.255.0
!
interface Ethernet0/0
ip address 10.10.10.2 255.255.255.0
!
interface Ethernet0/1
ip address 20.20.20.1 255.255.255.0
!
router bgp 2222
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 10.10.10.1 remote-as 65000
neighbor 10.10.10.1 soft-reconfiguration inbound
neighbor 20.20.20.2 remote-as 3333
neighbor 20.20.20.2 soft-reconfiguration inbound


IOU3
interface Loopback3
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/1
ip address 20.20.20.2 255.255.255.0
!
router bgp 3333
bgp log-neighbor-changes
network 3.3.3.0 mask 255.255.255.0
neighbor 20.20.20.1 remote-as 2222
neighbor 20.20.20.1 soft-reconfiguration inbound


IOU3
Now the "show ip bgp" command output on IOU3 show that prefix 1.1.1.0/24 has the private AS 65000 in it's AS_PATH  attribute "2222 65000 i"

Now lets apply the command "neighbor 20.20.20.2 remove-private-as" on IOU2 for it's neighbor IOU3. Which will remove the private AS 65000 from the AS_PATH attribute towards IOU3


IOU3

Now the "show ip bgp" command output on IOU3 show that prefix 1.1.1.0/24 has the AS_PATH  attribute as "2222 i" & the private AS 65000 is been removed.






Leave your comment below


No comments:

Post a Comment