Static routes (original) (raw)

Skip to main content

This page provides an overview of how static routes work in Google Cloud.

For a general overview of routes in Google Cloud, see theRoutes overview.

Considerations for creating static routes

You can create static routes in one of two ways:

You can exchange static routes with a peered VPC network as described in Options for exchanging custom static routes in the VPC Network Peering documentation.

Route parameters

Static routes support the following attributes:

Next hops and features

The following table summarizes static route feature support by next hop type:

Next hop type IPv4 IPv6 ECMP1
**Next hop gateway (next-hop-gateway)**Specify a default internet gateway to define a path to external IP addresses.
Next hop instance by name and zone (next-hop-instance) Send packets to a next hop VM that is identified by name and zone and is in the same project as the route. For more information, seeConsiderations for next hop instances.
**Next hop instance by address (next-hop-address)**Send packets to a next hop VM that is identified by the primary internal IPv4 address, or an internal or external IPv6 address, of its network interface. For more information, see Considerations for next hop instances.
Next hop internal passthrough Network Load Balancer by forwarding rule name (next-hop-ilb) and region (next-hop-ilb-region) Send packets to backends of an internal passthrough Network Load Balancer that is identified by the forwarding rule's name, region, and, optionally, project. For more information, see Considerations for internal passthrough Network Load Balancer next hops.
Next hop internal passthrough Network Load Balancer by address (next-hop-ilb) Send packets to backends of an internal passthrough Network Load Balancer that is identified by the IP address of the load balancer's forwarding rule. For more information, seeConsiderations for internal passthrough Network Load Balancer next hops. 2
Next hop Classic VPN tunnel (next-hop-vpn-tunnel) Send packets to a next hop Classic VPN tunnel by using eitherpolicy-based routing or route-based VPN. For more information, seeConsiderations for Classic VPN tunnel next hops.

1Equal-cost multipath (ECMP) means that two or more static routes can share the same destination range and priority. Although you can create two or more static routes in a VPC network with the same destination, same priority, and default internet gateway next hop, the effect is the same as having a single static route that uses the default internet gateway next hop for that destination and priority.

2IPv6 support depends on theNext hop project and network.

Next hop project and network

A static route next hop is associated with both a VPC network and a project:

Next hop type Can be in a peered VPC network Can be in a different VPC spoke of a NCC hub Can be in a Shared VPC service project
Next hop gateway (next-hop-gateway)
Next hop instance by name (next-hop-instance)
Next hop instance by address (next-hop-address)
Next hop internal passthrough Network Load Balancer by forwarding rule name and region (next-hop-ilb)
Next hop internal passthrough Network Load Balancer by forwarding rule resource link (next-hop-ilb)
Next hop internal passthrough Network Load Balancer by address (next-hop-ilb) IPv4 only
Next hop Classic VPN tunnel (next-hop-vpn-tunnel)

Considerations common to instance and internal passthrough Network Load Balancer next hops

Instance-based routing refers to a static route with a next hop that is a VM instance (next-hop-instance or next-hop-address).

Internal passthrough Network Load Balancer as a next hop refers to a static route with a next hop that is an internal passthrough Network Load Balancer (next-hop-ilb).

When you configure instance-based routing or an internal passthrough Network Load Balancer as a next hop, consider the following guidelines:

Considerations for next hop instances

Considerations for internal passthrough Network Load Balancer next hops

Considerations for Classic VPN tunnel next hops

Considerations for NCC

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-06-15 UTC.