System-generated routes and custom routes are two types of routing configurations available in Google Cloud Platform (GCP) Virtual Private Cloud (VPC) networking. Understanding the differences between these two types is important for effectively managing and controlling network traffic within a GCP environment.
System-generated routes are automatically created by GCP based on the network configuration and the presence of specific resources within the VPC network. These routes are designed to facilitate communication between different resources within the network and to provide connectivity to the broader internet. System-generated routes include default routes, subnet routes, and dynamic routes.
1. Default routes: These routes are automatically created when a VPC network is created. They act as a catch-all route for traffic that does not match any other specific routes in the network. Default routes direct traffic to the internet gateway, allowing resources within the VPC network to access the internet.
2. Subnet routes: Each subnet within a VPC network is associated with a subnet route. These routes are automatically created and allow traffic to flow between subnets within the same VPC network. Subnet routes are used for internal communication between resources within the VPC network.
3. Dynamic routes: Dynamic routes are created when specific resources, such as Cloud VPN tunnels or Cloud Interconnect attachments, are configured within the VPC network. These routes enable traffic to be directed to and from these resources. Dynamic routes are typically used for connecting on-premises networks to the VPC network or for establishing connectivity with other Google Cloud services.
On the other hand, custom routes are manually created by the user to override the default routing behavior or to direct traffic in a specific way. Custom routes provide more granular control over network traffic and allow for complex routing scenarios. Unlike system-generated routes, custom routes are not automatically created and must be defined by the user.
Custom routes can be used to implement advanced routing policies, such as traffic diversion, network segmentation, or traffic engineering. These routes can be configured to direct traffic to specific destinations, including on-premises networks, other VPC networks, or even specific instances within the VPC network. Custom routes can also prioritize traffic based on specific criteria, such as source IP address, protocol, or port number.
To illustrate the differences between system-generated routes and custom routes, consider the following scenario. Let's say we have a VPC network with multiple subnets and we want to establish a VPN connection to an on-premises network. In this case, the system-generated routes will automatically create the necessary routes to enable communication between the VPC network and the on-premises network. These routes will be dynamically created based on the VPN configuration.
However, if we want to implement a specific routing policy, such as routing traffic from a specific subnet through a firewall instance before reaching the internet, we would need to create a custom route. This custom route would override the default routing behavior and direct traffic from the subnet to the firewall instance before forwarding it to the internet gateway.
System-generated routes are automatically created by GCP based on the network configuration and the presence of specific resources. They provide basic connectivity within the VPC network and to the internet. On the other hand, custom routes are manually created by the user to override default routing behavior and provide more granular control over network traffic.
Other recent questions and answers regarding Examination review:
- Can you explain a scenario where static routes are used to establish connectivity between two VPCs in different regions in GCP?
- How does static routing work in GCP and what are its limitations?
- What are the components of a route in GCP and how do they determine the path of network traffic?
- What is the purpose of software-defined routing in Google Cloud Platform (GCP) networking?
More questions and answers:
- Field: Cloud Computing
- Programme: EITC/CL/GCP Google Cloud Platform (go to the certification programme)
- Lesson: GCP networking (go to related lesson)
- Topic: Routing (go to related topic)
- Examination review

