Dear Fellow members,
Good Day, today I am going to share Intra VPC communication and Inter VPC (in the same region) with step by step procedure and create VPC Peering to establish communication between two VPCs with the testing procedure.
Task List
We are going to verify the following network service functions
Task 1: Verify that two ECSs in a VPC can communicate with each other by default. Task 2: Verify that the ECS that has an EIP bound can access the Internet. Task 3: Create a VPC peering connection to enable communication between ECSs in different VPCs of the same region.
VPC Peering
It enables two VPCs in the same region to communicate with each other using private IP.
VPCs of separate accounts in the same region can be communicated using VPC Peering
Intra VPC communication
Communication within IP pools of VPC is being carried out using a local routing table.
Step-by-Step Procedure
Starting with Task 1 then Task 2 & 3
Step 01: Create VPC in any region (let say Hong Kong) as VPC-1
Step 02: Select Virtual Private Network from Service List > Network
Step 03: Then create another VPC in the same region as VPC-02
Step 04: Buy Three Linux ECSs, two ECSs in VPC-01 and one ECS in VPC-02
Step 05: Select Elastic Cloud Server from Service List > Computing
Step 06: Create ECS resources as demonstrated in the article (https://forum.huawei.com/enterprise/en/an-in-depth-guide-to-building-network-ecs-on-huawei-cloud/thread/706775-893 )
Now we created 2*ECS in our first VPC
Step 07: Repeat Step 6 to buy an ECS named ecs-HK-0003 in the Second VPC
Testing Communication – Intra VPC
Start with Logging in using Remote Login option. It gives a web-based Console of Linux.
Now we can see SUCCESSFUL Ping to ECS-2 IP in the same VPC. [Task 1 done]
But NO PING to INTERNET (as ping to 8.8.8.8 is not reachable)
Step 08: Buy an EIP (Elastic IP) and Bind it.
Now PING to INTERNET (as ping to 8.8.8.8 is reachable) [Task 2 successful]
Step 09: Now make VPC Peering by clicking Create VPC Peering Connection in Network Console
Step 10a: Click VPC Peering in Network Console > VPC Peering and add
Name, select Local VPC, Account, Peer Project & Peer VPC
Step 10b: Add routes in Network Console
Step 11: Add routing entry for Peer VPC (here it is 192.168.0.0/16), by selecting Next Hop Type as VPC Peering Connection and Next Hop as VPC Peering name
Step 12: Add routing entry for other VPC (here it is 192.168.0.0/16),
Testing Communication – Inter VPC (Same region)
- Start with Logging in using Remote Login and Now able to PING ECS on other VPC
Ending Remarks
This post presents communication for VPCs, including verifying that two ECSs in a Virtual Private Cloud (VPC) can communicate with each other by default enabling Internet access after binding an EIP to the ECS. Also creating a VPC peering connection to enable ECSs in different VPCs in the same region to communicate with each other by step-by-step structured procedures.