As was stated earlier in this chapter, BGP provides NLRI connectivity between different routing domains (autonomous systems) or within the same routing domain. Therefore, when BGP is enabled, the BGP speaker must be configured with an autonomous number using the router bgp [autonomous system number] global configuration command.
While EIGRP also uses autonomous system numbers, there are some significant differences in the use of autonomous system numbers when implementing EIGRP and when implementing BGP. With EIGRP, routers establish a neighbor relationship only if they are part of the same autonomous system; although you should keep in mind that this is in addition to other EIGRP requirements, such as being on the same subnet, etc. With BGP however, the peer relationship can be established between two BGP speakers in different autonomous systems, which is referred to as an external BGP (eBGP) relationship, or between BGP speakers within the same autonomous system, which is referred to as an internal (iBGP) relationship.
NOTE: Both iBGP and eBGP similarities and differences are described later in this chapter.
Another significant difference between EIGRP AS numbers and those used by the BGP is that BGP uses both public and private AS numbers. The configuration AS range for BGP is 65, 535, which is the same as that used by EIGRP; however, with BGP, the top 1024 AS numbers, i.e. autonomous system numbers 64,512 through 65,535 are considered private autonomous system numbers and cannot be used on the Internet. Private autonomous system numbers are used to conserve globally unique AS numbers in the same way that RFC 1918 address space is used to conserve publically routed global IPv4 address space.
Autonomous system numbers 1 through 64,511 are considered public AS numbers which can be used on the Internet. While any organization can use private AS numbers within their enterprise network, public AS numbers must be obtained from a regional registry. The allocated AS numbers cannot be used by any other organization. Public AS numbers are assigned in blocks by the Internet Assigned Numbers Authority (IANA) to Regional Internet Registries (RIRs). The appropriate RIR then assigns AS numbers to entities within its designated area from the block assigned by the IANA. Entities wishing to receive an ASN must complete the application process of their local RIR and be approved before being assigned an ASN. There are five Regional Internet Registries, which are:
- Latin American and Caribbean Internet Addresses Registry (LACNIC) – www.lacnic.net
- African Network Information Centre (AfriNIC) – www.afrinic.net
- Réseaux IP Européens Network Coordination Centre (RIPE NCC) – www.ripe.net
- American Registry for Internet Numbers (ARIN) – www.arin.net
- Asia-Pacific Network Information Centre (APNIC) – www.apnic.net
NOTE: AfriNIC is for Africa, while ARIN serves Canada, several parts of the Caribbean region, and the United States. APNIC serves Asia, Australia, and neighboring countries. LACNIC serves Latin America and parts of the Caribbean region and the RIPE NCC serves Europe, the Middle East, and Central Asia.
It is important to understand that an organization which does not have a publically assigned AS number can still use BGP to connect to an upstream provider, and then to the Internet. In such cases, the ISP or Service Provider BGP speaker simply removes the private AS number when it propagates network information to the Internet. This concept is illustrated below in Figure 6-1:
Fig. 6-1. Removing Private AS Numbers
Referencing the network topology that is illustrated in Figure 6-1, Provider X is connected to an enterprise network belonging to Enterprise X. Enterprise X does not have a publically assigned autonomous system number and is therefore using private AS number 65,530. Enterprise X is advertising the 150.254.0.0/24 subnet via eBGP to Provider X. Before propagating this prefix to upstream providers, the edge router belonging to Provider X that has the eBGP peering with the edge router belonging to Provider Y removes the private AS number used by Enterprise X. From the perspectives or Provider Y, Provider Z, and Enterprise Z, the 150.254.0.0/24 prefix that is originated by Enterprise X appears to originate in AS 1234, which is the AS of Provider X.
Now that we have a solid understanding of BGP AS numbers, the following section describes the different ways an enterprise can connect to an Internet Service Provider and the AS numbers used in the different implementations and BGP deployments when connecting.
