In today’s post will see regarding VCN Remote peering.
What is VCN Remote peering?
Remote VCN peering is the process of connecting two VCNs in different regions (but the same tenancy ). The peering allows the VCNs’ resources to communicate using private IP addresses without routing the traffic over the internet or through your on-premises network. Without peering, a given VCN would need an internet gateway and public IP addresses for the instances that need to communicate with another VCN in a different region.
My Environment details:
I subscirbed to Regions ASHBURN and PHOENIX as shown in the below screenshots.
In ASHBURN region:
- Create a compartment ASH_COMPARTMENT.
- Create ASH_VCN01 with CIDR 126.96.36.199/16 in the ASH_COMPARTMENT.
- Create subnets
- ASH_SUBNET_A with CIDR 188.8.131.52/24
- ASH_SUBNET_B with CIDR 184.108.40.206/24
- ASH_SUBNET_C with CIDR 220.127.116.11/24
- Create ASH_IGW01 Internet Gatway and add to the route table of the ASH_VCN01.
- Provision the instance ASH-A-INST01 (of image OEL 7.6) using ASH_VCN01 and subnet ASH_SUBNET_A.
- So, after provisoining the instance ASH-A-INST01, its ip address will 18.104.22.168
- Create Dynamic Routing Gatway with name ASH_DRG01
- Attach the ASH_VCN01 to ASH_DRG01 as it’s a stand alone entity.
- Create Remote Peering connectivity as ASH_RPC01 and copy the OCID of the same, which require to establish the connection with other region RPC.
In PHOENIX region:
- Create a compartment PHX_COMPARTMENT.
- Create PHX_VCN01 with CIDR 192.168.0.0/16 in the PHX_COMPARTMENT.
- Create subnets
- PHX _SUBNET_A with CIDR 192.168.1.0/24
- PHX _SUBNET_B with CIDR 192.168.2.0/24
- PHX _SUBNET_C with CIDR 192.168.3.0/24
- Create PHX_IGW01 Internet Gateway and add to the route table of the PHX_VCN01.
- Provision the instance PHX-B-INST01 (of image OEL 7.6) using PHX_VCN01 and subnet PHX_SUBNET_A.
- So, after provisoining the instance PHX-B-INST01, its ip address will 192.168.1.2
- Create Dynamic Routing Gatway with name PHX_DRG01
- Attach the PHX_VCN01 to PHX_DRG01 as it’s a stand alone entity.
- Create Remote Peering connectivity as PHX_RPC01.
- Now click on the PHX_RPC01 and click on Establish connection and given the details of Region and OCID of the RPC of other which should have to be peered.
- Now, add the Dynamic Route Gateway rule in Route table of the speicfic region VCN’s.
- And add the specific rules to security lists of the specific region VCN’s.
Creating a compartment, VCN, Block Voulme, File storage by checking in blog
In this specific post we will concnetrate on Dynamic Route Gateway and Remote peering connectivity.
Subscribe the below highlighted regions goting to manage regions in the console
By changing the region to ASHBURN, create the compartment, VCN and all other stuff as specified in above points.
Create Dynamic Route Gateway as below
PHX_DRG01 dynamic route gateway created successfully.
Attach the VCN to the created DRG.
VCN attached successfully to the DRG in phoenix region.
Create Remote peering connection in phoenix region.
RPC created successfully.
Copy the OCID of the RPC created in phoenix region, which we give in the RPC of ashburn region to establish the connection.
Create Dynamic Route Gateway in Ashburn region.
DRG created successfully in Ashburn region.
Attach the VCN of Ashburn region to DRG of the same region.
VCN attached successfully to the DRG in Ashburn region.
Create Remote Peering Connection in Ashburn region.
RPC created successfully in Ashburn region.
Now, click on the RPC created and click on Establish Connection, give the phoenix region and the OCID of the RPC which is in phoenix region.
Connection established and the status showing as PEERED in both the regions.
Add the specific Dynamic Route Gateway rule and security lists rules in both the regions as below
Now, check the connectivity from the instances, it should have to communicate successfully.
Hope this post find’s you well !!
Any queries please let me know in comment box.
Firoz Hussain K.