Wednesday, March 11, 2015

BGP private-as


Some organizations may not be able to meet the qualifications forobtaining their own ASN but still want to receive Internet routing tables from their service provider. In these situations, the service provider may assign the organization a private ASN for peering. Private ASNs should not be advertised by the service provider to other ISPs on the Internet.
The feature remove private autonomous system removes the private autonomous system ofroutes that
are advertised to the configured peer. The router performs the following path analysis with the
remove private autonomous system feature:
Only removes private ASNs on routes advertised to eBGP peers.
  • Ifthe AS_Path for the route only has private ASNs, the private ASNs are removed.
  • Ifthe AS_Path for the route has a private ASN between public ASNs, it is assumed that this is a
          design choice, and the private ASN is not removed.
  • Ifthe AS_Path contains confederations (AS_CONFED_SEQ), BGP removes the private ASNs
          only ifthey are included after the AS_CONFED_SEQ (confederation AS_Path) ofthe path.
The remove private autonomous system feature is configured on IOS routers with the BGP address
family configuration command neighbor ip-address remove-private-as, and IOS XR routers use the
BGP neighbor address family configuration command remove-private-as.


IOS-XR:
route-policy INBOUND_OUTBOUND
  pass
end-policy
!
router bgp 100
 bgp router-id 2.2.2.2
 address-family ipv4 unicast
 !
 neighbor 10.1.12.1
  remote-as 65001
  address-family ipv4 unicast
   route-policy INBOUND_OUTBOUND in
   route-policy INBOUND_OUTBOUND out
  !
 !
 neighbor 10.1.23.3
  remote-as 200
  address-family ipv4 unicast
   route-policy INBOUND_OUTBOUND in
   route-policy INBOUND_OUTBOUND out
RP/0/0/CPU0:ios#show ip bgp
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24         10.1.12.1                0             0 65001 i
*> 11.11.11.0/24      10.1.12.1                0             0 65001 i

Processed 2 prefixes, 2 paths


R2#show ip bgp
BGP table version is 7, local router ID is 10.1.23.3
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
*> 1.1.1.0/24       10.1.23.2                              0 100 65001 i
*> 11.11.11.0/24    10.1.23.2                              0 100 65001 i


IOS-XR và R2 trong miền Internet sẽ có as-private path. Để loại bỏ private as path trong Internet, trên IOS-XR config như sau:

router bgp 100
 bgp router-id 2.2.2.2
 address-family ipv4 unicast
  !
 neighbor 10.1.23.3
  remote-as 200
  address-family ipv4 unicast
  remove-private-AS

R2#show ip bgp
BGP table version is 9, local router ID is 10.1.23.3
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
*> 1.1.1.0/24       10.1.23.2                                  0 100 i
*> 11.11.11.0/24    10.1.23.2                              0 100 i



No comments:

Post a Comment