This topic describes how to use ClassicLink to connect a classic network to a Cloud Storage Gateway (CSG) instance.
Background information
Cloud Storage Gateway (CSG) is a storage service that seamlessly connects your on-premises applications, infrastructure, and data to Alibaba Cloud. By deploying virtual devices that are compliant with industry-standard storage protocols in your data center or on Alibaba Cloud, you can connect your existing storage applications and workloads to Alibaba Cloud's storage and computing services.
CSG automatically deploys gateways, provisions resources, and connects to Elastic Compute Service (ECS) instances within a VPC. However, many legacy ECS instances still operate in a classic network and cannot directly connect to CSG. Use ClassicLink to resolve this issue. ClassicLink allows an ECS instance in a classic network to communicate privately with resources, such as CSG, in a VPC.
Configure the VPC and CSG
- Configure a VPC.
- Log on to the VPC console.
- Create a VPC. For more information, see Create a VPC.
We recommend creating a VPC that uses the 172.16.0.0/12 CIDR block to simplify the configuration. If you already have a usable VPC, you can skip this step.
- Find and click the target VPC, and then click Enable ClassicLink.
- Create a CSG instance.
- Log on to the Cloud Storage Gateway console.
- Create a CSG instance.
When you create the CSG instance, select the VPC that you created in Step 1.
- To create a cloud-based file gateway, see Manage file gateways.
- To create a cloud-based block gateway, see Create a block gateway.
Configure the classic network ECS instance
- Log on to the ECS console.
- Select the region where the target ECS instance is located.
- On the Instances page, find the target ECS instance, and choose .
- In the dialog box, select the target VPC, click OK, and then click Go to the instance security group list and add ClassicLink rules.
- Click Add ClassicLink Rule. Configure the ClassicLink rule based on the following parameters, and then click OK.
Parameter Description Classic-network Security Group The name of the classic network security group. Select VPC security group Select the security group to which the CSG instance belongs. Authorization Type Select an authorization mode. - (Recommended) Classic <=> VPC: Allows resources in the classic network and the VPC to access each other.
- Classic => VPC: Allows the ECS instance in the classic network to access resources in the VPC.
- Classic <= VPC: Allows resources in the VPC to access the ECS instance in the classic network.
Protocol type Select a protocol for communication, such as Custom TCP. Port range The port range in start_port/end_portformat. For example, to grant access to port 80, enter80/80.The required ports vary based on the protocol. Configure the ports based on your business requirements.- HTTPS: 443
- NFS: 111 (TCP, UDP), 875 (TCP, UDP), 892 (TCP, UDP), 2049 (TCP, UDP), 32888 (TCP, UDP), 32889 (TCP, UDP)
- SMB: 137 (UDP), 138 (UDP), 139 (TCP), 389 (TCP), 445 (TCP, UDP), 901 (TCP)
- iSCSI: 860 (TCP), 3260 (TCP)
Priority Set the priority for the rule. A smaller value indicates a higher priority. For example: 1. Description Enter a description for the ClassicLink rule. - Return to the Instances page to check the connection status.
If the Connection Status is Connected, the ECS instance in the classic network is connected to the VPC.
Use the CSG instance
- File gateway
- For Linux clients, see Access an NFS share.
- For Windows clients, see Access an SMB share.
- Block gateway
- For Linux clients, see Use volumes on a Linux system.
- For Windows clients, see Use volumes on a Windows system.