OCI DNS Part 2: Creating a Private View, Associating it with a VCN, and Testing DNS
Welcome back to the second part of our series on Oracle Cloud Infrastructure (OCI) DNS. In Part 1, we covered the basics of DNS and the steps to create a private zone. Now, let's move forward and learn how to create a private view, associate it with a Virtual Cloud Network (VCN), and test the DNS configuration. Let's get started!
Creating a Private View
A private view in OCI DNS allows you to control how DNS queries are resolved within your VCN. This is especially useful for internal DNS resolution within your OCI environment.
Step-by-Step Guide to Create a Private View
- Navigate to the DNS Management Console
- Log in to your OCI account.
- From the OCI console, go to the "Networking" section and select "DNS Management".
- Create a Private View
- Click on the "Create View" button.
- Fill in the necessary details:
- Name: Enter a name for your private view.
- Compartment: Select the appropriate compartment.
- Click "Create View".
Associating the Private View with a VCN
Once the private view is created, the next step is to associate it with your VCN. This association ensures that DNS queries from resources within the VCN use the DNS configuration specified in the private view.
Steps to Associate the View with a VCN
- Navigate to the VCN
- In the OCI console, go to the "Networking" section and select "Virtual Cloud Networks".
- Select the Target VCN
- Choose the VCN you want to associate with the private view.
- Associate the View
- In the VCN details page, find the "DNS Resolver" section and click on "Associate View".
- Select the private view you created in the previous step.
- Click "Associate".
Add A record for the OCI instance IP which is created in the VCN, and we will test whether it will resolve the hostname based on the record.
Testing the DNS Configuration
After associating the private view with your VCN, it's essential to test the DNS configuration to ensure it's working as expected.
Steps to Test DNS
- Launch an Instance in the VCN
- Go to the "Compute" section and create a new instance or use an existing instance within the VCN associated with the private view.
- Connect to the Instance
- SSH into the instance using your preferred method.
- Perform DNS Queries
- Use the
nslookup
ordig
command to test DNS resolution. - For example, to test the resolution of a domain in your private zone:
nslookup cmsapp.cms.com
- Verify that the DNS queries return the expected results.
- Use the
Conclusion
In this blog, we walked through the steps to create a private view in OCI DNS, associate it with a VCN, and test the DNS configuration. These steps are crucial for managing internal DNS resolution within your OCI environment.
If you have any questions or run into any issues, feel free to reach out.
No comments:
Post a Comment