
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Enable Gemini
/ 30
Configuring the privatenet VPC network
/ 70
Gemini for Google Cloud is an always-on AI collaborator that provides help to users of all skill levels where they need it. In this lab, you use Gemini to get information you need to create a VPC network with a dual-stack subnet. You use this information to create the VPC network.
In this lab, you learn how to perform the following tasks:
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
In this task, you enable Gemini and its API.
To set your project ID and region environment variables, in Cloud Shell, run the following commands:
To store the signed-in Google user account in an environment variable, run the following command:
Enable the Cloud AI Companion API for Gemini:
To use Gemini, grant the necessary IAM roles to your Google Cloud Qwiklabs user account:
Adding these roles lets the user use Gemini assistance.
Refresh the browser window.
On the upper right of the browser window, you should now see the Gemini icon ().
Click Check my progress to verify the objective.
In this task, you use Gemini to get the information you need to create a VPC network.
Click the Gemini icon ().
To begin using Gemini, click Start Chatting.
In the prompt box, type this query: Explain IP addressing setup in Google Cloud, and then, and press the Enter key.
Gemini responds with general information about creating IP addresses. Read the response.
In the prompt box, type this query: How can I create a network that uses IPv4 and IPv6 addresses, and then, press the Enter key.
Gemini responds with general information about creating a dual-stack subnet. A dual-stack subnet can contain both IPv4 and IPv6 addresses.
In the response, click Show related content.
Gemini responds with information to create a dual-stack subnet, including a link to the Google Cloud documentation.
Optional: In the response, click the documentation link, and then use the Google Cloud documentation to see more information about creating a dual-stack subnet.
In the prompt box, type this query: Tell me about Cloud Firewalls, and then, press the Enter key.
Gemini responds with general information about Cloud Firewalls and a link to the Google Cloud documentation.
Optional: Read the response.
To learn more about Cloud Firewall, click the documentation link.
In the prompt box, type this query: What are the best practices for a private network, and then, press the Enter key.
Gemini responds with a list of best practices. Read the response containing the list of private network best practices.
In the prompt box, type this query: How does NAT work in Google Cloud, and press the Enter key.
Gemini responds with a description of Cloud NAT.
Optional: read the response, and click the link to the Google Cloud documentation.
In the prompt box, type this query: Does Google Cloud use BGP, and then, press the Enter key.
Gemini responds with general information about how Google Cloud uses BGP.
Optional: read the response, and click the link to the Google Cloud documentation.
In the prompt box, type this query: Provide documentation to create a VPC network, and then, press the Enter key.
Gemini responds with general information about creating a VPC network.
In the response, click Show related content.
Gemini responds with links to the Google Cloud documentation about creating a VPC network.
In the response, click a link that shows you how to create and use a VPC network, and then read through the steps for how to create a custom mode VPC network with a dual-stack subnet.
Minimize the Gemini panel.
You apply what you learned in the previous task to create the privatenet VPC network.
On the Navigation menu, click VPC network > VPC Networks.
Click Create VPC network.
For Name, type privatenet.
For Subnet creation mode, click Custom.
For Configure a ULA internal IPv6 range for this VPC network, click Enabled.
For New subnet, specify the following, and leave the remaining settings as their defaults:
Property | Value (type value or select option as specified) |
---|---|
Name | privatenet-subnet-us |
Region | |
IP stack type | IPv4 and IPv6 (dual-stack) |
IPv4 range | 10.130.0.0/20 |
IPv6 access type | Internal |
Click Done.
Scroll to Firewall rules, and then, on the IPv4 firewall rules tab, select all rules.
Click the IPv6_firewall_rules tab, and then select all rules.
Click Create. When the VPC network is created, it appears under VPC Networks in the console.
Click Check my progress to verify the objective.
In this task, you use Gemini to learn how to use the gcloud CLI to view information about all the VPC networks in your Google Cloud project.
In the Google Cloud console title bar, click the Open Gemini icon ().
The Gemini frame appears on the right side of the console.
In the prompt box in the Gemini frame, enter How do I check my networks in Google Cloud using gcloud CLI commands and press Enter.
The response contains information about getting network information and should include the this command:
From Gemini, or from the code box in the previous step, copy the gcloud compute networks list command.
In the console, click Activate Cloud Shell ().
If prompted, click Continue.
At the command prompt, paste the gcloud CLI command you copied previously and press Enter to execute the command.
If prompted, click Authorize.
You should see this result:
In this lab, you enabled Gemini and used it to learn how to create a VPC network with a dual-stack subnet.
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2024 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one