Code360 powered by Coding Ninjas X Code360 powered by Coding Ninjas X
Table of contents
Key Terms
Guidelines for Cloud Router
Dynamic Routing Mode
Configure a Cloud Router
Create Cloud router
Configure a Network Connectivity Package.
Create BGP Sessions
Manage Cloud Routers
Delete and List Routers
Look at Logs and Metrics
Frequently asked questions
What Does Cloud BGP Mean?
Can routers store data?
Describe a cloud VPN.
Why is MD5 used in BGP?
Describe a Cloud NAT.
Last Updated: Mar 27, 2024

Cloud Router

Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM


The Border Gateway Protocol (BGP) is used by Cloud Router, a fully distributed and managed Google Cloud service, to advertise IP address ranges. Based on the BGP ads that it gets from a peer, it creates unique dynamic routes. 

Cloud Router

Each Cloud Router is composed of software jobs that serve as BGP speakers and responders rather than a physical hardware or appliance. The control plane for cloud NAT is also a cloud router.

Key Terms

When learning about the Cloud Router, there are various words you may encounter, and these are some of the key ones.

Border Gateway Protocol (BGP)

The Internet Engineering Task Force (IETF) defined the Border Gateway Protocol (BGP) as an outside gateway routing protocol in RFC 1722. On the internet, BGP automatically communicates reachability and routing information between independent systems. If your device can execute BGP routing, which entails that you can give it a BGP IP address and an autonomous system number, then it is BGP-capable. 


Autonomous System (AS)

A group of linked IP routing prefixes under the management of a single administrative organization or domain, like an internet service provider (ISP), a sizable business, or a university, and which provides a common routing policy to the internet.

Autonomous System Number (ASN)

A number assigned to each autonomously system that makes use of BGP routing.


MD5 Authentication

An approach to authenticating BGP peers that makes use of the MD5 message-digest technique. When employing this strategy, BGP peers must share the same authentication key in order for a connection to be created.


  • On its BGP sessions, a Cloud Router can advertise custom prefixes and subnet routes. A Cloud Router only advertises subnet routes unless you set up bespoke route advertisements. You can also set up a Cloud Router to omit advertising subnet routes by configuring custom route advertisements.
  • Which subnet routes the Cloud Routers in that network broadcast depends on the dynamic routing mode of a VPC network, which might be either regional or global.
  • Each Cloud Router's application of newly learnt prefixes as unique dynamic routes in a VPC network is similarly governed by the dynamic routing mode.
  • You can choose to set up the router's peering sessions to employ MD5 authentication while configuring BGP for Cloud Interconnect, HA VPN, and Router appliance.
Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job

Guidelines for Cloud Router

Guidelines for Cloud Router
  • If the Bidirectional Forwarding Detection (BFD) feature is supported by your on-premises Border Gateway Protocol (BGP) device, turn it on there as well as on the Cloud Router to create a high-availability network link that can react more quickly to link failures.
  • Consider setting MD5 authentication (Demo) on your BGP sessions if your peer router supports it. BGP sessions are by nature unauthenticated.
  • On the BGP device you have on-site, enable graceful restart. As long as the BGP connection is re-established within the graceful restart window, traffic between networks isn't affected in the case of a Cloud Router or on-premises BGP device failure.
  • Your network on-premises can be linked to several Google Cloud projects using dynamic routing.
  • Configure two on-premises BGP devices with one tunnel each if graceful restart is not allowed or enabled on your device to offer redundancy. In the occurrence of a Cloud Router or on-premises BGP device failure, Cloud VPN tunnel traffic may be interrupted if you don't configure two distinct on-premises devices.

Dynamic Routing Mode

Dynamic routing mode

The Virtual Private Cloud (VPC) network or the region where the router is configured, Cloud Router constantly advertises subnets and propagates learned routes.

The dynamic routing mode of a VPC network determines whether Cloud Routers are local or global. The dynamic routing mode can be regional or global when constructing or editing a VPC network.

You can go to the official documentation given by the Google cloud for setting up dynamic routing.

View a VPC network's dynamic routing mode

Change a VPC network's dynamic routing mode

Configure a Cloud Router

Configure a Cloud Router

Learn how to configure Cloud Router so that routes in between Virtual Private Cloud (VPC) network and a peer connection can be exchanged dynamically. The peer network could be a private network that is hosted on-site, a network that is hosted by another cloud service provider, like AWS or Azure, or even a separate VPC system in Google Cloud.

You must carry out the following high-level operations in order to use Cloud Router to link a VPC network with a peer network:

  • Establish a Cloud Router.
  • In Google Cloud, configure a network connectivity package.
  • With a router on the peer network, create Border Gateway Protocol (BGP) connections.

