- Log into Oracle Cloud Console.
- Go to Networking → Virtual Cloud Networks.
- Click on Create VCN and provide a name for the VCN.
- Choose the CIDR block for the VCN (e.g.,
10.0.0.0/16
). - Choose whether to create subnets automatically or manually.
- You can create multiple subnets, each with different IP ranges and attributes (public/private).
- Optionally, create an Internet Gateway, NAT Gateway, and Route Tables for routing traffic to and from the internet.
- Configure Security Lists or NSGs to manage access to the instances within the VCN.
- Click Create to finalize the VCN.
Use Cases for VCN:
- Secure Multi-tier Architecture: You can separate different application layers (web servers, application servers, and databases) into different subnets and control traffic flow between them using route tables and security lists.
- Hybrid Cloud: VCN allows you to securely extend your on-premises network to the cloud via VPN or DRG, enabling hybrid cloud environments.
- Private Connectivity: For sensitive applications that require private communication, a VCN can ensure that traffic remains isolated from the public internet.
- Disaster Recovery: You can use VCN in conjunction with other OCI services to set up disaster recovery scenarios with secure, private communication between regions.
Example VCN Structure:
- VCN:
10.0.0.0/16
- Public Subnet 1:
10.0.0.0/24
(For web servers) - Private Subnet 1:
10.0.1.0/24
(For database servers) - Private Subnet 2:
10.0.2.0/24
(For internal services) - Internet Gateway: Connects the VCN to the internet.
- NAT Gateway: Provides internet access to private subnet instances without exposing them to the public.
- Public Subnet 1: