Updated on 2024-11-08 GMT+08:00

Overview

Background

If an ECS has multiple network interfaces, the primary network interface can communicate with external networks by default, but the extended network interfaces cannot. To enable extended network interfaces to communicate with external works, you need to configure policy-based routes for these network interfaces.

Scenarios

This example describes how to configure policy-based routes for an ECS with two network interfaces. Figure 1 shows the networking. The details are as follows:
  • The primary and extended network interfaces on the source ECS are in different subnets of the same VPC.
  • The source and destination ECSs are in different subnets of the same VPC and the two ECSs can communicate with each other through primary network interfaces without configuring policy-based routes.
  • After policy-based routes are configured for the two network interfaces of the source ECS, both the primary and extended network interfaces can communicate with the destination ECS.

You can select a destination IP address based on service requirements. Before configuring policy-based routes, ensure that the source ECS can use its primary network interface to communicate with the destination ECS.

Figure 1 Networking of an ECS with two network interfaces