Basic Concepts
The Virtual Private Cloud (VPC) service allows you to plan networks as required for the services you plan to deploy. A default VPC and subnet are created in each region. You can plan your networks based on service scenarios and plan for future service changes. By default, different VPCs are isolated from each other, but you can use VPC peering connections to connect VPCs in the same region.

A subnet is a unique CIDR block with a range of IP addresses in a VPC. You can deploy cloud servers with different functions in different subnets.
All cloud resources (such as servers, containers, and databases) in a VPC must be deployed in subnets. A subnet provides IP address management and DNS resolution functions for the resources deployed in it.
All subnets in the same VPC can communicate with each other by default. Learn More

A route table contains a set of routes that are used to control the traffic in and out of your subnets in a VPC. A default route table automatically comes with a VPC. Subnets in the VPC are automatically associated with the default route table. You can create a custom route table and associate subnets in the VPC with the custom route table. Then, the default route table controls inbound traffic of the subnets, and the custom route table controls outbound traffic of the subnets.
You can add, modify, and delete routes in both default and custom route tables. The next hop type of a route can be an ECS, an extension NIC, a NAT gateway, a VPC peering connection, or a virtual IP address. Learn More

A security group is a collection of access control rules for instances, such as cloud servers, containers, and databases, that have the same security requirements and that are mutually trusted within a VPC. You can define different access control rules for a security group, and these rules are then applied to all the instances added to this security group. Learn More
- Security group Sg-A has a custom inbound rule to allow ICMP traffic to ECS-A from your PC over all ports. However, the security group does not have rules that allow SSH traffic to ECS-A so you cannot remotely log in to ECS-A from your PC.
- If ECS-A needs to access the Internet through an EIP, the outbound rule of Sg-A must allow all traffic from ECS-A to the Internet.
- Inbound rules control incoming traffic to instances in the default security group. The instances can communicate with each other but cannot be accessed from external networks.
- Outbound rules allow all traffic from the instances in the default security group to external networks.
If the default security group does not meet your requirements, you can modify security group rules or create a custom group.

A network ACL is an optional layer of security for your subnets. After you add inbound and outbound rules to a network ACL and associate subnets with it, you can control traffic in and out of the subnets.
A network ACL is different from a security group. A security group protects the instances in it, such as ECSs, databases, and containers, while a network ACL protects the entire subnet. Security groups are a mandatory layer of protection but network ACLs are optional. Network ACLs and security groups can be used together for fine-grained access control. Learn More
- Inbound and outbound rules on Fw-A:
Custom inbound rule A01 allows any IP address to access the ECSs in Subnet-X01 through port 80 over TCP or HTTP. If the traffic does not match custom rule A01, the default rule is applied and the traffic is denied to flow into the subnet.
Stateful network ACLs allow responses to inbound requests to leave the subnet without being controlled by rules. The responses from ECSs in Subnet-X01 can go out of the subnet. Other outbound traffic is not allowed to leave Subnet-X01, because the default rule is applied.
- Inbound and outbound rules on Fw-B:
Custom inbound rule B01 allows ECS-C01 in Subnet-Y01 to use access the ECSs in Subnet-X02 through port 22 over TCP or SSH.
Custom outbound rule B02 allows all ICMP traffic over any port. The ping traffic from ECSs in Subnet-X02 to ECS-C01 in Subnet-Y01 can be routed successfully to test the network connectivity.
Helpful Links
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot