tencent cloud

Feedback

Building Up an IPv4 VPC

Last updated: 2022-05-06 11:35:30

    This tutorial describes how to quickly build up a Virtual Private Cloud (VPC) with IPv4 CIDR blocks.

    Overview

    This document guides through whole process of setting up an IPv4-based VPC.

    Prerequisites

    Make sure you’ve signed up for a Tencent Cloud account and completed identity verification if you need to purchase resources in the Chinese mainland.

    Directions

    Step 1: create a VPC and subnet

    Note:

    After creating a VPC and subnet, you cannot modify their CIDR blocks. Therefore, complete network planning in advance.

    1. Log in to the VPC console.
    2. Select the region of the VPC at the top and click +New.
    3. In the Create VPC pop-up window, configure the VPC and subnet information as instructed below.
    • VPC information
      • Name: the name of the VPC.
      • IPV4 CIDR Block: you can choose any one of the IP ranges as the VPC IP range, such as 10.0.0.0/16.
        • 10.0.0.0 - 10.255.255.255(The mask range must be 12 to 28)
        • 172.16.0.0 - 172.31.255.255(The mask range must be 12 to 28)
        • 192.168.0.0 - 192.168.255.255 (The mask range must be 16 to 28)
      • Advanced Options: you can optionally add tags to help you better manage resource permissions of sub-users and collaborators.
    • Subnet information
      • IPv4 CIDR Block:
        • you can choose an IP range within or the same as the VPC IP range. For example, if the VPC IP range is 10.0.0.0/16, you can choose an IP range between 10.0.0.0/16 and 10.0.255.255/28 as the subnet IP range.
        • If the VPC in which subnets are located needs to communicate with other VPCs or IDCs, make sure that the subnet IP range does not overlap with the peer IP range. Otherwise, the interconnection through a private network may fail.
      • Availability Zone: select an availability zone in which the subnet resides. A VPC allows subnets in different availability zones, and these subnets can communicate with each other via a private network by default.
      • Advanced Options: you can optionally add tags to help you better manage resource permissions of sub-users and collaborators.

    Step 2: purchase a CVM instance

    1. Log in to the CVM console to create a CVM instance in the VPC created in the previous step.
    2. Click Create in the top-left corner of the list page to access the CVM purchase page.
    3. On the custom configuration page, configure the CVM instance and then click Buy Now. The CVM network configurations are as follows:
    • Network: select the created VPC and subnet.
    • Public network bandwidth: do not check .
    • Security Group: select Create security group and configure it as instructed in Configuring Security Groups.

    Step 3: apply for an EIP and bind it to the CVM instance

    Elastic IP (EIP) is a public IP address that can be applied for and purchased independently. You can bind it to a CVM instance to enable public network access.

    1. Log in to the EIP console.
    2. On the EIP page, select the region where the CVM is located. Click Apply in the top-left corner.
    3. In the Apply for EIP window, configure relevant parameters and click OK.
    4. On the EIP page, locate the EIP you applied for, and click More > Bind under its Operation column.
    5. In the Bind resources window, select CVM Instances as the resource type to be bound, select the CVM instance, and click OK.
    6. In the pop-up confirmation window, click OK.

    Step 4: test public network connectivity

    Complete the following operations to test the public network connectivity of the CVM instance.

    Note:

    Before performing the test, make sure that the security group allows access to the corresponding IP address and port. For example, the ICMP protocol is opened, and the server can be pinged over the public network. For more information, see Viewing a Security Group Rule](https://intl.cloud.tencent.com/document/product/215/35514).

    1. Log in to the CVM instance with an EIP bound. For detailed directions, see Login and Remote Access.
    2. Run the ping <public ip="" address=""> command, such as ping www.qq.com to test public network connectivity.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support