Thursday, May 9, 2024
GCP Juara GCP VPC

VPC Networking Fundamentals

VPC

“VPC Networking Fundamentals”

Pengantar

Google Cloud Virtual Private Cloud (VPC) menyediakan fungsionalitas jaringan ke instance mesin virtual (VM) Compute Engine, container Kubernetes Engine, dan App Engine Flex. Dengan kata lain, tanpa jaringan VPC, Anda tidak dapat membuat instance VM, container, atau aplikasi App Engine. Oleh karena itu, setiap project Google Cloud memiliki jaringan default untuk Anda mulai.

Praktikum

Task 1. Explore the default network

  • Klik Navigation menu > VPC network > VPC networks.

View the routes

  • In the left pane, click on Routes.

View the firewall rules

  • In the left pane, click on Firewall.
    default-allow-icmp
    default-allow-internal
    default-allow-rdp
    default-allow-ssh

Delete the default network

  • In the left pane, click on Firewall.
  • Select all firewall rules and click DELETE.
  • Then click DELETE to confirm the deletion.
  • In the left pane, click on VPC networks.
  • Click on the default network.
  • Click Delete VPC network at the top of the page,
  • Then click DELETE to confirm the deletion of the default network.
  • n the left pane, click on Routes.

Try to create a VM instance

  • In the Console, navigate to Navigation menu (Navigation menu icon
    ) > Compute Engine > VM instances.
  • Click +CREATE INSTANCE to create a VM instance.
  • Leave all the values at their default and click Create.
  • Under the Firewall section, click NETWORKING, DISKS, SECURITY, MANAGEMENT, SOLE-TENANCY, and then click Networking.
  • Click Cancel
Baca Juga :  Using Prometheus for Monitoring on Google Cloud: Qwik Start

Task 2. Create a VPC network and VM instances

Create an auto mode VPC network with Firewall rules

  • n the Console, navigate to Navigation menu (Navigation menu icon) > VPC network > VPC networks, and then click +CREATE VPC NETWORK.
  • Set the Name to mynetwork.
  • For Subnet creation mode, click Automatic.
  • Auto mode networks create subnets in each region automatically.
  • For Firewall rules, check all available rules.
  • These are the same standard firewall rules that the default network had.
  • Click CREATE, then wait for mynetwork to be created.
  • Click on the mynetwork name and record the IP address range for the subnets in europe-west1. You will refer to these in the next steps.

Create a VM instance in us-central1

  • In the Console, navigate to Navigation menu (Navigation menu icon) > Compute Engine > VM instances,
  • Click +CREATE INSTANCE.
  • Set the following values, leaving all others at their defaults:
  • Click Create, then wait for the instance to be created.
  • Verify that the Internal IP was assigned from the IP address range for the subnet in us-central1 (10.128.0.0/20).

Create a VM instance in europe-west1

  • Click +CREATE INSTANCE.
  • Set the following values, leaving all others at their defaults:
  • Click Create, then wait for the instance to be created.
  • Verify that the Internal IP was assigned from the IP address range for the subnet in europe-west1 (10.132.0.0/20).

Task 3. Explore the connectivity for VM instances

Verify connectivity for the VM instances

  • n the Console, navigate to Navigation menu (Navigation menu icon) > Compute Engine > VM instances.
  • Note the external and internal IP addresses for mynet-eu-vm.
  • For mynet-us-vm, click SSH to launch a terminal and connect. You may have to click SSH twice.
  • To test connectivity to mynet-eu-vm‘s internal IP, run the following command using mynet-eu-vm‘s internal IP:
ping -c 3 <Enter mynet-eu-vm's internal IP here>
  • To test connectivity to mynet-eu-vm‘s external IP, run the following command using mynet-eu-vm‘s external IP:
ping -c 3 <Enter mynet-eu-vm's external IP here>

Task 4. Remove the allow-icmp firewall rules

  • In the Console, navigate to Navigation menu (Navigation menu icon) > VPC network > Firewall.
  • Check the mynetwork-allow-icmp rule.
  • Click DELETE.
  • Click DELETE to confirm the deletion. Wait for the firewall rule to be deleted.
  • Return to the mynet-us-vm SSH terminal.
  • To test connectivity to mynet-eu-vm‘s internal IP, run the following command using mynet-eu-vm‘s internal IP:
ping -c 3 <Enter mynet-eu-vm's internal IP here>
  • To test connectivity to mynet-eu-vm‘s external IP, run the following command using mynet-eu-vm‘s external IP:
ping -c 3 <Enter mynet-eu-vm's external IP here>

Task 5. Remove the allow-custom firewall rules

  • In the Console, navigate to Navigation menu (Navigation menu icon) > VPC network > Firewall.
  • Check the mynetwork-allow-custom rule and then click DELETE.
  • Click DELETE to confirm the deletion.
  • Wait for the firewall rule to be deleted.
  • Return to the mynet-us-vm SSH terminal.
  • To test connectivity to mynet-eu-vm‘s internal IP, run the following command using mynet-eu-vm‘s internal IP:
ping -c 3 <Enter mynet-eu-vm's internal IP here>

Task 6. Remove the allow-ssh firewall rules

  • In the Console, navigate to Navigation menu (Navigation menu icon) > VPC network > Firewall.
  • Check the mynetwork-allow-ssh rule and then click DELETE.
  • Click DELETE to confirm the deletion. Wait for the firewall rule to be deleted.
  • In the Console, navigate to Navigation menu (Navigation menu icon) > Compute Engine > VM instances.
  • For mynet-us-vm, click SSH to launch a terminal and connect.
Baca Juga :  Collect Metrics from Exporters using the Managed Service for Prometheus

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai VPC Networking Fundamentals. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

(Visited 87 times, 1 visits today)

Similar Posts