Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Oracle · OCI Foundations

Virtual cloud networks

OCI Foundations · Lesson 6 of 15 · 42:06

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the Oracle Cloud Infrastructure Foundations Associate exam (1Z0-1085-26). In this lesson: virtual cloud networks, CIDR blocks and subnets, public and private subnets, the internet, NAT, and service gateways, route tables, the dynamic routing gateway, and peering. Includes three original practice questions, with Kettlebrook Fitness, a fictional gym chain, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

A network for the website

Kettlebrook's booking website moves to OCI: its web servers must be reachable from the internet, while the member database must stay private. And the head office network must connect to the cloud too. This lesson covers virtual cloud networks, subnets, gateways, and how to connect other networks.

Virtual cloud networks

A virtual cloud network, or VCN, is a private network that you set up in Oracle's data centers, much like a traditional network. A VCN belongs to a single region, and covers one or more blocks of IPv4 addresses, written in CIDR notation, with sizes from slash sixteen to slash thirty. Oracle recommends the private ranges of RFC 1918, like ten dot zero dot zero dot zero, slash sixteen. And the range must not overlap with the networks that you plan to connect, like your on-premises network or another VCN. You can also enable IPv6, with a prefix that Oracle allocates.

Subnets and VNICs

A VCN is divided into subnets, each with its own range of addresses, which does not overlap with the others. In every subnet, OCI reserves the first two addresses and the last one. Oracle recommends regional subnets, which span all the availability domains of the region, rather than subnets specific to one availability domain. A subnet is public or private: in a private subnet, instances cannot have public IP addresses. Each instance connects to its subnet through a virtual network interface card, or VNIC, which holds its private IP address, and in a public subnet, an optional public IP address, ephemeral or reserved.

Route tables and gateways

Traffic leaves a subnet according to its route table, where each rule sends a destination block of addresses to a target, usually a gateway. A new VCN comes with a default route table that has no rules, along with a default security list and default DHCP options. An internet gateway gives a public subnet access to the internet in both directions: resources with public IP addresses can be reached, and can start connections. A NAT gateway lets resources with only private addresses start connections to the internet, for updates for example, while nothing on the internet can start a connection to them. And a VCN needs only one internet gateway, shared by all of its public subnets.

The service gateway

Some resources need Oracle services, like Object Storage, but have no reason to reach the internet. A service gateway lets the resources of a VCN, even in a private subnet, reach supported Oracle services privately: the traffic stays on Oracle's network, and never crosses the internet. It is regional, so it reaches the services in the same region as the VCN. And one service gateway per VCN is enough.

Connecting other networks

To connect other networks, a VCN attaches to a dynamic routing gateway, or DRG, which acts as a virtual router. Through the DRG, your on-premises network connects over a Site-to-Site VPN, an encrypted tunnel across the internet, or over FastConnect, a dedicated private connection that does not cross the internet. A DRG can also connect VCNs: several VCNs of the same region attached to one DRG, or VCNs in different regions, through a remote peering connection between two DRGs. Two VCNs in the same region can also peer through local peering gateways, one on each VCN, as long as their address ranges do not overlap. In every case, route tables must send the traffic to the right gateway, and security rules must allow it.

Recap

Let's recap. A VCN is a private network in one region, with CIDR blocks from slash sixteen to slash thirty, which must not overlap with the networks that you connect. Subnets are public or private, regional subnets are recommended, and each instance connects through a VNIC. Route tables send traffic to gateways: an internet gateway in both directions, and a NAT gateway for outgoing connections only. A service gateway reaches Oracle services like Object Storage, without the internet. And a DRG connects your on-premises network, by Site-to-Site VPN or FastConnect, and other VCNs, while local peering gateways connect two VCNs of the same region.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. Kettlebrook’s web servers need public IP addresses, but its member database must never get one. How should the team place them?

    • One public subnet for both tiers
    • One private subnet for both tiers
    • Public subnet for the web, private for the database
    • The database in a VCN of another region
    Show the answer

    Public subnet for the web, private for the database

    The web servers go in a public subnet, and the database in a private subnet, where no instance can get a public IP address. “One public subnet for both tiers” would rely on every administrator never adding a public address to the database. “One private subnet for both tiers” would keep the database private, but the web servers could not get public addresses either. And “The database in a VCN of another region” would move the database to another region, far from the web servers, without making it private.

  2. Every night, Kettlebrook’s backup server, in a private subnet, copies files to Object Storage, and the security team wants this traffic kept off the internet. What should the team add?

    • A service gateway
    • An internet gateway
    • A NAT gateway
    • A local peering gateway
    Show the answer

    A service gateway

    A service gateway gives the private subnet access to Object Storage over Oracle's network, without the internet. “An internet gateway” would need a public subnet, and the traffic would cross the internet. “A NAT gateway” would let the server start connections to the internet, so the copies would leave Oracle's network. And “A local peering gateway” would connect two VCNs, not reach Object Storage.

  3. Kettlebrook wants a private, dedicated connection between its head office and OCI, with consistent performance, that never crosses the internet. What fits?

    • A Site-to-Site VPN through a DRG
    • An internet gateway with public IPs
    • A local peering gateway
    • FastConnect through a DRG
    Show the answer

    FastConnect through a DRG

    FastConnect, attached to a DRG, is a dedicated private connection that does not cross the internet. “A Site-to-Site VPN through a DRG” would also connect the head office, but through an encrypted tunnel across the internet. “An internet gateway with public IPs” would expose the traffic to the internet. And “A local peering gateway” would connect two VCNs in the same region, not the head office.