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.
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.
Features
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.
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
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.
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.
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
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.
Navigate to the Cloud Routers page in the Google Cloud console.
The Cloud Router that you wish to delete has a checkbox next to it.
Press Delete.
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.
Logs
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
Navigate to the Cloud Routers page in the Google Cloud console.
From the list of Cloud Routers, choose one.
Click View in the Logs column.
The format of Cloud Router logs is as follows:
[Event Type]: [Log Text]
Metrics
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.
Conclusion
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: