{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "5d3d7989-2c36-4811-9469-5e6be6ef6990", "metadata": {}, "outputs": [], "source": [ "string = \"\"\"\n", "You are working as a network administrator for a company with\n", "two subnets (subnet-a and subnet-b) in their default VPC. The company’s\n", "database servers are located in subnet-a, while the application servers and web\n", "servers operate in subnet-b. Your task is to configure a firewall rule that permits\n", "database traffic exclusively from the application servers to the database servers.\n", "What steps should be taken to accomplish this?\n", "A. • Create service accounts sa-app and sa-db. • Associate service account sa-\n", "app with the application servers and the service account sa-db with the database\n", "servers. • Create an ingress firewall rule to allow network traffic from source\n", "service account sa-app to target service account sa-db.\n", "B. Create network tags db-server and app-server. • Add the db-server tag to\n", "the application servers and the app-server tag to the database servers. • Create\n", "an egress firewall rule to allow network traffic from source network tag db-server\n", "to target network tag app-server.\n", "C. Create a service account sa-app and a network tag db-server. • Associate the\n", "service account sa-app with the database servers and the network tag db-server\n", "with the application servers. • Create an ingress firewall rule to allow network\n", "traffic from source service account sa-app to target network tag db-server.\n", "D. Create a service account sa-app and a network tag app-server. • Add the\n", "service account sa-app to the application servers and the network tag app-server\n", "to the database servers. • Create an ingress firewall rule to allow network traffic\n", "from source VPC IP addresses and target the subnet-b IP addresses\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 2, "id": "bf144f00-fce3-4842-abf3-37d244bf4192", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "' You are working as a network administrator for a company with two subnets (subnet-a and subnet-b) in their default VPC. The company’s database servers are located in subnet-a, while the application servers and web servers operate in subnet-b. Your task is to configure a firewall rule that permits database traffic exclusively from the application servers to the database servers. What steps should be taken to accomplish this? A. • Create service accounts sa-app and sa-db. • Associate service account sa- app with the application servers and the service account sa-db with the database servers. • Create an ingress firewall rule to allow network traffic from source service account sa-app to target service account sa-db. B. Create network tags db-server and app-server. • Add the db-server tag to the application servers and the app-server tag to the database servers. • Create an egress firewall rule to allow network traffic from source network tag db-server to target network tag app-server. C. Create a service account sa-app and a network tag db-server. • Associate the service account sa-app with the database servers and the network tag db-server with the application servers. • Create an ingress firewall rule to allow network traffic from source service account sa-app to target network tag db-server. D. Create a service account sa-app and a network tag app-server. • Add the service account sa-app to the application servers and the network tag app-server to the database servers. • Create an ingress firewall rule to allow network traffic from source VPC IP addresses and target the subnet-b IP addresses '" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "one_line = string.replace(\"\\n\", \" \")\n", "one_line" ] }, { "cell_type": "code", "execution_count": null, "id": "1d91d618-c1bf-434c-890e-e5610782643b", "metadata": {}, "outputs": [], "source": [ "# Ch 12 Q2\n", "# You are an IT Specialist at a technology company, and your Dataproc cluster runs in a single Virtual Private Cloud (VPC) network in a single subnetwork with range 172.16.20.128/25. The subnetwork runs out of private IP addresses. Your manager asks you to find a way to add new VMs for communication with the cluster while minimizing the steps involved. What should you do? A. Create a new subnetwork in the existing VPC with a range of 172.16.21.0/24 and configure the VMs to use that subnetwork. B. Create a new VPC network for the VMs with a subnet of 172.32.0.0/16. Enable VPC network Peering between the Dataproc VPC network and the VMs VPC network. Configure a custom Route exchange. C. Configure Shared VPC for the existing VPC and add the VMs to a new subnetwork in the Shared VPC. D. Modify the existing subnet range to 172.16.20.0/24" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.2" } }, "nbformat": 4, "nbformat_minor": 5 }