Route tables

General information

Route tables contain a set of rules (routes), which are used to direct network traffic.

Each subnet in a VPC is associated with a route table. If necessary, you can associate a subnet with an arbitrary route table; subnets without an explicit association will be automatically associated with the main route table.

Glossary

Route table – a route table you create for your VPC.

Main route table – a route table that is automatically added when you create a VPC. It controls the routing for all VPC subnets, which are not explicitly associated with a route table.

Route propagation – the propagation of learned routes. If this feature is enabled, your VPN connection routes will be dynamically included in the specified routing table.

Route – a route table entry containing information about where to direct traffic for IP addresses from the specified network.

Network – a range of IP addresses in CIDR notation for which you want to add a routing rule.

Gateway – a standard Internet gateway, VPN connection, instance or network interface where traffic should be sent according to the current rule.

Route selection algorithm

The cloud uses the most accurate (priority) route for the network traffic, in accordance with the generally accepted rules for choosing the best route:

  • static routes have higher priority than dynamic ones;

  • the route with the longest subnet prefix will get higher priority if several routes are suitable for the packet;

  • if a suitable route for the packet is not found in the route table associated with the subnet, then the route lookup is now stopped and the packet is discarded.

Creating/deleting a route table

To create a new route table, click Create.

You can delete a route table if it is not the main table and is not associated with any subnet. Select the route table and click Delete.

Associating/dissociating a route table

To associate a subnet with an arbitrary route table, select the table and click Associate with subnets.

A subnet can only be associated with one route table at a time, but you can associate one route table with multiple subnets.

To dissociate a subnet from one or more route tables, click Dissociate.

Important

These operations will change traffic routing in the selected subnets according to the specified or main route table rules.

Setting a route table as main

CROC Cloud allows using multiple route tables, but you can specify only one main table. To make the selected route table main, click Set table as main.

The main route table can be re-associated, but in this case, all implicitly associated subnets will refer to this table. You can explicitly associate a subnet with the main route table, even if it is already implicitly associated.

Adding/deleting routing rules

Go to the Routes tab on the route table page to get information about routing rules.

Each rule has a set of parameters:

  • Network – the range of IP addresses in CIDR notation where data is sent.

  • Gateway type – a standard Internet gateway, VPN connection, instance or network interface where traffic for the specified network should be sent.

  • Instance – ID of the instance this rule is related to.

  • State – information about the route state:

    • active – the route is active and used;

    • blackhole – a state in which traffic will be lost (for example, when a route goes through a VPN connection or instance’s network interface, which was deleted).

To add a routing rule for a specified network, click Add and set the required parameters.

To delete the routing rule you created, click Delete.