Cloud subnet announcements and communication with VPC
To announce virtual network IP prefixes in a Routing Instance, you need to know the following:
- The ID (
vpc_net_id) of the virtual network containing the prefixes that need to be announced. - List of announced IPv4 prefixes of virtual network subnets and their allocation across availability zones. Typically, prefixes refer to the subnets configured in your cloud. In which case the announced prefixes and the actual subnet address ranges will match.
Note
Please keep in mind that the first IP address (default gateway) and the second IP address (default DNS server) in each subnet will not be available outside the cloud, regardless of the subnet announcement. Network traffic to these IP addresses can only be delivered from within a Yandex Cloud VM.
New subnets that will be created in the virtual network later will not be automatically announced to the RI.
To add a new subnet to an existing RI, use one of the available methods.
Warning
If your routing instance is connected to a virtual network that uses a Network Load Balancer and an Application Load Balancer, their listener addresses are announced as /32 IPv4 prefixes, regardless of the announced IP prefix ranges for subnets within that network.
This enables you to use load balancers to distribute traffic coming from your infrastructure via Cloud Interconnect across cloud resources in different Yandex Cloud availability zones.
Yandex Cloud does not allow disabling announcements of these /32 prefixes. Technically, you can use filtering policies on the customer endpoint to disable these prefixes. Keep in mind that filtering can prevent access to load balancer targets in different availability zones or lead to uneven traffic distribution between them. We do not recommend using this method.
Note
The IP prefix will only be announced in the client's direction if at least one VM with an IP address matching the announced prefix is created in the VPC. If no such VM is created, no route announcement will go in the client's direction, and IP connectivity with the client will not be established.
Your equipment announces IPv4 prefixes from your infrastructure over BGP towards the Yandex Cloud equipment. You can use the following types of prefixes in the announcements:
- Private IP subnets from RFC-1918
. - Default route:
0.0.0.0/0. - Public IP subnets.
Yandex Cloud equipment uses route redistribution to send these prefixes to VPC subnets.
As soon as the Yandex Cloud equipment gets the client prefixes, they become available to all VMs and internal load balancers within the VPC subnets.
No changes to the VM route tables are required to ensure IP connectivity between cloud resources and your infrastructure resources.