| 1 | What happens when you type google.com in browser? | DNS → TCP handshake → TLS handshake → HTTP GET → Server processes → Response → Browser renders |
| 2 | TCP vs UDP? | TCP: reliable, ordered, connection-oriented. UDP: fast, no guarantees, connectionless. |
| 3 | What is a 3-way handshake? | SYN(seq=x) → SYN-ACK(seq=y, ack=x+1) → ACK(ack=y+1). Synchronizes sequence numbers. |
| 4 | Why 3-way not 2-way? | Both sides must confirm they can send AND receive. Prevents stale SYN from creating ghost connections. |
| 5 | What is TIME_WAIT? | 2×MSL wait after closing. Prevents old segments from polluting new connections on same 5-tuple. |
| 6 | OSI vs TCP/IP? | OSI: 7 layers, theoretical. TCP/IP: 4 layers, practical. TCP/IP merges Session/Presentation into Application. |
| 7 | What is NAT? | Translates private IP:port to public IP:port. PAT allows many hosts to share one public IP. |
| 8 | How does DNS work? | Client→recursive resolver→root NS→TLD NS→authoritative NS. Caches at each level with TTL. |
| 9 | DNS TCP or UDP? | Both. UDP for queries (<512B, or 4096 with EDNS0). TCP for zone transfers and large responses. |
| 10 | What is a subnet mask? | Separates network bits from host bits. /24 = 255.255.255.0 = 256 addresses, 254 usable. |
| 11 | L4 vs L7 load balancer? | L4: routes by IP:port (fast). L7: routes by HTTP content (URL, headers, cookies). |
| 12 | How does HTTPS work? | TCP → TLS handshake (key exchange + cert verification) → encrypted HTTP inside TLS tunnel. |
| 13 | TLS 1.2 vs 1.3? | 1.3: 1-RTT (vs 2), only ECDHE (forward secrecy mandatory), 5 cipher suites, encrypted handshake. |
| 14 | What is CORS? | Browser mechanism to allow cross-origin requests. Server sets Access-Control-Allow-Origin header. |
| 15 | What is a CDN? | Edge servers cache content close to users. Reduces latency and origin server load. |
| 16 | What is ARP? | Maps IP→MAC on local network. Broadcast request, unicast reply. |
| 17 | What is a VLAN? | Logically segments a switch into separate broadcast domains. Inter-VLAN requires L3. |
| 18 | Routing vs forwarding? | Routing = building the table (control plane). Forwarding = using it per-packet (data plane). |
| 19 | What is BGP? | Internet routing protocol between autonomous systems. Path-vector, TCP:179, policy-based. |
| 20 | What is TTL? | Time To Live in IP header. Decremented per hop. 0 = drop + ICMP Time Exceeded. Prevents loops. |
| 21 | TCP flow control? | Receiver advertises rwnd (receive window). Sender can't exceed it. Prevents overwhelming receiver. |
| 22 | TCP congestion control? | Sender maintains cwnd. Slow start (exponential) → congestion avoidance (linear/AIMD). Actual rate = min(cwnd, rwnd). |
| 23 | What is DHCP? | Auto-assigns IP, mask, gateway, DNS to hosts. DORA: Discover→Offer→Request→Acknowledge. |
| 24 | HTTP/1.1 vs HTTP/2? | HTTP/2: binary framing, multiplexed streams, header compression. Still has TCP HOL blocking. |
| 25 | What is HTTP/3? | HTTP over QUIC (UDP). No HOL blocking, 1-RTT handshake, 0-RTT resumption, connection migration. |
| 26 | What is WebSocket? | Full-duplex over single TCP connection. Starts as HTTP upgrade. Low overhead per message. |
| 27 | What is gRPC? | Google RPC: HTTP/2 + protobuf (binary). 4 patterns: unary, server/client/bidi streaming. |
| 28 | What is Anycast? | Same IP from multiple locations via BGP. Traffic goes to nearest. Used for DNS, CDN, DDoS. |
| 29 | Forward vs reverse proxy? | Forward: sits in front of clients (anonymity). Reverse: sits in front of servers (LB, SSL, caching). |
| 30 | What is HSTS? | Header that forces HTTPS for a domain. Prevents SSL stripping. Preload = hardcoded in browser. |
| 31 | Stateless vs stateful firewall? | Stateless: inspects each packet independently. Stateful: tracks connections, auto-allows return traffic. |
| 32 | What is MTU? | Maximum Transmission Unit. Ethernet = 1500 bytes. Packets exceeding MTU are fragmented or dropped (DF bit). |
| 33 | What is consistent hashing? | Hash ring where adding/removing server remaps only ~1/N keys (vs ~100% with modulo). |
| 34 | CLOSE_WAIT vs TIME_WAIT? | CLOSE_WAIT: remote closed, local didn't close (bug!). TIME_WAIT: both closed, waiting for stale packets (normal). |
| 35 | What is SYN flood? | Attack: send many SYNs without ACK → fill server's SYN queue. Defense: SYN cookies. |
| 36 | What is epoll? | Linux API for monitoring many FDs. Returns only ready FDs (O(k) vs select's O(n)). Solved C10K. |
| 37 | What is a service mesh? | Sidecar proxies (Envoy) handling inter-service traffic: mTLS, observability, traffic management. |
| 38 | What is eBPF? | Sandboxed programs in the Linux kernel. Used for networking (Cilium), observability, security. |
| 39 | IPv4 vs IPv6? | v4: 32-bit, 4.3B addresses, NAT. v6: 128-bit, no NAT needed, simplified header, no broadcast. |
| 40 | What is ICMP? | Control protocol for IP. Used by ping (type 8/0), traceroute (type 11), and error messages (type 3). |
| 41 | TCP Fast Open? | Send data in SYN packet using cached cookie. Saves 1 RTT on repeat connections. |
| 42 | What is SACK? | Selective ACK. Receiver reports non-contiguous received blocks. Sender retransmits only gaps. |
| 43 | Connection pooling? | Reuse established connections. Saves handshake overhead. Pool size via Little's Law: L=λ×W. |
| 44 | What is QUIC? | UDP-based transport with built-in TLS 1.3, stream multiplexing, connection migration. Used by HTTP/3. |
| 45 | Why QUIC uses UDP? | Middlebox ossification: NATs/firewalls drop unknown protocols. UDP passes through existing infra. |
| 46 | What is zero-copy? | Avoid copying data between kernel/user space. sendfile() goes file→socket in kernel. Nginx uses this. |
| 47 | What is DPDK? | User-space networking: poll-mode NIC drivers, hugepages. Bypasses kernel for ultra-low latency. |
| 48 | Does HTTPS encrypt the URL? | Path/query: yes. Domain: visible in DNS query and TLS SNI (unless DoH + ECH). |
| 49 | What is certificate pinning? | App hardcodes expected cert/key hash. Prevents CA compromise attacks. Deprecated in browsers. |
| 50 | Debug slow-but-reachable service? | ping (RTT) → traceroute (hop latency) → curl timing (DNS/connect/TLS/TTFB) → ss (conn states) → tcpdump (retransmissions) |