This topic describes how to connect a classic network to a VPC. You can set up a ClassicLink connection so that ECS instances of the classic network type can access cloud resources in a VPC through the intranet.
Make sure that you are aware of the limits of ClassicLink. For more information, see ClassicLink overview.
- Log on to the VPC console.
- Select the region of the target VPC, and click the ID of the target VPC.
- On the VPC Details page, click Enable ClassicLink. In the displayed dialog box, click OK.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- Find the target ECS instance of the classic network type, and then choose .
- In the displayed dialog box, select the target VPC and click OK, and then click the security group configuration link.
- Click Add ClassicLink Rules and configure the security rule according to the following information. Then, click
Configuration Description Classic Security Group Display the classic network security group. Select VPC Security Group Select a security group to use. Up to five security groups can be selected. Mode Select one of the following modes:
- Classic <=> VPC: The connected resources can access each other (recommended).
- Classic => VPC: Authorize the classic ECS instance to access cloud resources in the connected VPC.
- VPC => Classic: Authorize the cloud resources in the connected VPC to access the classic ECS instance.
Protocol Type and Port Range Select the protocol and port used for the communication. The port must be in the form of xx/xx. For example, if port 80 is used, enter 80/80. Priority Set the priority for the rule. A smaller number represents a higher priority, for example, 1. Description Enter a description for the security rule.
- Return to the ECS console. On the Instance List page, click the Column Filter icon in the upper-right corner, and then select the
Connection Status check box. Then, click OK.
If Connection Status is Connected, ECS instances of the classic network are connected to the VPC network.