CodexBloom - Programming Q&A Platform

OCI Networking: Intermittent Connection Issues Between Subnets in Different VCNs

πŸ‘€ Views: 88 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-09
oci networking terraform hcl

I'm wondering if anyone has experience with I'm refactoring my project and I'm working on a personal project and I'm experiencing intermittent connectivity issues between two subnets in different Virtual Cloud Networks (VCNs) in Oracle Cloud Infrastructure (OCI). I have set up a Dynamic Routing Gateway (DRG) and configured VCN peering, but I'm still working with timeouts when trying to reach resources in the other VCN. The configuration includes: - VCN1 with CIDR 10.0.0.0/16 and subnet1 (10.0.1.0/24) - VCN2 with CIDR 10.1.0.0/16 and subnet2 (10.1.1.0/24) I created a DRG and attached it to both VCNs using the following Terraform snippet: ```hcl resource "oci_core_virtual_cloud_network" "vcn1" { cidr_block = "10.0.0.0/16" compartment_id = var.compartment_id display_name = "vcn1" } resource "oci_core_virtual_cloud_network" "vcn2" { cidr_block = "10.1.0.0/16" compartment_id = var.compartment_id display_name = "vcn2" } resource "oci_core_dynamic_routing_gateway" "drg" { compartment_id = var.compartment_id display_name = "my_drg" } resource "oci_core_vcn_peering_connection" "vcn1_to_vcn2" { vcn_id = oci_core_virtual_cloud_network.vcn1.id peer_vcn_id = oci_core_virtual_cloud_network.vcn2.id compartment_id = var.compartment_id } ``` Both VCNs have appropriate route tables configured to point to the DRG, and I’ve ensured that security lists allow traffic between these subnets. Despite this, pings to the other subnet often time out, and I occasionally get "Destination Host Unreachable" errors. On top of that, I noticed that some packets do reach the destination sporadically, but most just end up dropping. I also verified that both subnets' network security groups are set to allow ICMP traffic. I've checked the OCI networking documentation but haven’t found a clear explanation for this behavior. Is there something I might be missing in the configuration, or are there any known issues with VCN peering that could be causing these intermittent connectivity problems? I'm working on a web app that needs to handle this. My development environment is Debian. Is there a simpler solution I'm overlooking? I recently upgraded to Hcl 3.10. Am I missing something obvious?