Before you begin

  • Install the most recent version of the Google Cloud CLI or update to it.
  • Decide on a default zone and area.

Take the steps mentioned in the link below, which is provided by  the official documentation.

Create Cloud router

Configure a Network Connectivity Package.

In addition to setting up Cloud Router, you must additionally set up at least one of the following Google Cloud network connection products to exchange routes between a VPC network and a peer network:

  • Dedicated Interconnect
  • Partner Interconnect
  • Cloud VPN, specifically HA VPN
  • Router appliance, part of Network Connectivity Center

Create BGP Sessions

The Border Gateway Protocol (BGP) sessions are created between the Cloud Router and the router on the peer network when you configure a network connectivity product with Cloud Router.

Manage Cloud Routers

Manage Cloud Routers

Delete and List Routers

This section will help you to delete and list the cloud routers from a particular project.

List Routers

Follow these instructions to list every Cloud Router in a project.

  • Navigate to the Cloud Routers page in the Google Cloud console.
  • View a listing of your Cloud Routers on the Cloud Routers page.

Delete Routers

Make sure a router is not already being utilized by other resources, such as a Cloud VPN tunnel or a VLAN attachment, before deleting it. Before you may delete the router, you must first delete the related resource. You are not needed to end BGP connections before erasing the router, though.

Follow these instructions to remove the Cloud Router.

  1. Navigate to the Cloud Routers page in the Google Cloud console.
  2. The Cloud Router that you wish to delete has a checkbox next to it.
  3. Press Delete.

Look at Logs and Metrics

Look at Logs and Metrics

Both logging data and monitoring metrics are sent by Cloud Router to Cloud Logging and Cloud Monitoring, respectively. How to obtain both sorts of information is demonstrated in this section.


Cloud Logging receives logging data from Logs Cloud Router and logs the subsequent events:

  • Router events connected to your Cloud Router.
  • BGP sessions and configuration events.
  • Route activities including route declarations in between two BGP peers.

View Logs

  1. Navigate to the Cloud Routers page in the Google Cloud console.
  2. From the list of Cloud Routers, choose one.
  3. Click View in the Logs column.
  4. The format of Cloud Router logs is as follows:

[Event Type]: [Log Text]


Metrics are published to Cloud Monitoring using the Metric Cloud Router. Each and every Cloud Router measure includes IPv4 and IPv6 traffic.

These steps will let you create a custom dashboard in cloud monitoring to analyse the metrics.

  • Navigate to the Monitoring page in the Google Cloud console.
  • On the Dashboards Overview page, click addCreate dashboard after choosing Dashboards.
  • Update the dashboard title, if necessary, with a term that is representative of your dashboard.
  • Choose the chart you wish to add from the Chart collection. For instance, click or drag a Line chart entry from the Chart library to the graph area to add it to the dashboard.
  • Change the chart's title in Chart Title or choose one of the suggested titles.
  • What data do you want to view? do the following:
    • Enter Cloud Router in the Type to filter form under Resource type by clicking it.
    • Add a Cloud Router metric to Metric.
  • To limit the view to only a few routers or sessions, use the Filter controls.
  • Click Add another metric to add a different metric.

Frequently asked questions

What Does Cloud BGP Mean?

To interchange routes across your Virtual Private Cloud (VPC) network and your on-premises network, Cloud Router employs the Border Gateway Protocol (BGP). You set up a connection and a BGP peer for your on-premises router on Cloud Router. A BGP session is created by the configuration of the connection and BGP peers.

Can routers store data?

Processing speed and memory of a router are constrained. The majority of routers lack sufficient onboard memory and long-term storage capacity. You therefore have limited possibility of regaining most of the online history data on your network unless the router stores data on a connected device or cloud server.

Describe a cloud VPN.

Through an IPsec VPN connection, Cloud VPN safely joins your peer network to your Virtual Private Cloud (VPC) network.

Why is MD5 used in BGP?

A configuration option for BGP peers is the MD5 algorithm, which supports routing authentication.

Describe a Cloud NAT.

A shared, software-defined managed service is cloud NAT. It doesn't rely on appliances or virtual machines acting as proxy servers.


This article taught us about Cloud Router. Additionally, we learnt the requirements for running the cloud router, the rules to go by when using the cloud router, and how to establish dynamic routing. also how to view stats and logs.

To learn more about the GCP please refer to the following articles:

Cloud Audit logs in GCP

Introduction to AI Platform in GCP

Manage self-serve account in GCP

To learn more about DSA, competitive coding and many more knowledgeable topics, please look into the guided paths on Coding Ninjas Studio. Also, you can enroll in our courses and check out the mock test and problems available to you. Please check out our interview experiences and interview bundle for placement preparations.

thank you


Please upvote our blog to help other ninjas grow.

Happy Learning

Live masterclass