# Cloud DNS: Traffic Steering using Geolocation Policy - GSP1008

## Overview

Cloud DNS routing policies enable users to configure DNS based traffic steering. A user can either create a Weighted Round Robin (WRR) routing policy or a Geolocation (GEO) routing policy. You can configure routing policies by creating special ResourceRecordSets with special routing policy values.

Use WRR to specify different weights per ResourceRecordSet for the resolution of domain names. Cloud DNS routing policies help ensure that traffic is distributed across multiple IP addresses by resolving DNS requests according to the configured weights.

​​In this lab you will configure and test the Geolocation routing policy. Use GEO to specify source geolocations and to provide DNS answers corresponding to those geographies. The geolocation routing policy applies the nearest match for the source location when the traffic source location doesn't match any policy items exactly.

### What you'll learn

In this lab, you'll learn how to:

*   Launch client VMs, one in each region.
    
*   Launch server VMs, one in each region except `asia-southeast1`.
    
*   Create a private zone, for `example.com`.
    
*   Create a Geolocation routing policy using gcloud commands.
    
*   Test the configuration.
    

### Architecture

Use the default VPC network to create all the virtual machines (VM) and launch client VMs in 3 Google Cloud locations: `us-west1`, `europe-west1` and `asia-southeast1`. To demonstrate the behavior of Geolocation routing policy, you will create the server VMs only in 2 regions: `us-west1` and `europe-west1`.

