First understand what is an Autonomous System?
An Autonomous System (AS) is a large network or group of networks managed by a single administrative entity. Think of the internet not as one single network, but as a “network of networks.” These individual large networks are Autonomous Systems.
Examples of entities that operate an AS include:
- Internet Service Providers (ISPs) like AT&T or Comcast.
- Large technology companies like Google, Microsoft, or Amazon.
- Universities or government agencies.
What is an Autonomous System Number (ASN)?
An ASN is a unique, globally assigned number that identifies an Autonomous System. Its primary purpose is to facilitate routing between these large networks using the Border Gateway Protocol (BGP).
When data needs to travel across the internet from one network to another, BGP routers look at the path of ASNs to determine the most efficient route for the data to take. The ASN essentially acts as a top-level address for a large-scale network on the public internet.
ASNs come in two main types:
- Public ASNs: For systems that will exchange traffic on the public internet.
- Private ASNs: For internal use, much like private IP addresses (e.g., 192.168.x.x).
ASN in Google Cloud
To understand GCP networking better, it’s important to understand how ASNs are directly used when you build enterprise-grade network connections to Google Cloud.
- Google’s Own ASN: Google operates its own massive global network under ASNs like AS15169 (for general Google services) and AS396982 (for Google Cloud Platform).
- Cloud Router: When you connect your on-premises data center to your Google Virtual Private Cloud (VPC) using Cloud Interconnect or HA VPN, you must set up a Cloud Router. This process involves establishing a BGP session between your network and Google’s network. In this setup:
- You specify the ASN of your on-premises network (the “peer” ASN).
- You must also assign an ASN for the Google side of the connection to identify it within the BGP session.
The specific ASN you use for the Google side depends on the type of connection:
- For Dedicated Interconnect or HA VPN, you must provide a private ASN for the Google side. This can be any number from the private ranges (e.g., 64512 to 65534 or 4200000000 to 4294967294) that is not already in use by your on-premises network.
- For Partner Interconnect, you are required to use Google’s specific ASN for this service: 16550.
In summary, an ASN is a fundamental identifier for a large network on the internet, and you interact with it directly in GCP when setting up advanced hybrid cloud networking.