Showing posts with label Tasks. Show all posts
Showing posts with label Tasks. Show all posts

Tuesday, October 3, 2023

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. 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, such as the subnet name, CIDR block, and route table.

7. 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> --route-table-id <route_table_id>


Managing Subnets

Once you have created a subnet, you can manage it using the OCI Console or the OCI CLI.

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 manage.

6. Click Edit.

7. Make the desired changes to the subnet, such as the subnet name, CIDR block, or route table.

8. Click Save Changes.


Using the OCI CLI:

To manage a subnet using the OCI CLI, you can use the following commands:

Get subnet information:

oci subnet get --id <subnet_id>


Update subnet information:

oci subnet update --id <subnet_id> --name <subnet_name> --cidr-block <cidr_block> --route-table-id <route_table_id>


Delete subnet:

oci subnet delete --id <subnet_id>



OCI CLI Examples

Here are some examples of using the OCI CLI to create and manage subnets:

# Create a subnet

oci subnet create --name my-subnet --cidr-block 10.0.0.0/24 --vcn-id ocid1.vcn.oc1.iad.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

# Get subnet information

oci subnet get --id ocid1.subnet.oc1.iad.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

# Update subnet information

oci subnet update --id ocid1.subnet.oc1.iad.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --name new-subnet --cidr-block 10.0.1.0/24


# Delete subnet

oci subnet delete --id ocid1.subnet.oc1.iad.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


Creating and managing subnets is an important part of administering a VCN in OCI. You can use the OCI Console or the OCI CLI to create and manage subnets.

VCN Administration

 


As a VCN administrator, you are responsible for managing and securing your VCN. This includes tasks such as:


  1.  Creating and managing subnets
  2.  Creating and managing route tables
  3.  Creating and managing security lists
  4.  Creating and managing DHCP options
  5.  Monitoring and managing VCN traffic
  6. Troubleshooting and resolving VCN issues


VCN Troubleshooting

Some of the most common VCN troubleshooting issues include:

Connectivity issues: This can be caused by a variety of factors, such as subnet misconfiguration, route table issues, or security list issues.

Performance issues: This can be caused by a variety of factors, such as overloaded subnets, inefficient routing, or security list rules that are too restrictive.

Security issues: This can be caused by a variety of factors, such as misconfigured security lists, vulnerabilities in applications, or malware infections.


To troubleshoot VCN issues, you can use a variety of tools and resources, such as the OCI Console, the OCI CLI, and the OCI SDK. You can also contact Oracle support for assistance.

Here are some additional tips for VCN administration and troubleshooting:

Use subnets to isolate your resources: Subnets allow you to isolate your resources into logical groups. This can make it easier to manage and troubleshoot your VCN.

Use route tables to control traffic flow: Route tables allow you to control how traffic flows within your VCN and between your VCN and other networks.

Use security lists to protect your resources: Security lists allow you to control incoming and outgoing traffic to your VCN resources.

Use DHCP options to configure your clients: DHCP options allow you to configure your clients with the necessary information to connect to the network, such as the IP address of the DHCP server and the default gateway.

Monitor your VCN traffic: Use the OCI Console, the OCI CLI, or the OCI SDK to monitor your VCN traffic for performance issues and security threats.

Have a plan for disaster recovery: Create a plan for how you will recover your VCN in the event of a disaster. This plan should include steps for backing up your data and restoring your resources.

By following these tips, you can help to ensure that your VCN is secure, performant, and reliable.

Here are some additional practical scenario-based examples of how VCN administration and troubleshooting can be used:


Scenario 1: You are a VCN administrator and you are troubleshooting a connectivity issue. One of your subnets is unable to connect to the internet. You use the OCI Console to check the subnet's route table and security list. You discover that there is a missing route to the internet gateway. You add the missing route and the subnet is now able to connect to the internet.

Scenario 2: You are a VCN administrator and you are troubleshooting a performance issue. One of your subnets is experiencing high latency. You use the OCI Console to monitor the subnet's traffic. You discover that the subnet is overloaded. You move some of the resources in the subnet to another subnet and the latency is reduced.

Scenario 3: You are a VCN administrator and you are troubleshooting a security issue. One of your subnets is being attacked by a denial-of-service attack. You use the OCI Console to check the subnet's security list. You create a new security rule to block the traffic from the attacker's IP address.


By following the tips and examples above, you can effectively administer and troubleshoot your VCNs.

Tenancy Administrative Tasks with OCI Console, and OCI CLI



Creating a Tenancy

To create a tenancy using the OCI Console:

1. Go to the OCI Console.

2. Click Identify > Tenancies.

3. Click Create Tenancy.

4. Enter the required information and click Create Tenancy.


To create a tenancy using the OCI CLI:

1. Install the OCI CLI.

2. Run the following command:


oci tenancy create --name <tenancy_name> --compartment-ocid <compartment_ocid>


Creating a User

To create a user using the OCI Console:

1. Go to the OCI Console.

2. Click Identify > Users.

3. Click Create User.

4. Enter the required information and click Create User.


To create a user using the OCI CLI:

1. Run the following command:

oci user create --name <user_name> --email <user_email> --password <user_password>


Assigning Permissions to a User

To assign permissions to a user using the OCI Console:

1. Go to the OCI Console.

2. Click Identify > Users.

3. Click the user's name.

4. Click Assign Permissions.

5. Select the permissions you want to assign to the user.

6. Click Assign.


To assign permissions to a user using the OCI CLI:

1. Run the following command:

oci user policy assign --user-ocid <user_ocid> --policy-name <policy_name>


Creating a Compartment

To create a compartment using the OCI Console:


1. Go to the OCI Console.

2. Click Govern > Compartments.

3. Click Create Compartment.

4. Enter the required information and click Create Compartment.


To create a compartment using the OCI CLI:

1. Run the following command:

oci compartment create --name <compartment_name> --description <compartment_description> --compartment-id-in-parent <parent_compartment_ocid>


Creating a Resource

To create a resource using the OCI Console:

1. Go to the OCI Console.

2. Click the type of resource you want to create.

3. Enter the required information and click Create.


To create a resource using the OCI CLI:

1. Run the appropriate command for the type of resource you want to create. For example, to create a compute instance, you would run the following command:


oci compute instance create --name <instance_name> --shape <shape_name> --image-id <image_id> --compartment-id <compartment_ocid>


Monitoring Your Tenancy

To monitor your tenancy using the OCI Console:

1. Go to the OCI Console.

2. Click Monitoring.

3. Select the metrics you want to monitor.


To monitor your tenancy using the OCI CLI:

1. Run the following command to get a list of all the metrics that are available:

oci monitoring metric list


2. Once you have a list of metrics, you can run the following command to get the value of a specific metric:

oci monitoring metric get --metric-name <metric_name> --resource-id <resource_ocid>


Troubleshooting Tenancy Issues

To troubleshoot tenancy issues using the OCI Console:


1. Go to the OCI Console.

2. Click Troubleshooting.

3. Select the area of the tenancy that you are having problems with.

4. Follow the instructions to troubleshoot the problem.


To troubleshoot tenancy issues using the OCI CLI:

1. Run the following command to get a list of all the troubleshooting logs that are available:

oci troubleshooting log list


2. Once you have a list of logs, you can run the following command to get the content of a specific log:

oci troubleshooting log get --log-name <log_name>


By following these steps, you can perform a variety of tenancy administrative tasks using the OCI Console and the OCI CLI. You can also use these tools to troubleshoot tenancy issues. 

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. ...