Every concept in diagrams. Zero paragraphs, 100% visual.
Mnemonic: "All People Seem To Need Data Processing"
| Layer | PDU | Device |
|---|---|---|
| 7 Application | Data | — |
| 6 Presentation | Data | — |
| 5 Session | Data | — |
| 4 Transport | Segment | — |
| 3 Network | Packet | Router |
| 2 Data Link | Frame | Switch |
| 1 Physical | Bits | Hub / Cable |
PDU = Protocol Data Unit
⭐ Star
Central hub/switchBus
Single backbone🔵 Ring
Circular data flow🕸️ Mesh
Every node connected🌳 Tree
Hierarchical| Class | Range | Mask | Use |
|---|---|---|---|
| A | 1–126.x.x.x | /8 | Large orgs |
| B | 128–191.x.x.x | /16 | Medium orgs |
| C | 192–223.x.x.x | /24 | Small orgs |
| D | 224–239.x.x.x | — | Multicast |
| E | 240–255.x.x.x | — | Research |
| Class | Range | CIDR |
|---|---|---|
| A | 10.0.0.0 — 10.255.255.255 | 10.0.0.0/8 |
| B | 172.16.0.0 — 172.31.255.255 | 172.16.0.0/12 |
| C | 192.168.0.0 — 192.168.255.255 | 192.168.0.0/16 |
| Type | Prefix | Scope |
|---|---|---|
| Global Unicast | 2000::/3 | Internet |
| Link-Local | fe80::/10 | Same link only |
| Unique Local | fc00::/7 | Private |
| Multicast | ff00::/8 | One-to-many |
| Loopback | ::1 | Self |
IP = Network Part + Host Part — Subnet mask tells where to split
192.168.1.0/24
N = Network (24 bits) H = Host (8 bits)
Mask: 255.255.255.0 → Usable hosts: 2⁸ - 2 = 254
| CIDR | Mask | Hosts | Usable |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Usable = Total - 2 (network + broadcast)
After 3-way handshake → data transfer begins
| Type | Purpose | Example |
|---|---|---|
| A | Name → IPv4 | google.com → 142.250.x.x |
| AAAA | Name → IPv6 | google.com → 2607:f8b0:… |
| CNAME | Alias | www → google.com |
| MX | Mail server | Priority + mail host |
| NS | Nameserver | ns1.google.com |
| TXT | Text (SPF, DKIM) | Verification strings |
| PTR | Reverse lookup | IP → Name |
| SOA | Start of Authority | Zone info |
| SRV | Service locator | _sip._tcp.example.com |
| Type | How |
|---|---|
| Static NAT | 1 Private → 1 Public (permanent) |
| Dynamic NAT | Pool of Public IPs, on demand |
| PAT / Overload | Many Private → 1 Public (using ports) |
PAT is most common — your home router uses it!
| Protocol | Type | Algorithm | Metric |
|---|---|---|---|
| RIP | IGP — Distance Vector | Bellman-Ford | Hop count (max 15) |
| OSPF | IGP — Link State | Dijkstra SPF | Cost (bandwidth) |
| EIGRP | IGP — Hybrid | DUAL | Bandwidth+delay |
| BGP | EGP — Path Vector | Best path | AS path, policies |
| IS-IS | IGP — Link State | Dijkstra | Cost |
| GET | Read |
| POST | Create |
| PUT | Update (full) |
| PATCH | Update (partial) |
| DELETE | Remove |
| HEAD | Headers only |
| OPTIONS | Supported methods |
| 1xx | Informational |
| 2xx | Success ✓ |
| 3xx | Redirect |
| 4xx | Client Error |
| 5xx | Server Error |
| Type | Use | Protocol |
|---|---|---|
| Site-to-Site | Connect 2 offices | IPsec |
| Remote Access | User → corp network | SSL/TLS, IPsec |
| Client-based | App on device | OpenVPN, WireGuard |
| Type | Layer | How |
|---|---|---|
| Packet Filter | L3/L4 | IP + port rules (stateless) |
| Stateful | L3/L4 | Tracks connection state |
| WAF | L7 | Inspects HTTP content |
| NGFW | L3-L7 | DPI + IPS + app awareness |
| Proxy | L7 | Intermediary for traffic |
| Algorithm | How |
|---|---|
| Round Robin | 1→2→3→1→2→3 |
| Least Connections | Least busy server |
| IP Hash | Same client → same server |
| Weighted | Powerful server gets more |
| Standard | Name | Freq | Speed |
|---|---|---|---|
| 802.11n | WiFi 4 | 2.4/5 GHz | 600 Mbps |
| 802.11ac | WiFi 5 | 5 GHz | 6.9 Gbps |
| 802.11ax | WiFi 6/6E | 2.4/5/6 GHz | 9.6 Gbps |
| Tool | Purpose |
|---|---|
| ping | Test connectivity |
| traceroute | Path to dest |
| nslookup/dig | DNS queries |
| netstat/ss | Connections |
| tcpdump | Packet capture |
| wireshark | GUI analyzer |
| nmap | Port scanner |
| curl | HTTP requests |
| Protocol | Use |
|---|---|
| RADIUS | Central network auth |
| TACACS+ | Cisco auth (separates AAA) |
| 802.1X | Port-based access control |
| Kerberos | Ticket-based (AD) |
| LDAP | Directory services |
AAA = Authentication, Authorization, Accounting
Every GCP service mapped to fundamentals above
| Type | Scope | Notes |
|---|---|---|
| Internal IP | Regional | From subnet CIDR |
| External IP | Reg/Global | Ephemeral or static |
| Alias IP | VM | Multiple IPs (GKE pods) |
| PGA | Subnet | Reach Google APIs privately |
Default Rules (can't delete):
| ✅ Egress allow all | 65535 |
| ❌ Ingress deny all | 65535 |
| Type | Created By |
|---|---|
| System-generated | Auto: default (0.0.0.0/0) + subnet routes |
| Custom static | You create (CIDR → next hop) |
| Dynamic (BGP) | Cloud Router learns from peers |
| Type | L | Scope | Traffic |
|---|---|---|---|
| External HTTP(S) | L7 | Global | External HTTP/S |
| Internal HTTP(S) | L7 | Regional | Internal HTTP/S |
| External Network | L4 | Regional | External TCP/UDP |
| Internal TCP/UDP | L4 | Regional | Internal TCP/UDP |
| TCP Proxy | L4 | Global | External TCP |
| SSL Proxy | L4 | Global | External SSL |
| Concept | GCP Service | Scope |
|---|---|---|
| Private Network | VPC | Global |
| Subnet | VPC Subnet | Regional |
| Firewall | VPC Firewall Rules | Global |
| NAT | Cloud NAT | Regional |
| DNS | Cloud DNS | Global |
| Load Balancer | Cloud Load Balancing | Global/Regional |
| VPN | Cloud VPN (HA/Classic) | Regional |
| Dedicated Link | Cloud Interconnect | Regional |
| Peering | VPC Peering | Global |
| Multi-project | Shared VPC | Org |
| WAF / DDoS | Cloud Armor | Global |
| CDN | Cloud CDN | Global |
| Packet Capture | Packet Mirroring | Regional |
| Monitoring | Network Intelligence Center | Global |
| Service Mesh | Traffic Director | Global |
| Private API | PGA / PSC | Subnet/VPC |
| Flow Logging | VPC Flow Logs | Subnet |