1

I'm using the example shown in the official Google Cloud Routes Documentation page (See this page under "Priority"), as it closely relates to what I'm trying to achieve.

Lets say I have two routes defined as shown below:

NAME                       NETWORK     DEST_RANGE         NEXT_HOP                           PRIORITY 
vpnroute                   default     192.168.0.0/16     [ZONE]/instances/vpninstance          1000 
vpnroute-backup            default     192.168.0.0/16     [ZONE]/instances/vpninstance-backup   2000

In the official docs it states:

Under this configuration, VPN traffic would normally be handled by vpninstance, but would fall back to vpninstance-backup if vpnroute is deleted.

I would like this failover to be automatic. How do I achieve that?

Or in other words : I would like to have Highly Available instances that I'd can use as a nextHop in a routing rule and I'm fine with an Active/Passive model. Whats the easiest way I can achieve this? I like the above solution but it turns out I'd have to manually delete a route when I detect that my primary route's NEXT_HOP is down

My assumption was I could have two routes with differing priorities and the routes would be attempted in the order of priorities if a higher priority route did not work, but I think I might be wrong about that.

1 Answer 1

2

As per the documentation example routes:

   NAME                    NETWORK     DEST_RANGE         NEXT_HOP                           PRIORITY 
vpnroute                   default     192.168.0.0/16     [ZONE]/instances/vpninstance          1000 
vpnroute-backup            default     192.168.0.0/16     [ZONE]/instances/vpninstance-backup   2000

Under this configuration, VPN traffic would normally be handled by vpninstance, but would fall back to vpninstance-backup if vpnroute is deleted.

It suggests if the route "vpnroute" is deleted, not the NEXT_HOP instance. In case of NEXT_HOP instance is stopped or deleted for a route, the route selection mechanism will choose the next available route for the same DEST_RANGE depending upon the priority defined to send the traffic.

In the given documentation example, if NEXT_HOP "vpninstance" instance is deleted, stopped or not communicating, route selection mechanism will choose the next route "vpnroute-backup" with NEXT_HOP defined as "vpninstance-backup". It does not need to delete the route "vpnroute" to make "vpnroute-backup" as an active route.

I was able to test the same.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .