Posts

Configuring VPC Network Peering

Image
  Configuring VPC Network Peering Configuring VPC Network Peering VPC Network Peering in Google Cloud allows two VPC networks to communicate privately using internal IP addresses , without sending traffic over the public internet. Simple example Suppose you have: VPC-A VPC-B 10.10.0.0/16 10.20.0.0/16 │ │ VM-A ───── VPC Peering ───── VM-B 10.10.0.5 10.20.0.5 VM-A can communicate with VM-B using: 10.20.0.5 There is no need for an external/public IP for this communication. How it works Normally: VPC-A ❌ VPC-B They are isolated. After peering: VPC-A ←──── private connection ────→ VPC-B Routes are automatically exchanged between the peered VPC networks. Important points to remember Concept VPC Peering Communication Private Uses internal IPs ✅ Public internet required ❌ Same organization Not required Same project Not required Different projects ✅ Different organizations ✅ Autom...

GCP Networking — Logging & Traffic Analysis

GCP Networking — Logging & Traffic Analysis 1. What is Cloud Logging? Cloud Logging collects and stores logs generated by Google Cloud resources. In this section, the main focus is on: VPC Flow Logs Flow Analyzer Packet Mirroring Cloud NAT Logging Exporting logs to BigQuery Visualizing logs using Data Studio / Looker Studio Simple flow VM / VPC ↓ Traffic & Logs ↓ Cloud Logging ↓ BigQuery ↓ Data Studio / Looker Studio ↓ Reports & Dashboards 2. VPC Flow Logs What is it? VPC Flow Logs record sampled information about network traffic going to and from VM instances. Think of it as a network traffic diary . For example: VM-A 10.10.0.2 | | TCP traffic ↓ VM-B 10.50.0.2 VPC Flow Logs can tell you things such as: Who communicated with whom? Which port was used? Which protocol? How much data was transferred? When did the communication happen? Important VPC Flow Logs are enabled per subnet . If you enable Flow Logs on: Subnet-A then the VM instances inside tha...