GCP Network Deep Flashcards
What is a network endpoint group (NEG)?
Network endpoint groups (NEGs) are zonal resources that represent collections of IP address and port combinations for GCP resources within a single subnet. Each IP address and port combination is called a network endpoint.
What is a Secondary subnet range?
Secondary range you can apply to a subnet for use with alias IP ranges
Why would you use tags over service accounts for firewall rules?
Don’t need to restart VM to change, can have multiple tags on a VM
Why would you use service accounts over network tags for firewall rules?
Anyone can set any tag! Service accounts are resources with permissions.
What are the IP address ranges you need to assign when you build a GKE cluster?
“Node subnet
Services secondary range
Pods secondary range
Master IP range (for private clusters)”
What is an Ingress controller?
It is a GKE service that creates and manages an HTTP(s) load balancer on GCP. The backend can be a NEG.
What are the traits of a cloud network engineer?
1 year experience, use gcloud, use IAC, work with architects for network aspects.
What is Cymbal’s bank existing infrastructure?
What is the infrastructure going to look like?
4 shared VPCs
4 Projects, Dev, test, stage, and prod
Each VPC has six subnets in primary and secondary regions.
How do you connect the NCC Hub with other parts of your organization
VPC Spokes - each vpc is a separate spoke
Router Appliance
Cloud VPN,Cloud Interconnect spokes VLAN attachments
What’s a VPC Spoke?
VPC spokes let you connect two or more VPC networks to a hub so that the networks exchange IPv4 subnet routes. VPC spokes attached to a single hub can reference VPC networks in the same project or a different project
What are the 3 tiers in an SDN?
Application Layer
Control Layer
infrastructure Layer
what are the Google Cloud networking services?
Connect
Secure
Scale
Optimize
Modernize
what are the different network tiers for GCP?
Premium
Standard
What are the different connectivity options to connect VPCs to one another or another site?
Cloud Interconnect uses colocation (dedicated or partner)
Cloud VPN
Cloud Peering
Network Connectivity Center hub and spoke model
What is available with Cloud DNS?
Public DNS Zones
Global DNS
Private DNS Zones
Split Horizon DNS
DNS Peering
Security
How do you split up your VPCs?
Per environment or Per team
But, fewer VPCs are easier to manage and provide better resource utilization
What are the two different modes to create subnets?
Auto - Puts in all rules, etc…
Custom - You control subnets created and how they work
What is the difference between primary and secondary subnet CIDR ranges for IP Address
Secondary CIDR Range
Definition: Secondary CIDR ranges are additional IP ranges associated with a subnet to support specific GCP features, such as alias IPs or private Google access.
Characteristics:
Purpose: Used for purposes like:
Alias IP Ranges: Allowing VM instances to have multiple IP addresses from the secondary range.
Private Google Access: Enabling access to Google APIs and services from the private IP addresses in the VPC.
Allocation: Secondary CIDR ranges must be distinct from the primary range but can be within the same or different subnet.
Format: Also specified in CIDR notation (e.g., 10.2.0.0/16).
Key Differences
Functionality:
Primary: Used for the core IP addressing of VMs and other resources.
Secondary: Used for additional features like alias IPs and private Google services.
what are the two ways to figure how many subnets are required?
1-subnet per application
Create large subnets
Recommend use large subnet for simplicity
What services are affected by VPC Firewall
VM out
VM in
Implied Rules
Ingress Deny
Egress Allow
What are the differences for VPC firewall rules vs firewall policies?
Management Level:
Firewall Rules: Individual and directly applied to VPC networks.
Firewall Policies: Higher-level management tool for organizing and applying rules across multiple networks.
Flexibility:
Firewall Rules: Good for simpler setups where rules are managed individually.
Firewall Policies: Better for complex environments where centralized management of rules is beneficial.
Use Cases:
Firewall Rules: Suitable for straightforward, single-network environments or specific use cases within a single VPC.
Firewall Policies: Ideal for larger organizations or projects needing centralized control over multiple networks and a consistent security posture.
In summary, while firewall rules provide the granular control needed for specific network traffic management, firewall policies offer a way to efficiently manage and apply these rules across multiple networks and projects, facilitating better organization and consistency in complex environments.
what are the parts of a firewall policy
Priority
direction
Action
Source/Destination Filters
Target Type
Protocols and Ports
How are firewall policies are hierarchical?
Org
Folder
VPC
Global
Regional
What are the different parts of the shared VPC Network?
A Shared VPC (Virtual Private Cloud) network allows multiple Google Cloud projects to share a common VPC network, enabling better management, security, and resource allocation. The Shared VPC architecture is typically composed of several key parts:
Host Project: The host project owns the shared VPC network and its associated subnets, routes, and firewall rules. It is the central management point for the shared VPC.
Service Projects: Service projects are separate projects that use the shared VPC network provided by the host project. Resources like Compute Engine instances, GKE clusters, and App Engine in these service projects can connect to the shared VPC network.
Shared VPC Network: The VPC network that is shared among the host and service projects. It includes subnets, IP address ranges, and routes that are accessible across the participating projects.
Subnets: Subnetworks are specific IP address ranges within the shared VPC network, defined by the host project. These subnets can be accessed by resources in the host and service projects based on permissions.
Firewall Rules: Firewall rules control traffic to and from instances within the shared VPC network. These rules are defined at the VPC network level and apply to all instances across the host and service projects.
Routes: Routes are used to define how traffic is directed within the shared VPC network. This includes default routes, custom routes, and any peering or VPN-related routes.
Service Accounts and IAM Roles: Proper Identity and Access Management (IAM) configuration is crucial. Host and service projects use service accounts and IAM roles to manage permissions, defining which users or services can access and manage VPC resources.
DNS: Cloud DNS configurations can be shared across the shared VPC network, allowing consistent internal DNS resolution for resources across the host and service projects.
Network Peering: Allows the shared VPC network to connect with other VPC networks, both within the same organization or across different organizations, for broader network integration.
Network Connectivity Options: Includes VPN, Cloud Interconnect, or VPC peering configurations that extend the connectivity of the shared VPC network to on-premises networks or other cloud environments.
multiple NICs in a vm require what?
Each nic needs to be in a different network
You must configure the network interface when you configure the VM, you can’t add later.
Neworks must exist before you add the VM
The address ranges can’t overlap
You want to lower cloud networking cost and have no problem leveraging the public internet for cross-region traffic. Which network service tier is best for you?
Standard Tier
what is the decisions you should know before using standard and premium network tier?
Standard is lower cost
deploy backends
Users in multiple regins
Use public internet
No CDN or global load balancing
You are designing a virtual machine in the cloud to act as a network gateway between an external public network and a private internal network. To ensure strong security and traffic separation, what technology can you implement?
Mutliple NICs
ultiple NICs attached to separate VPC networks achieve the strongest traffic isolation and control for the gateway scenario.
You want to improve network performance. You are not comfortable using the public internet to route traffic. Which service tier is the best fit?
Premium Tier
What are the limitations with VPC Peering?
Not transitive
Can Span Multiple projects
what permissions are required to administer Shared VPC?
See below
How are the subnets arranged in a shared VPC?
What are situations where you sould use VPC network peering or Shared VPC
What are the advantages of network peering?
Network latency: Public IP networking results in higher latency than private networking.
Network security: Service owners do not need to have their services exposed to the public internet and deal with its associated risks.
Network cost: Google Cloud charges egress bandwidth pricing for networks using external IPs to communicate, even if the traffic is within the same zone. If, however, the networks are peered, they can use internal IPs to communicate and save on those egress costs. Regular network pricing still applies to all traffic.
Can you migrate a VM to a new network?
Must not be in a MIG
What is the rule with subnets and IP Address?
Cannot overlap with other subnets.
IP range must be a unique valid CIDR block.
New subnet IP ranges have to fall within valid IP ranges.
Can expand but not shrink.
Auto mode can be expanded from /20 to /16
What are the different route types in GCP?
- System Generated Routes
- Custom routes
- VPC Network Peering Routes
- NCC Routes
- Policy based Routes
What is a system generated default Route
When you create a VPC it includes a 0.0.0.0/0 default route.
what are some cons with the static route?
What are the rules with Dynamic Routes
When are routes created?
A route is created when a network is created, which enables traffic delivery from anywhere.
A route is created when a subnet is created.
This is what allows VMs on the same network to communicate.
If you don’t have custom static routes that meet the routing requirements for Private Google Access, deleting the default route
might disable Private Google Access.
To set up hybrid deployments for DNS resolution, which type of DNS policy should you use?
A DNS Server Policy allows you to configure inbound DNS forwarding from an on-premises environment to a GCP Virtual Private Cloud (VPC) or outbound DNS forwarding from a GCP VPC to on-premises or external DNS servers. This is crucial for hybrid cloud environments where DNS resolution needs to happen across on-premises and cloud networks.
Why Use a DNS Server Policy for Hybrid Deployments?
Inbound Forwarding: Allows on-premises resources to resolve DNS names for resources hosted in GCP.
Outbound Forwarding: Allows GCP resources to resolve DNS names for on-premises resources or external services not hosted in GCP.
How to Set Up a DNS Server Policy for Hybrid Deployments
Create a Cloud DNS Managed Zone: Define a managed zone in GCP with DNS records for your resources.
Configure a DNS Server Policy:
Use inbound forwarding to forward DNS queries from on-premises resources to GCP’s Cloud DNS.
Use outbound forwarding to forward DNS queries from GCP to on-premises DNS servers.
Establish a VPN or Interconnect: Set up a VPN or a dedicated interconnect between GCP and the on-premises network to facilitate DNS query forwarding.
Apply the DNS Server Policy: Attach the DNS server policy to the appropriate network or subnet in GCP to control DNS query flow.
Test the DNS Resolution: Verify that both GCP and on-premises resources can correctly resolve DNS queries across the hybrid environment.
You must create a VM that has an IPv6 address. How do you do it?
This is correct. Dual-stack subnets support both IPv4 and IPv6, allowing you to create VMs with both types of addresses.