Showing posts with label NSG. Show all posts
Showing posts with label NSG. Show all posts

Tuesday, October 3, 2023

VCN Administrative Tasks

 


Creating a VCN

To create a VCN using the OCI Console:


1. Go to the OCI Console.

2. Click Networking > Virtual Cloud Networks.

3. Click Create VCN.

4. Enter the required information and click Create VCN.


To create a VCN using the OCI CLI:

1. Run the following command:

oci vcn create --name <vcn_name> --cidr-block <cidr_block> --compartment-id <compartment_id>


Creating a Subnet

To create a subnet using the OCI Console:


1. Go to the OCI Console.

2. Click Networking > Virtual Cloud Networks.

3. Click the name of the VCN in which you want to create the subnet.

4. Click Subnets.

5. Click Create Subnet.

6. Enter the required information and click Create Subnet.


To create a subnet using the OCI CLI:

1. Run the following command:


oci subnet create --name <subnet_name> --cidr-block <cidr_block> --vcn-id <vcn_id>


Creating a Route Table

To create a route table using the OCI Console:


1. Go to the OCI Console.

2. Click Networking > Virtual Cloud Networks.

3. Click the name of the VCN in which you want to create the route table.

4. Click Route Tables.

5. Click Create Route Table.

6. Enter the required information and click Create Route Table.


To create a route table using the OCI CLI:

1. Run the following command:


oci route-table create --name <route_table_name> --vcn-id <vcn_id>


Creating a Security List

To create a security list using the OCI Console:


1. Go to the OCI Console.

2. Click Networking > Virtual Cloud Networks.

3. Click the name of the VCN in which you want to create the security list.

4. Click Security Lists.

5. Click Create Security List.

6. Enter the required information and click Create Security List.


To create a security list using the OCI CLI:

1. Run the following command:

oci security-list create --name <security_list_name> --vcn-id <vcn_id>


Attaching a Subnet to a Route Table

To attach a subnet to a route table using the OCI Console:


1. Go to the OCI Console.

2. Click Networking > Virtual Cloud Networks.

3. Click the name of the VCN in which the subnet is located.

4. Click Subnets.

5. Click the name of the subnet that you want to attach to the route table.

6. Click Edit.

7. Under Route Table, select the route table that you want to attach to the subnet.

8. Click Save Changes.


To attach a subnet to a route table using the OCI CLI:

1. Run the following command:

oci subnet update --id <subnet_id> --route-table-id <route_table_id>


Attaching a Security List to a Subnet

To attach a security list to a subnet using the OCI Console:


1. Go to the OCI Console.

2. Click Networking > Virtual Cloud Networks.

3. Click the name of the VCN in which the subnet is located.

4. Click Subnets.

5. Click the name of the subnet that you want to attach the security list to.

6. Click Edit.

7. Under Security List, select the security list that you want to attach to the subnet.

8. Click Save Changes.


To attach a security list to a subnet using the OCI CLI:

1. Run the following command

oci subnet update --id <subnet_id> --security-list-ids <security_list_id>


These are just a few examples of VCN administrative tasks that you can perform using the OCI Console and the OCI CLI. For more information, please refer to the OCI documentation.

Virtual Cloud Network (VCN) - OCI

 

A virtual cloud network (VCN) is a private network that you create in Oracle Cloud Infrastructure (OCI). You can use VCNs to launch compute instances, store data, and deploy applications. VCNs are logically isolated from each other, and you can control who has access to your resources.


Here is a scenario-based explanation of how VCNs can be used:

Scenario:

        You are a web developer and you want to deploy a new web application to OCI. You create a VCN and launch a compute instance in the VCN. You then deploy your web application to the compute instance.

To make your web application accessible to users on the internet, you create a public subnet in your VCN and attach the compute instance to the public subnet. You then create a security rule in the VCN's security list to allow incoming traffic to the compute instance on port 80.

Now, users on the internet can access your web application by visiting the compute instance's public IP address.

VCNs can be used to create complex network architectures for demanding applications. For example, you can use VCNs to create multiple subnets for different types of traffic, such as web traffic, database traffic, and management traffic. You can also use VCNs to create private networks that are not accessible from the internet.


Here are some additional benefits of using VCNs:

Security: You can use VCNs to isolate your resources from the public internet and from other VCNs. This can help to protect your resources from unauthorized access.

Performance:VCNs are highly performant and can support demanding applications.

Scalability: VCNs are scalable and can grow with your business.

Flexibility: VCNs are flexible and can be used to create a variety of network architectures.


If you are planning to deploy applications to OCI, you should consider using VCNs. VCNs can help you to create a secure, performant, and scalable network for your applications.

Oracle Cloud Administration Scenarios

 


Troubleshoot a VCN issue:

Scenario:

     You are troubleshooting a VCN issue where compute instances in a subnet are unable to access the internet.

Steps:

    1. Check the subnet's route table to make sure that there is a route to the internet gateway.

    2. Check the subnet's security list to make sure that outgoing traffic to the internet is allowed.

    3. Check the compute instances to make sure that they are configured to use the correct subnet and route table.

    4. If you are still having problems, try restarting the compute instances and the router.


Configure a firewall for a complex application:

Scenario:  You are configuring a firewall for a complex application that has multiple components running on different subnets.

Steps:

    1. Identify the different components of the application and the traffic that needs to be allowed between them.

    2. Create security lists for each subnet and configure them to allow the necessary traffic.

    3. If you need to allow traffic between subnets, you can create network security groups (NSGs) and attach them to the resources that need to communicate with each other.

    4. Test the firewall configuration to make sure that the application is working as expected.


Back up a critical database:

Scenario: You need to back up a critical database that is running in OCI.

Steps:

    1. Create a database backup plan that specifies how often you need to back up the database and how long you need to keep the backups.

    2. Use the OCI Console, the OCI CLI, or the OCI SDK to create a database backup.

    3. Store the database backup in a secure location, such as OCI Object Storage.

    4. Test the database backup to make sure that it is restorable.


Implement a disaster recovery plan for a cloud-based application:

Scenario: You need to implement a disaster recovery plan for a cloud-based application that is running in OCI.

Steps:

    1. Identify the critical components of the application and the resources that they need.

    2. Decide how you want to recover the application in the event of a disaster. You may choose to use a combination of the following strategies:

        Replication: Replicate the critical components of the application to another region.

        Failover: Configure the application to fail over to another region in the event of a disaster.

        Backup and restore: Back up the critical components of the application and restore them to another region in the event of a disaster.

    3. Test the disaster recovery plan to make sure that it works as expected.



Creating and Managing Subnets Administrative Tasks

  Creating a Subnet To create a subnet using the OCI Console: 1. Go to the OCI Console. 2. Click Networking > Virtual Cloud Networks. 3. ...