80 questions with visual answers, click to reveal
A reference model that splits networking into seven layers, each handles one concern and talks to the layer above/below.
| Layer | PDU |
|---|---|
| 4β7 | Data / segments |
| 3 | Packet |
| 2 | Frame |
| 1 | Bits |
A bitmask that splits an IP into network vs host portions. AND with IP β network address.
| Notation | Hosts (approx) |
|---|---|
| /16 | 65k |
| /24 | 254 |
| /28 | 14 |
DNS maps human-readable names to IPs (and other records). Hierarchical, distributed database.
Dynamic Host Configuration Protocol, automates IP assignment and options (gateway, DNS, lease time).
RFC 1918 ranges not routable on the public internet, reused behind NAT.
| Range | CIDR |
|---|---|
| 10.0.0.0 β 10.255.255.255 | 10.0.0.0/8 |
| 172.16.0.0 β 172.31.255.255 | 172.16.0.0/12 |
| 192.168.0.0 β 192.168.255.255 | 192.168.0.0/16 |
Address Resolution Protocol, maps IP β MAC on the same L2 segment.
Virtual LAN, logical broadcast domain on switches without rewiring. Tagged with 802.1Q VLAN ID on trunks.
| Port | Protocol |
|---|---|
| 22 | SSH |
| 53 | DNS |
| 80 | HTTP |
| 443 | HTTPS |
| 25 | SMTP |
Plaintext L7 protocol. Port 80 default. Fast to debug, insecure on untrusted networks.
HTTP over TLS. Port 443. Encryption + server identity (certs) + integrity.
Virtual Private Cloud, your private software-defined network in Google Cloud: subnets, routes, firewall, connectivity to on-prem and other VPCs.
Network Address Translation, many private hosts share one (or few) public IPs. Rewrites src/dst IP:port in packets.
A policy engine that permits or denies traffic based on rules (IP, port, protocol, identity, app).
| Type | Inspects |
|---|---|
| Stateful | Tracks sessions (TCP/UDP flows) |
| Stateless | Each packet in isolation |
| WAF / L7 | HTTP headers, URLs |
Media Access Control, 48-bit (usually) hardware address on NICs. Unique per interface; used for L2 delivery on Ethernet.
Switches learn MAC β port via source frames.
| Device | Layer | Behavior |
|---|---|---|
| Hub | L1 | Repeats to all ports, collision domain |
| Switch | L2 | Frames to MAC destination, per-port collision domains |
| Router | L3 | Routes between IP subnets |
Internet Control Message Protocol, diagnostics and errors for IP (not for app data like TCP payloads).
128-bit addresses, vastly larger space than IPv4; simplifies some features (SLAAC, larger headers options).
32-bit; NAT-heavy; dotted decimal
128-bit; hex groups; end-to-end possible
Content Delivery Network, edge caches close to users; origin shielded; lower latency for static assets.
Distributes traffic across healthy backends, improves capacity and availability.
Sits near clients. Outbound web filter, anonymity, corporate egress.
Sits in front of servers. TLS termination, routing, caching (e.g. Ingress).
NAT maintains a translation table: (private IP:port) β (public IP:port). Outbound packets get SNAT; return traffic matches the session.
| Inside | Outside |
|---|---|
| 10.0.0.5:4444 | 203.0.113.1:9001 |
Synchronizes sequence numbers and confirms both sides can send/receive before data transfer.
Border Gateway Protocol, inter-domain routing on the internet. ASes exchange prefixes and path attributes (AS-PATH, communities).
| Phase | Purpose |
|---|---|
| Negotiate | Cipher suites, TLS version, extensions |
| Authenticate | Server (and optionally client) cert |
| Keys | ECDHE β shared secret β session keys |
Stateful VPC firewall, rules match direction, priority, targets (tags, SA, CIDR), and Layer 4 (and FQDN/region tags in some policies).
Managed SNAT for VMs without public IPs to reach the internet (outbound). Inbound initiated from internet not allowed without LB or IAP.
| LB | Scope | Layer |
|---|---|---|
| External HTTP(S) | Global / regional | L7 |
| Internal HTTP(S) | Regional | L7 |
| TCP/UDP Network | External or internal | L4 pass-through |
| Proxy vs passthrough | , | SSL proxy, TCP proxy |
Default bridge creates a Linux bridge; containers get veth pairs; docker0 (or custom bridge) SNATs outbound via host IP.
Tags Ethernet frames with a 4-byte VLAN tag (TPID + TCI) so multiple VLANs share one physical trunk between switches.
| Msg | Who |
|---|---|
| D | Client broadcast, need IP |
| O | Server(s) propose lease |
| R | Client picks server/address |
| A | Server confirms + options |
Two VPCs connect privately. Separate admins; no transitive peering; non-overlapping RFC1918.
Host project owns network; service projects attach subnets. Centralized network admin.
IPsec tunnels between GCP HA VPN gateway and peer (on-prem or other cloud). Traffic encrypted over internet; routes via Cloud Router (BGP) or static.
| Type | Reachability |
|---|---|
| ClusterIP | Internal only (default) |
| NodePort | HostPort range on nodes |
| LoadBalancer | Cloud LB + external IP |
| ExternalName | CNAME to external DNS |
Edge security policy for HTTP(S) Load Balancing, WAF rules, IP allow/deny lists, rate limiting, bot management, adaptive protection.
IP + TCP/UDP ports. Fast, transparent. No HTTP routing or cookies.
Understands HTTP, host/path headers, TLS, redirects, WAF integration.
| Tier | Path |
|---|---|
| Premium | Google global backbone, enters/exits near users |
| Standard | ISP paths for egress; lower cost, less predictable |
Lets VMs with only private IPs reach Google APIs and services (e.g. GCS, BigQuery) via Googleβs private connectivity, no public internet for those calls.
Attacker sends fake ARP replies so victims map gateway IP to attacker MAC, MITM risk on L2.
Each layer wraps payload with its header; peer strips on receive. MTU shrinks as headers stack (e.g. IPsec, GRE).
Outer frame carries inner packet
Managed BGP speaker, exchanges routes with Cloud VPN, Cloud Interconnect, or partner attachments; creates dynamic routes in VPC.
API object + controller that programs an L7 proxy (e.g. GCE, nginx, GKE Ingress) with host/path rules to Services.
Mutual TLS, both client and server present certificates; strong service identity for east-west traffic (common in service mesh).
Usually server-only cert
Client cert + server cert
Classless Inter-Domain Routing, prefix length /n defines network size flexibly; ended waste of Class A/B/C rigid boundaries.
| Old | Issue |
|---|---|
| Classful | Only 3 sizes; routing tables exploded |
| CIDR | Aggregate routes (supernetting) |
Use Shared VPC: host project for networking; each team = service project with subnets in agreed regions. Central firewall policies + hierarchical guardrails.
| Check | Tooling |
|---|---|
| Network vs app | p95 per hop, connection reuse |
| K8s | CoreDNS, kube-proxy, CNI |
| GCP | LB logs, VPC Flow Logs, SRE golden signals |
Global HTTPS LB β multi-MIG / serverless NEG in β₯2 regions. Spanner or replicated DB; GCS dual-region or multi-region. Health checks drive failover.
Security perimeter around Google-managed services, limits data exfil via compromised creds; defines ingress/egress policies to projects/VPCs.
| Area | Action |
|---|---|
| IKE | Match phase1/2 timers, PFS, encryption |
| BGP | Hold timer, ASN, MD5 off |
| Path MTU | TCP MSS clamp / reduce packet size |
| NAT-T | UDP 4500 if behind PAT |
Nodes in VPC subnets; Pod CIDR routes (VPC-native alias IPs). kube-proxy or eBPF dataplane; Ingress/Gateway API β GCLB.
Private fiber to Google POP, highest bandwidth & stability; 10G/100G; longer lead time.
Reach Google via carrier, faster to provision; good when no POP in building.
Avoid overlap in design. If unavoidable: re-IP one side, or use NAT/custom routes so advertised prefixes donβt collide.
Private endpoint in consumer VPC to producer service, traffic stays on Google backbone; no public IPs required.
Identity-aware access (IAP), BeyondCorp-style: verify user + device + context every request, no trusted βinside.β
| Check | Why |
|---|---|
| MTU 1460 | GCE VPC MTU defaults |
| Tags / SA | Rule target mismatch |
| ILB as next-hop | Asymmetric paths |
Cloud Router advertises VPC subnet routes (and custom learned routes) to peer over VPN/Interconnect; learns remote prefixes from peer.
L3/L4 rules enforced by CNI, select pods by labels/namespaces; allow ingress/egress to CIDR or pod selectors.
Cache static at edge; short TTL for HTML; versioned asset URLs; origin shield; split live vs VOD.
Host project owns VPC; standalone projects attach as service projects, use subnets granted by host admin.
Forecast VMs, GKE nodes, PSC, ILB proxies; reserve for auto-scaling; use secondary ranges for pods/services.
| Item | Tip |
|---|---|
| GKE | /20+ per cluster per region often |
| Proxy-only | Dedicated subnets for L7 ILB |
Org/folder-level policies that apply to VPC networks under them, enforce deny/allow guardrails project teams cannot weaken.
Managed Anthos Service Mesh or Istio on GKE, sidecar or ambient; mTLS, traffic policies, observability.
Area 0 backbone; other areas connect through ABRs, contains LSA flooding, speeds SPF, improves stability.
Inbound/outbound forwarding zones; Cloud DNS β on-prem BIND with conditional forwarding; split-horizon for private zones.
| Signal | Source |
|---|---|
| Flow logs | VPC sampling / full |
| LB | Request logs, Armor |
| Synthetic | Uptime checks |
| Dashboards | Cloud Monitoring SLO |
Redundant VLAN attachments in same/different metros; BGP over multiple paths; LAG on-prem where possible.
Each pod gets an IP (CNI); same-node pods share bridge; cross-node via overlay or routed VPC.
Stable VIP β iptables/IPVS to pod endpoints
Name β ClusterIP
Global anycast or geo-DNS β regional LBs; stateless tiers scale horizontally; data layer with conflict-free strategy (CRDT, sharding, or active-passive DB per shard).
Few Shared VPCs per environment; folder hierarchy maps to policy; centralized DNS and egress; project factory with CIDR pools.
Authoritative DNS at multiple POPs with same IP anycast; low TTL for failover; health checks steer bad edges.
Edge compute + cache; keep data near users; avoid cross-region chatter; WebSockets/gRPC keep-alive; premium backbone.
| Lever | Action |
|---|---|
| Read-heavy | CDN + stale-while-revalidate |
| Write-heavy | Regional cells, async replication |
RTO/RPO drive design: cold/warm/hot DR site; DNS failover; replicate VPC configs as IaC; runbooks for BGP/LB cutover.
Hub transit (cloud router appliance or native) with consistent segmentation; avoid flat peering mesh; centralized logging.
Google edge absorbs volumetric; Cloud Armor rate limits + geo blocks + adaptive protection; origin only sees scrubbed traffic.
PCI/HIPAA-style zones: CDE isolated; jump hosts + IAP; no direct internet to data tier; audit all east-west.
Time to value, SRE baked in, vendor limits on advanced L7
Control, custom protocols; ops burden + PoP cost
Start with IdP + SSO; SD-WAN or hub-spoke VPN; split offices into sites; RFC1918 plan; later add ZTNA instead of flat VPN.