Lab 1: Setting Up and Testing Virtual Machines on Google Cloud
Note: The following guide provides step-by-step instructions for creating and configuring virtual machines (VMs) on the Google Cloud Platform (GCP). Subsequently, the guide outlines the process of establishing network connectivity between these VMs using the “ping” command. This exercise aims to provide students with a practical understanding of cloud-based virtualization, network configuration, and basic connectivity testing. This lab is ungraded.
Lab Objectives
- Creating two virtual machines on Google Cloud.
- Configuring network settings for the VMs.
- Testing network connectivity between the VMs using the “ping” command.
Prerequisites
- An active Google Cloud account.
- Cloud Credit Code.
- Student Coupon Retrieval Link
- You will be asked for a name and email address, which needs to match your school domain. A confirmation email will be sent to you with a coupon code.
- You can request a coupon from the URL and redeem it until: 12/17/2023
- Coupon valid through: 8/17/2024
- You can only request ONE code per unique email address.
- Basic familiarity with command-line interfaces and networking concepts.
Step 1: Creating Virtual Machines
- Log in to your Google Cloud Console.
- Navigate to the Compute Engine section and click on “VM instances.”
- Click the “Create Instance” button to create your first VM.
- Choose a suitable name and region for your VM.
- Select a machine type based on your requirements.
- Configure boot disk settings.
- Configure firewall rules to allow ICMP (ping) traffic.
- Repeat the above steps to create a second VM with a distinct name.
Step 2: Configuring Network Settings
- Once both VMs are created, take note of their internal and external IP addresses.
- To enable communication between the VMs, configure their firewall settings to allow ICMP traffic.
- In the “Firewall” section, establish a new firewall rule.
- Provide a name and description for the rule.
- Set the target tags to match the VMs you’ve created.
- Define the source IP ranges as the internal IP address of the other VM.
- Allow ICMP protocol.
Step 3: Testing Connectivity
- Access one of the VMs through SSH using a terminal or command prompt.
- Utilize the “ping” command to examine connectivity to the other VM.