Hello.
Welcome to this video which shows how to create a Virtual Cloud Network, or VCN, in Oracle
Cloud Infrastructure.
A VCN is a software defined virtualized network in the Oracle Cloud Infrastructure that allows
instances to communicate as if operating on a traditional network.
The VCN includes components such as public and private subnets, route tables, internet
gateways, DNS support, security lists, and more.
When creating a compute instance it must be associated with a subnet, so a VCN is created
to provide network services to instances.
It must be configured with at least one subnet so instances have a networking resource to
use when being launched.
You can find out more about VCNs and Oracle Cloud Infrastructure networking at this cloud
documentation link.
Creating VCNs can be done manually and with a wizard, however, in this demonstration,
we will create a VCN manually and take you through the various stages to get it ready.
Starting at the Oracle Cloud Infrastructure console, navigate through the main menu, to
Networking and then Virtual Cloud Networks.
Here we would see a list of VCNs but as there are none in this compartment yet, we will
create the first one.
Click Create VCN to bring up the VCN configuration dialog.
We start by entering a name morvcn99.
You have the option of creating the VCN in another compartment if you are authorized,
but we will keep our compartment name virtdoc for this demonstration.
We enter a CIDR block range which defines the available IP addresses that can be used
for the VCN.
Here, we enter 99.0.0.0/16 for our block which allows for the maximum number of 64000 IP
addresses.
The range is defined from /16 to /30, and the same ranges can be used in separate VCNs.
A VCN can have multiple non-overlapping CIDR blocks that you can also add and change after
you create the VCN.
Regardless of the number of CIDR blocks, only the maximum of 64000 private IPs can be created
and managed within the VCN.
If we want to add more CIDR blocks, we can click the Another CIDR Block button, but we
dont want to, so we will leave it.
If we want IPv6 addresses available to the VCN we can check the box for Enable IPV6 CIDR
Block, but we dont need it so we leave it unchecked.
The DNS resolution feature is enabled by default, so we keep it that as it will automatically
use DNS to resolve host names on the VCN.
It is better to keep this as you cannot change the setting after the VCN has been created.
The DNS label is automatically generated from the VCN name, but you can replace it if you
wish.
And the generated DNS domain name is created using the DNS label.
The Show Advanced Options allows for tagging the VCN, but we will skip this for this demonstration.
We click Create VCN to start provisioning the VCN.
We are returned to the new VCN details page.
Here we can see the compartment it belongs to, the CIDR block ranges assigned, the generated
domain name and its unique Oracle Cloud Identifier.
On the left are links to resources available for the VCN.
It defaults to listing any subnets created, but we can see there are none created yet.
We see some Resources the number 1 in brackets beside the name, which indicates this resource
was automatically created when the VCN was built.
We see a CIDR Block, Route Table, Security List, and DHCP Options have already been assigned
or created.
The VCN automatically gets a default route table, security list, and DHCP options setting;
but it does not include any default Subnets.
We click on DHCP options and see that the default options have been set and the DNS
type is Internet and VCN Resolver.
We click on Security Lists.
Oracle Cloud Infrastructure provides a default security list to manage connection traffic
in and out of any subnets associated with the VCN.
Clicking the security list name we see there are three stateful ingress rules.
There is a rule for port 22, supporting SSH connections to instances attached to any subnet
of this VCN.
There are also two additional rules supporting ICMP for internal communication.
Clicking on Egress rules we see there is one stateful rule supporting all outbound traffic
for all protocols on all ports.
You can find out more about working with security lists from this video which is also available.
We click on morvcn99 in the breadcrumbs to return to the VCN details page.
Now, we click Route Tables under Resources, and then the name link Default Route Table
for morvcn99.
There are no rules until they need to be created for their specific purposes.
We return to the VCN details page by clicking on its name in the breadcrumbs.
We click the Subnets option under the Resources.
As stated earlier, there must be at least one subnet created in order to support the
creation of instances that want to use this VCN.
To create a subnet, we click Create Subnet and the Create Subnet dialog appears.
We give the new subnet a name, I will call it morvcn99-sub01.
We will leave it associated with our current compartment.
The default Subnet Type option is a regional subnet, which is useful for high availability
across multiple Availability Domains.
However, for this subnet, we select Availability Domain-specific.
This option is useful for creating a more isolated subnet.
From the Availability Domain dropdown, I select Availability Domain 2.
Next, we input the CIDR block for IP address assignment for this subnet.
This contiguous CIDR block must be within the range of the block specified for the VCN.
We will provide 99.0.2.0/24, which provides for 256 IP addresses.
From the Route Table for our compartment dropdown, we select the default Route Table name.
It is possible to change the compartment, and then we are offered to choose a route
table from that compartment.
If we dont make a selection here it will default to the one created for the VCN.
For Subnet access, we select Private Subnet, which means instances on this subnet cannot
directly access the public internet.
There is the option to create a Public Subnet which would allow for public IP addresses
to be assigned to instances using this subnet.
If we allowed for DNS Resolution for the VCN, then a DNS name can be assigned to any instances
launched which are attached to this subnet.
And like when creating the VCN, we can choose a DNS label or leave it to be the subnet name.
Clicking the DHCP Options dropdown, we can choose different default DHCP options by changing
the compartment and selecting a different DHCP Options name, but we will take the one
created when we created the VCN.
If we dont make a selection here it will default to the one created for the VCN.
For Security Lists, clicking on the dropdown we can select the Default Security list created
for the VCN to manage traffic in and out of the subnet, or change compartment and choose
a different one.
Clicking the Another Security List button we can add up to 4 other security lists available
in the compartment.
Remember that traffic will be managed against all lists that are added.
Again, if we dont make a selection here it will default to the one created for the VCN.
We will ignore tagging options and click Create Subnet.
After a short pause, the Subnet appears on the list of Subnets for morvcn99.
Additional Subnets, both private and public, can be created as necessary, each with their
own particular set of resources.
Under Resources, we click on CIDR Blocks.
We see the current CIDR block configured for the VCN.
Clicking the Add CIDR Block button opens a dialog which allow us to add a new IPv4 CIDR
block to the VCN.
Remember the block ranges cannot overlap and there is total maximum of 64000, so its important
to plan the block ranges.
We don't need another block so we click Cancel to close the dialog.
Clicking on the three dots menu beside the table entry gives us the Edit CIDR Block option.
Making changes to the block must be carefully considered as there may be many components
associated with the VCN.
Also, with more complex VCNs, it could take some time to carry out the changes.
The Add IPv6 CIDR Block allows to create an block of IPv6 addresses.
At the top of the VCN details section, there is a button called Move Resource.
Clicking on this button opens a dialog allowing us to move this resource to a different compartment.
Clicking on the Choose New Compartment drop down allows us to select a new compartment
and then click the Move Resource button.
We dont want to do this in this demonstration, so I will click the cancel button to close
the dialog.
Thats the end of the video thanks for watching.