How to manage routing for VPC Peering
This page explains how to manage routing for a VPC Peering connector using the Scaleway console. To allow traffic through a peering connector, you must create a custom route in each of the two peered VPCs. Each route's destination must be a subnet containing the IP addresses of the resources in the opposite VPC that need to communicate through the connector.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created a peering connector
How to create a custom route
Each VPC has auto-generated, managed routes to local subnets and Public Gateways, but you can also create your own custom routes.
-
Click VPC in the Network section of the Scaleway console side menu. A list of your VPCs displays.
-
Use the region selector at the top of the page to filter for the region of the VPC where you want to define a custom route, then click the VPC. A list of Private Networks in this VPC displays.
-
Click the Routing tab.
-
Click Create route in the Route table section. The custom route creation wizard displays.
-
Select the IP type (IPv4 or IPv6) of the route's destination.
-
Enter an IP address range for the destination. The VPC will apply the route to all traffic with a matching destination IP. You must enter a CIDR range with a subnet mask, e.g.
192.168.1.0/24. For a single IP address, use the/32mask for IPv4. -
Under Enter next hop, select Peering connector as the next hop type, then select the desired peering connector from the drop-down list. The VPC will route traffic for the destination IP to the peered VPC and all the Private Networks within it.
-
Optionally, under Enter custom route details, enter a route description, and one or more route tags. Tags help you organize your list of routes.
-
Click Create route to finish.
Your new route now displays in the Routing tab of your VPC. A matching custom route must be added to the target VPC for traffic to flow between the peered VPCs. The destination of that return route must be a subnet that contains the IP address(es) of the resources in the origin VPC that need to reach the peered side.
How to create an ingress routing rule
An ingress routing rule allows you to manually define the destination for traffic originating from a peered VPC. Ingress routing rules do not apply to internal traffic from the VPC where you create them.
-
Click VPC in the Network section of the Scaleway console side menu. A list of your VPCs displays.
-
Use the region selector at the top of the page to filter for the region of the VPC where you want to define an ingress routing rule, then click the VPC. A list of Private Networks in this VPC displays.
-
Click the Routing tab.
-
Click Create rule in the Ingress routing rules section. The ingress routing rule creation wizard displays.
-
Select the IP type (IPv4 or IPv6) of the incoming traffic from the peered VPC.
-
Enter the IP address range of the incoming traffic from the peered VPC. You must enter a CIDR range with a subnet mask, e.g.
192.168.1.0/24. For a single IP address, use the/32mask for IPv4. -
Under Enter next hop, select the Private Network that the VPC should route the matching traffic through.
-
Enter the IPv4 address of the resource to route the traffic to via the selected Private Network.
-
Optionally, enter a rule description, and rule tags to help you organize your list of rules.
-
Click Create rule to finish.
Your new ingress routing rule now displays in the Ingress routing rules section of the Routing tab of your VPC.
How to manage an ingress routing rule
-
Click VPC in the Network section of the Scaleway console side menu. A list of your VPCs displays.
-
Use the region selector at the top of the page to filter for the region of the VPC whose ingress routing rule you want to manage, then click the VPC. A list of Private Networks in this VPC displays.
-
Click the Routing tab.
-
Click the edit edit icon icon next to the rule you want to modify in the Ingress routing rules section.
-
Modify the details of the ingress routing rule as necessary, then click Save changes to finish.
The ingress routing rule is updated, and you are returned to the list of your VPC's ingress routing rules.
How to delete an ingress routing rule
-
Click VPC in the Network section of the Scaleway console side menu. A list of your VPCs displays.
-
Use the region selector at the top of the page to filter for the region of the VPC whose ingress routing rule you want to delete, then click the VPC. A list of Private Networks in this VPC displays.
-
Click the Routing tab.
-
Click the delete delete icon icon next to the ingress routing rule you want to delete in the Ingress routing rules section. A pop-up displays asking you to confirm.
-
Click Confirm to proceed.
The ingress routing rule is deleted, and you are returned to the list of your VPC's ingress routing rules.