This topic describes how to use flow logs to query traffic between VPCs that are attached to the same Cloud Enterprise Network (CEN) instance in the same region. You can analyze the traffic information to adjust your services or troubleshoot issues.
Prerequisites
- VPC 1 and VPC 2 are deployed in the China (Hangzhou) region. For more information, see Create and manage a VPC.
- Two vSwitches are created in Zone H for VPC 1 and another two vSwitches in Zone I for VPC 2. For more information, see Create and manage a vSwitch.
- ECS instances are created in the four vSwitches and applications are deployed on the ECS instances. For more information, see Create an instance by using the wizard.
- Log Service is activated on the Log Service product page. You are charged for using Log Service. For more information, see Overview.
Scenarios
The following scenario is used as an example. VPC 1 and VPC 2 are created in the China (Hangzhou) region. You want to query traffic between the VPCs. You can use an Enterprise Edition transit router to connect VPC 1 to VPC 2. Then you can query traffic between the VPCs by using flow logs.
This example describes how to view the flow logs generated when VPC 1 accesses VPC 2.

Procedure

Step 1: Create a CEN instance
In this example, network instances that belong to the same Alibaba Cloud account and the same region are attached to the same CEN instance. Step 1: Create a CEN instance and Step 2: Attach network instances to the same CEN instance are performed in the new CEN console.
- Log on to the CEN console.
- On the Instances page, click Create CEN Instance.
- In the Create CEN Instance dialog box, set the following parameters and click OK to create a CEN instance.
- Name: Enter a name for the CEN instance.
- Description: Enter a description for the CEN instance.
Step 2: Attach network instances to the same CEN instance
Attach the network instances to be connected to the same CEN instance. After you attach network instances to the same CEN instance, the CEN instance automatically learns routes from the network instances. Then, the network instances can communicate with each other.