This topic describes how to use Cloud Enterprise Network (CEN) to mount a file system across virtual private clouds (VPCs) in the same region.
Prerequisites
- A file system is created. For more information, see Create a file system.
- A mount target is created. For more information, see Create a mount target.
Background information
By default, a file system can be mounted on an Elastic Compute Service (ECS) instance only if the instance and mount target reside in the same VPC. If the mount target and the ECS instance reside in different VPCs, you can use CEN to establish a connection between the VPCs. You can then implement a cross-VPC mount for the file system.
Network instance | CIDR block | Region | IP address of ECS instance |
---|---|---|---|
VPC1 |
| China (Guangzhou) | 192.168.0.239 |
VPC2 |
| China (Guangzhou) | 10.0.0.97 |

Step 1: Create a CEN instance
- Log on to the CEN console.
- On the Instances page, click the ID of the CEN instance that you want to manage.
- In the Create CEN Instance dialog box, configure the following parameters and click OK.
- Name: Enter a name for the CEN instance.
- Description: Enter a description for the CEN instance.
The description must be 2 to 256 characters in length, and cannot start with
http://
orhttps://
. You can leave this parameter empty.
Step 2: Connect the VPCs to the transit router
Connect the VPCs to the transit router in the China (Guangzhou) region. Then, the VPCs automatically learn routes from each other to establish network communication.
- On the Instances page, click the ID of the CEN instance that you want to manage.
- On the Basic Settings tab, click
in the VPC section.
- On the Connection with Peer Network Instance page, set the following parameters and click OK.
- Network Type: Select VPC.
- Region: Select the region where the network instance is deployed. In this example, China (Guangzhou) is selected.
- Transit Router: The system automatically creates a transit router in the selected region.
- Resource Owner ID: Select the Alibaba Cloud account to which the network instance belongs. In this example, Your Account is selected.
- Networks: Select the ID of the network instance. In this example, VPC 1 is selected.
- Repeat Step 3 to connect VPC 2 to the transit router in the China (Guangzhou) region. After both VPCs are connected to the transit router, they can automatically learn routes from each other, as shown in the following figure. You can manage the routes of the VPCs in the VPC console. For more information, see Create and manage a route table.
Figure 1. Routes learned by VPC 1 Figure 2. Routes learned by VPC 2
Step 3: Test network connectivity
After VPC1 and VPC2 are connected to the transit router, they can communicate with each other. In the following example, VPC1 is used to test the network connectivity between VPC1 and VPC2.
- Log on to the ECS instance that is deployed in VPC1. For more information, see Connection methods.
- On the ECS instance, run the ping command to test the network connectivity between VPC1 and VPC2. Note In this example, VPC1 runs the Alibaba Cloud Linux operating system. For more information about how to use the ping command in another operating system, see the manual of the operating system that you use.
ping <The IP address of the ECS instance in VPC2>
The following echo reply packet indicates that VPC1 and VPC2 are connected.
Step 4: Mount the file system
After you complete the preceding configurations, mount the file system on an ECS instance across VPCs.
- For more information about how to mount an NFS file system on a Linux ECS instance, see Mount an NFS file system on a Linux ECS instance.
- For more information about how to mount an SMB file system on a Windows ECS instance, see Mount an SMB file system on a Windows ECS instance.