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 network through the intranet.

Prerequisites

Make sure that you are aware of the limitations of ClassicLink. For more information, see ClassicLink overview.

Procedure

  1. Log on to the VPC console.
  2. Select the region of the target VPC, and click the ID of the target VPC.
  3. On the VPC Details page, click Enable ClassicLink. In the displayed dialog box, click OK.
  4. Log on to the ECS console.
  5. In the left-side navigation pane, click Instances.
  6. Choose More > Network and Security Group > Connect to VPC.
  7. In the displayed dialog box, select the target VPC and click OK. Then click the security group configuration link.


  8. Click Add ClassicLink Rules and configure the security rule according to the following information. Then, click OK.
    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.
  9. Return to ECS console. On the Instance List page, click the Column Filter icon on 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.