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

  1. Creating two virtual machines on Google Cloud.
  2. Configuring network settings for the VMs.
  3. Testing network connectivity between the VMs using the “ping” command.

Prerequisites

  1. An active Google Cloud account.
  2. 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.
  1. Basic familiarity with command-line interfaces and networking concepts.

Step 1: Creating Virtual Machines

  1. Log in to your Google Cloud Console.
  2. Navigate to the Compute Engine section and click on “VM instances.”
  3. 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.
  4. Repeat the above steps to create a second VM with a distinct name.

Step 2: Configuring Network Settings

  1. Once both VMs are created, take note of their internal and external IP addresses.
  2. 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

  1. Access one of the VMs through SSH using a terminal or command prompt.
  2. Utilize the “ping” command to examine connectivity to the other VM.