Cloud Router and BGP in Google Cloud: ASNs, Link-Local Addresses and Session Setup

GCP Study Hub
November 9, 2026

Cloud Router is the Google-managed router that runs BGP for Google Cloud's hybrid connections. HA VPN relies on it to exchange routes dynamically, Cloud Interconnect VLAN attachments peer with it, and Cloud NAT gateways also run on a Cloud Router. For the Professional Cloud Network Engineer exam, the questions about Cloud Router mostly turn on a small set of rules: where a router can live, which ASN it may use, and how the two ends of a BGP session have to be configured so that they mirror each other.

Where a Cloud Router can live

A Cloud Router belongs to one VPC network and one region, and several placement rules follow from that.

  • For HA VPN, create the Cloud Router in the same region and VPC network as the VPN gateway.
  • A Cloud Router can only manage VLAN attachments in its own region. A router in one region with attachments in another region isn't a valid configuration.
  • A Cloud Router must be created in the same project as the VPC network it advertises routes for.

What Cloud Router does in a dynamic routing design

With dynamic routing, the VPN gateway and its tunnels don't run BGP. Cloud Router runs the BGP sessions and decides which prefixes are advertised to the peer, including any custom ranges you add. Each HA VPN tunnel gets its own BGP session, with link-local addresses and ASNs on both sides, and the on-premises device and Google Cloud advertise their prefixes to each other over it. When a new subnet appears on either side, BGP carries it across without manual route edits. That automatic exchange is the reason static routes defeat the purpose of HA VPN.

The sessions run between the Cloud Router and the peer, not to VM instances. VPC firewall rules therefore don't control them, and opening TCP port 179 in a firewall rule is unnecessary. For Cloud VPN, the BGP session runs inside the tunnel, so the tunnel has to come up first. If IKE negotiation between the two ends fails, neither the tunnel nor its BGP session can be established.

Cloud Router writes its BGP events, such as session state changes and route updates, to Cloud Logging under the Cloud Router resource type. Cloud VPN gateway logs are a separate source that covers IKE negotiation and tunnel setup.

Choosing the ASN for a Cloud Router

Every BGP session needs an autonomous system number (ASN) on each side, and the Cloud Router rules differ by connection type. For the Professional Cloud Network Engineer exam, it helps to keep the rule for each connection type separate.

  • Partner Interconnect: any Cloud Router attached to a Partner Interconnect VLAN attachment must use ASN 16550. Google reserves this number so that service providers can set up BGP toward Google consistently across customers. A private ASN is rejected in this case.
  • Dedicated Interconnect and Cloud VPN: a private 2-byte ASN from 64512 through 65534, or a private 4-byte ASN from 4200000000 through 4294967294, is accepted. ASN 16550 is reserved for Partner Interconnect, not Dedicated Interconnect.
  • ASN 15169 is the public number Google uses to peer on the internet. It is never assigned to a customer's Cloud Router.

A Cloud Router has a single ASN that all of its BGP sessions share, so you can't give each session its own Google-side ASN. The on-premises router uses its own, separate ASN. Cloud Router can peer with several on-premises routers that use the same ASN, so a shared on-premises ASN doesn't block a second session. An ASN only identifies each side of the session, so changing it does nothing for throughput. Path preference comes from other settings. Cloud Router sends its advertised route priority to the peer as the MED value, where a lower value wins, and that priority defaults to 100.

Addressing a BGP session with link-local IPs

Cloud Router BGP interfaces use link-local addresses from 169.254.0.0/16, never internal VPC subnet addresses. How the addresses are allocated depends on the connection.

  • Cloud VPN: the two ends of a session take two different addresses from the same /30 block.
  • Cloud Interconnect: Google assigns the Cloud Router and on-premises BGP addresses as a /29 block, and each router uses the address allocated to it.

Cloud Router peers directly over a VLAN attachment, so eBGP multihop isn't used.

The two ends of a session must mirror each other. Each router's BGP IP is the other router's peer IP, and each router's peer ASN is the ASN of the router on the far side. A session needs two distinct endpoints, and each side checks that the far end announces the ASN it expects.

Translating a peer's settings into yours

When a partner sends their BGP settings, those settings describe the session from their point of view, so each value is mirrored before it goes on the Cloud Router. Their local ASN and local address become your peer ASN and peer BGP IP, and the address they list for their peer is the one your Cloud Router interface uses. MD5 authentication is optional on Cloud Router, but it must match on both ends, so a key configured on only one side keeps the session down.

Our Professional Cloud Network Engineer practice exams cover Cloud Router and BGP session setup alongside HA VPN design and Partner Interconnect provisioning, with detailed explanations that drill these distinctions.

Get tips and updates from GCP Study Hub

arrow