![The default VPC diagram](https://cdn.qwiklabs.com/8%2FlpClCM%2F6jdXaT35cMC8lQWcc0iS3OGAF5HIJVybTs%3D align="left")

You will use Cloud DNS routing policies and create `ResourceRecordSets` for geo.example.com and configure the Geolocation policy to help ensure that a client request is routed to a server in the client's closest region.

![The Cloud DNS routing policies diagram](https://cdn.qwiklabs.com/QnzO9JhP8FDiTfp5TELBXyKXmav7zf0Hyhds0gqrTgw%3D align="left")

## Setup and requirements

### Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click **Start Lab**, shows how long Google Cloud resources are made available to you.

This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

*   Access to a standard internet browser (Chrome browser recommended).
    

**Note:** Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.

*   Time to complete the lab—remember, once you start, you cannot pause a lab.
    

**Note:** Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

### How to start your lab and sign in to the Google Cloud console

1.  Click the **Start Lab** button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
    
    *   The Open Google Cloud console button
        
    *   Time remaining
        
    *   The temporary credentials that you must use for this lab
        
    *   Other information, if needed, to step through this lab
        
2.  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.
    
    **Note:** If you see the **Choose an account** dialog, click **Use Another Account**.
    
3.  If necessary, copy the **Username** below and paste it into the **Sign in** dialog.
    
    ```apache
    student-03-947b38fd4086@qwiklabs.net
    ```
    
    You can also find the Username in the Lab Details pane.
    
4.  Click **Next**.
    
5.  Copy the **Password** below and paste it into the **Welcome** dialog.
    
    ```apache
    P9T8b1MaMKJM
    ```
    
    You can also find the Password in the Lab Details pane.
    
6.  Click **Next**.
    
    **Important:** You must use the credentials the lab provides you. Do not use your Google Cloud account credentials.
    
    **Note:** Using your own Google Cloud account for this lab may incur extra charges.
    
7.  Click through the subsequent pages:
    
    *   Accept the terms and conditions.
        
    *   Do not add recovery options or two-factor authentication (because this is a temporary account).
        
    *   Do not sign up for free trials.
        

After a few moments, the Google Cloud console opens in this tab.

**Note:** To access Google Cloud products and services, click the **Navigation menu** or type the service or product name in the **Search** field.

![Navigation menu icon and Search field](https://cdn.qwiklabs.com/9Fk8NYFp3quE9mF%2FilWF6%2FlXY9OUBi3UWtb2Ne4uXNU%3D align="left")

### Activate Cloud Shell

Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.

1.  Click **Activate Cloud Shell** at the top of the Google Cloud console.
    
2.  Click through the following windows:
    
    *   Continue through the Cloud Shell information window.
        
    *   Authorize Cloud Shell to use your credentials to make Google Cloud API calls.
        

When you are connected, you are already authenticated, and the project is set to your **Project\_ID**, `qwiklabs-gcp-04-6ccb89b66643`. The output contains a line that declares the **Project\_ID** for this session:

```apache
Your Cloud Platform project in this session is set to qwiklabs-gcp-04-6ccb89b66643
```

`gcloud` is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.

3.  (Optional) You can list the active account name with this command:
    

```apache
gcloud auth list
```

4.  Click **Authorize**.
    

**Output:**

```apache
ACTIVE: *
ACCOUNT: student-03-947b38fd4086@qwiklabs.net

To set the active account, run:
    $ gcloud config set account `ACCOUNT`
```

5.  (Optional) You can list the project ID with this command:
    

```apache
gcloud config list project
```

**Output:**

```apache
[core]
project = qwiklabs-gcp-04-6ccb89b66643
```

**Note:** For full documentation of `gcloud`, in Google Cloud, refer to [the gcloud CLI overview guide](https://cloud.google.com/sdk/gcloud).

## Task 1. Enable APIs

Ensure that the Compute and the Cloud DNS APIs are enabled. In this section, you will enable the APIs manually, using `gcloud` commands.

### Enable Compute Engine API

*   Run the `gcloud services enable` command to enable the Compute Engine API:
    

```apache
gcloud services enable compute.googleapis.com
```

This command can take a few minutes to complete.

### Enable Cloud DNS API

*   Run the `gcloud services enable` command to enable the Cloud DNS API:
    

```apache
gcloud services enable dns.googleapis.com
```

This command can take a few minutes to complete.

### Verify that the APIs are enabled

*   Run the `gcloud services list` command to list all the enabled APIs. We should see `compute.googleapis.com` and `dns.googleapis.com` in the listed output.
    

```apache
gcloud services list | grep -E 'compute|dns'
```

**Output:**

```apache
NAME: compute.googleapis.com
NAME: dns.googleapis.com
```

## Task 2. Configure the firewall

Before you create the client VMs and the web servers, you need to create two firewall rules.

**Note:** The `firewall-rules create` command can take a few minutes to complete. Please wait for the "Creating firewall...done" message before proceeding to the next step.

1.  To be able to SSH into the client VMs, run the following to create a firewall rule to allow SSH traffic from Identity Aware Proxies (IAP):
    

```apache
gcloud compute firewall-rules create fw-default-iapproxy \
--direction=INGRESS \
--priority=1000 \
--network=default \
--action=ALLOW \
--rules=tcp:22,icmp \
--source-ranges=35.235.240.0/20
```

**Output:**

```apache
Creating firewall...working..Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-01-c5d669dffb06/global/firewalls/fw-default-iapproxy].
Creating firewall...done.
NAME: fw-default-iapproxy
NETWORK: default
DIRECTION: INGRESS
PRIORITY: 1000
ALLOW: tcp:22,icmp
DENY:
DISABLED: False
```

2.  To allow HTTP traffic on the web servers, each web server will have a "http-server" tag associated with it. You will use this tag to apply the firewall rule only to your web servers:
    

```apache
gcloud compute firewall-rules create allow-http-traffic --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:80 --source-ranges=0.0.0.0/0 --target-tags=http-server
```

**Output:**

```apache
Creating firewall...working..Created [https://www.googleapis.com/compute/v1/projects/routing-policy-lab/global/firewalls/allow-http-traffic].
Creating firewall...done.
NAME: allow-http-traffic
NETWORK: default
DIRECTION: INGRESS
PRIORITY: 1000
ALLOW: tcp:80
DENY:
DISABLED: False
```

Click *Check my progress* to verify the objective.

Configure the Firewall

## Task 3. Launch client VMs

Now that the APIs are enabled, and the firewall rules are in place, the next step is to set up the environment. In this section, you will create 3 client VMs, one in each region.

### Launch client in `us-west1`

*   Run the `gcloud compute instances create` command to create the client VMs:
    

```apache
gcloud compute instances create us-client-vm --machine-type e2-micro --zone us-west1-c
```

This command can take a few minutes to complete. Please wait for a "Created" message before moving to the next step.

**Output:**

```apache
Created [https://www.googleapis.com/compute/v1/projects/routing-policy-lab/zones/us-west1-c/instances/us-client-vm].
NAME: us-client-vm
ZONE: us-west1-c
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.142.0.2
EXTERNAL_IP: 34.138.90.216
STATUS: RUNNING
```

### Launch client in `europe-west1`

*   Run the following to create the client VMs:
    

```apache
gcloud compute instances create europe-client-vm --machine-type e2-micro --zone europe-west1-b
```

**Output:**

```apache
Created [https://www.googleapis.com/compute/v1/projects/routing-policy-lab/zones/europe-west1-b/instances/europe-client-vm].
NAME: europe-client-vm
ZONE: europe-west1-b
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.154.0.2
EXTERNAL_IP: 35.242.164.177
STATUS: RUNNING
```

### Launch client in `asia-southeast1`

*   Run the following to create the client VMs:
    

```apache
gcloud compute instances create asia-client-vm --machine-type e2-micro --zone asia-southeast1-a
```

**Output:**

```apache
Created [https://www.googleapis.com/compute/v1/projects/routing-policy-lab/zones/asia-southeast1-a/instances/asia-client-vm].
NAME: asia-client-vm
ZONE: asia-southeast1-a
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.160.0.2
EXTERNAL_IP: 34.93.179.212
STATUS: RUNNING
```

Click *Check my progress* to verify the objective.

Launch client VMs

## Task 4. Launch Server VMs

Now that the client VM's are up and running, the next step is to create the server VMs. You will use a startup script to configure and set up the web servers. As mentioned earlier, you will create the server VMs only in 2 regions: `us-west1` and `europe-west1`.

*   Run the `gcloud compute instances create` command to create the server VMs. The compute instance create command can take a few minutes to complete. Please wait for a "Created" message before moving to the next step.
    

### Launch server in `us-west1`

*   Run the following to command:
    

```apache
gcloud compute instances create us-web-vm \
--zone=us-west1-c \
--machine-type=e2-micro \
--network=default \
--subnet=default \
--tags=http-server \
--metadata=startup-script='#! /bin/bash
 apt-get update
 apt-get install apache2 -y
 echo "Page served from: us-west1" | \
 tee /var/www/html/index.html
 systemctl restart apache2'
```

**Output:**

```apache
Created [https://www.googleapis.com/compute/v1/projects/routing-policy-lab/zones/us-west1-c/instances/us-web-vm].
NAME: us-web-vm
ZONE: us-west1-c
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.142.0.3
EXTERNAL_IP: 34.73.110.151
STATUS: RUNNING
```

### Launch server in `europe-west1`

*   Run the following to command:
    

```apache
gcloud compute instances create europe-web-vm \
--zone=europe-west1-b \
--machine-type=e2-micro \
--network=default \
--subnet=default \
--tags=http-server \
--metadata=startup-script='#! /bin/bash
 apt-get update
 apt-get install apache2 -y
 echo "Page served from: europe-west1" | \
 tee /var/www/html/index.html
 systemctl restart apache2'
```

**Output:**

```apache
Created [https://www.googleapis.com/compute/v1/projects/routing-policy-lab/zones/europe-west1-b/instances/europe-web-vm].
NAME: europe-web-vm
ZONE: europe-west1-b
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.154.0.3
EXTERNAL_IP: 35.234.156.62
STATUS: RUNNING
```

Click *Check my progress* to verify the objective.

Launch Server VMs

## Task 5. Setting up environment variables

Before you configure Cloud DNS, note the Internal IP addresses of the web servers. You need these IPs to create the routing policy. In this section, you will use the `gcloud compute instances describe` command to save the internal IP addresses as environment variables.

1.  Command to save IP address for the vm in `us-west1-c`:
    

```apache
export US_WEB_IP=$(gcloud compute instances describe us-web-vm --zone=us-west1-c --format="value(networkInterfaces.networkIP)")
```

2.  Command to save the IP address for vm in `europe-west1-b`:
    

```apache
export EUROPE_WEB_IP=$(gcloud compute instances describe europe-web-vm --zone=europe-west1-b --format="value(networkInterfaces.networkIP)")
```

## Task 6. Create the private zone

Now that your client and server VMs are running, it's time to configure the DNS settings. Before creating the A records for the web servers, you need to create the Cloud DNS Private Zone.

For this lab, use the `example.com` domain name for the Cloud DNS zone.

*   Use the `gcloud dns managed-zones create` command to create the zone:
    

```apache
gcloud dns managed-zones create example --description=test --dns-name=example.com --networks=default --visibility=private
```

**Output:**

```apache
Created [https://dns.googleapis.com/dns/v1/projects/routing-policy-lab/managedZones/example].
```

## Task 7. Create Cloud DNS Routing Policy

In this section, configure the Cloud DNS Geolocation Routing Policy. You will create a record set in the `example.com` zone that you created in the previous section.

### Create

*   Use the `gcloud dns record-sets create` command to create the geo.example.com recordset:
    

```apache
gcloud dns record-sets create geo.example.com \
--ttl=5 --type=A --zone=example \
--routing-policy-type=GEO \
--routing-policy-data="us-west1=$US_WEB_IP;europe-west1=$EUROPE_WEB_IP"
```

You are creating an A record with a Time to Live (TTL) of 5 seconds. The policy type is GEO, and the `routing_policy_data` field accepts a semicolon-delimited list of the format "region:{rrdata},${rrdata}".

**Output:**

```apache
NAME: geo.example.com.
TYPE: A
TTL: 5
DATA: us-west1: 10.142.0.3; europe-west1: 10.154.0.3
```

### Verify

*   Use the `dns record-sets list` command to verify that the `geo.example.com` DNS record is configured as expected:
    

```apache
gcloud dns record-sets list --zone=example
```

The output shows that an A record with a TTL of 5 is created for `geo.example.com`, and the data matches our server set up in each region.

**Output:**

```apache
NAME: example.com.
TYPE: NS
TTL: 21600
DATA: ns-gcp-private.googledomains.com.

NAME: example.com.
TYPE: SOA
TTL: 21600
DATA: ns-gcp-private.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 3600 259200 300

NAME: geo.example.com.
TYPE: A
TTL: 5
DATA: us-west1: 10.142.0.3; europe-west1: 10.154.0.3
```

Click *Check my progress* to verify the objective.

Create the Private Zone

## Task 8. Testing

It's time to test the configuration. In this section, you will SSH into all the client VMs. Since all of the web server VMs are behind the `geo.example.com` domain, you will use `cURL` command to access this endpoint.

Since you are using a Geolocation policy, the expected result is that:

*   The client in the US should always get a response from the `us-west1` region.
    
*   The client in Europe should always get a response from the `europe-west1` region.
    

### Testing from the client VM in `europe-west1`

1.  Use the `gcloud compute ssh` command to log into the client VM:
    

```apache
gcloud compute ssh europe-client-vm --zone europe-west1-b --tunnel-through-iap
```

2.  Follow prompts to SSH into the machine. When asked to enter the passphrase, leave the field blank and press the Enter key twice.
    

Once complete, the command line should change to "`user_name@europe-client-vm:~$`"

**Output:**

```apache
Warning: Permanently added 'compute.4621780534809863836' (ECDSA) to the list of known hosts.
Linux europe-client-vm 4.19.0-18-cloud-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
user_name@europe-client-vm:~$
```

### Use `curl` to access the web server

1.  Now that you are in the client VM, use the `cURL` command to access the `geo.example.com` endpoint. The loop is configured to run the command ten times with a sleep timer of 6 seconds:
    

```apache
for i in {1..10}; do echo $i; curl geo.example.com; sleep 6; done
```

Since the TTL on the DNS record is set to 5 seconds, a sleep timer of 6 seconds has been added. The sleep timer will make sure that you get an uncached DNS response for each cURL request. This command will take approximately one minute to complete.

The expected output is "Page served from: `europe-west1`":

```apache
1
Page served from: europe-west1
2
Page served from: europe-west1
3
Page served from: europe-west1
4
Page served from: europe-west1
5
Page served from: europe-west1
6
Page served from: europe-west1
7
Page served from: europe-west1
8
Page served from: europe-west1
9
Page served from: europe-west1
10
Page served from: europe-west1
```

2.  Run this test multiple times and analyze the output to see which server is responding to the request. The client should always receive a response from a server in the client's region.
    

### Getting back to Cloud Shell

*   Once you have run the test multiple times, exit the client VM in Europe by typing "`exit`" in the VM's command prompt. This will bring you back to the Cloud Shell console.
    

### Testing from the client VM in `us-west1`

Now perform the same test from the client VM in the US.

1.  Use the `gcloud` command below to SSH into the us-client-vm:
    

```apache
gcloud compute ssh us-client-vm --zone us-west1-c --tunnel-through-iap
```

2.  Use the `curl` command to access `geo.example.com`:
    

```apache
for i in {1..10}; do echo $i; curl geo.example.com; sleep 6; done
```

3.  Now analyze the output to see which server is responding to the request. The client should always receive a response from a server in the client's region. The expected output is "Page served from: `us-west1`".
    
4.  Once you have run the test multiple times, exit the client VM in the US by typing "`exit`" in the VM's command prompt.
    

### Testing from the client VM in `asia-southeast1`

So far you have tested the setup from `us-west1` and `europe-west1`. You have servers running in both the regions and have matching record sets for both the regions in Cloud DNS routing policy. There is no matching policy item for `asia-southeast1` in the Cloud DNS routing policy that was created in this lab.

The Geolocation policy will apply a "nearest" match for source location when the source of the traffic doesn't match any policy items exactly. This means that the client in the `asia-southeast1` region should be directed to the nearest web server.

In this section, you will resolve the `geo.example.com` domain from the client VM in Asia and will analyze the response.

1.  SSH into the us-client-vm:
    

```apache
gcloud compute ssh asia-client-vm --zone asia-southeast1-a --tunnel-through-iap
```

2.  Then access geo.example.com:
    

```apache
for i in {1..10}; do echo $i; curl geo.example.com; sleep 6; done
```

3.  Analyze the output to see which server is responding to the request. Since there is no policy item for `asia-southeast1`, Cloud DNS will direct the client to the nearest server.
    
4.  Once you have run the test multiple times, exit the client VM in Asia by typing "`exit`" in the VM's command prompt.
    

## Task 9. Delete lab resources

Although all resources you used in this lab will be deleted when you finish, it is good practice to remove resources you no longer need to avoid unnecessary charges.

*   The following `gcloud` commands will delete all the resources that were created in the lab:
    

```apache
#delete VMS
gcloud compute instances delete -q us-client-vm --zone us-west1-c

gcloud compute instances delete -q us-web-vm --zone us-west1-c

gcloud compute instances delete -q europe-client-vm --zone europe-west1-b

gcloud compute instances delete -q europe-web-vm --zone europe-west1-b

gcloud compute instances delete -q asia-client-vm --zone asia-southeast1-a

#delete FW rules
gcloud compute firewall-rules delete -q allow-http-traffic

gcloud compute firewall-rules delete fw-default-iapproxy

#delete record set
gcloud dns record-sets delete geo.example.com --type=A --zone=example

#delete private zone
gcloud dns managed-zones delete example
```

* * *

## Solution of Lab

### New Solution

<iframe type="youtube" src="https://www.youtube.com/watch?v=GL5XqImF6Mc" data-node-type="hn-embed"></iframe>

```apache
curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/GSP1008/lab.sh
source lab.sh
```

**Script Alternative**

```plaintext
curl -LO https://raw.githubusercontent.com/Itsabhishek7py/GoogleCloudSkillsboost/refs/heads/main/Cloud%20DNS%3A%20Traffic%20Steering%20using%20Geolocation%20Policy/drabhishek.sh
sudo chmod +x drabhishek.sh
./drabhishek.sh
```

* * *

### Quick

%\[https://youtu.be/nKnMSooJ7xo\]

```apache
export ZONE1=
export ZONE2=
export ZONE3=
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755425532100/4c47c7e2-0686-4535-9eec-a6585d81fa2f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755425548877/ac773c39-4a3e-4f65-88f3-e32f6dac60b1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755425556710/25ee9653-37ab-4ecb-8e9e-32d61e64a8bd.png align="center")

```apache
curl -LO raw.githubusercontent.com/Techcps/Google-Cloud-Skills-Boost/master/Cloud%20DNS%3A%20Traffic%20Steering%20using%20Geolocation%20Policy/techcps1008.sh
sudo chmod +x techcps1008.sh
./techcps1008.sh
```

* * *

### Manual

%\[https://youtu.be/aUs40Is874U\]

**Task 1:**

```apache
gcloud auth list
gcloud config list project
gcloud services enable compute.googleapis.com
gcloud services enable dns.googleapis.com
gcloud services list | grep -E 'compute|dns'
```

**Task 2:**

```apache
gcloud compute firewall-rules create fw-default-iapproxy \
--direction=INGRESS \
--priority=1000 \
--network=default \
--action=ALLOW \
--rules=tcp:22,icmp \
--source-ranges=35.235.240.0/20
gcloud compute firewall-rules create allow-http-traffic --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:80 --source-ranges=0.0.0.0/0 --target-tags=http-server
```

**Task 3:**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006188364/723ea06b-fc6f-4fb5-84a9-de57a57a6cc4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006209465/af2e0f7c-234a-4c97-b9c8-6db6aa21965d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006232125/9fd1ffe8-133e-45ba-87f4-64c4e01e8664.png align="center")

**Task 4:**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006339225/b2828ef4-6ed3-435a-8e18-c05728c40237.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006368458/cfc471db-69f3-4552-b9b8-bd60b7aaa221.png align="center")

**Task 5:**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006460135/984e0e5a-352d-4640-a990-20436d524ee4.png align="center")

**Task 6:**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006514906/972c8cb9-dd50-4031-8d68-5f2239330bff.png align="center")

**Task 7:**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006568869/edab0066-60b2-45b2-a9ce-79806534780a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756006627634/a8e0711d-1b03-4a9a-8635-be6613786f63.png align="center")
