Answer each one out loud first, then tap it to check yourself against a model answer and the lesson behind it.
Layer 7 is the application layer: HTTP, DNS, TLS. They mean the network path works but the application or its protocol is failing. Confirm it by showing the TCP connection succeeds (nc -zv) and then reading the HTTP status or error with curl -v.
Read the lesson: How networks work: layers, packets and the next hop →MAC addresses only matter on the local link. The route table sends anything off the local subnet to the default gateway, and ARP finds the gateway's MAC. Each router rewraps the frame for its next hop while the destination IP stays the same.
Read the lesson: How networks work: layers, packets and the next hop →The HTTP request is the payload of a TCP segment, which adds ports; that sits inside an IP packet, which adds source and destination addresses; that sits inside an Ethernet frame, which adds MAC addresses. Each layer reads only its own header, which is why tcpdump -e shows MACs, then IPs and ports, then TCP flags.
Read the lesson: How networks work: layers, packets and the next hop →ip addr (or ip -br addr) for interfaces and addresses, ip route for where traffic goes next including the default gateway, and ip neigh for the ARP cache mapping neighbour IPs to MACs. They replace ifconfig, route and arp from the deprecated net-tools package.
Read the lesson: How networks work: layers, packets and the next hop →32 bits minus 20 fixed bits leaves 12 host bits, and 2 to the 12th is 4,096 addresses. In a cloud subnet a few are reserved (five per subnet in AWS), so slightly fewer are usable.
Read the lesson: IP addressing and subnets: reading CIDR →Give each a separate, non-overlapping range from private space, such as 10.10.0.0/16, 10.20.0.0/16 and 10.30.0.0/16, split into /24 subnets per zone and tier with gaps for growth. Overlapping ranges can't be peered or routed between, and changing a VPC's range later means rebuilding.
Read the lesson: IP addressing and subnets: reading CIDR →10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). They're never routed on the internet, so a router or NAT gateway rewrites the private source address to a public one on the way out and back on the way in.
Read the lesson: IP addressing and subnets: reading CIDR →No. fe80::/10 is IPv6 link-local: every interface creates one itself and it only works on the local link. A globally routable IPv6 address starts with 2 or 3 and needs no NAT.
Read the lesson: IP addressing and subnets: reading CIDR →The client sends SYN with its starting sequence number, the server replies SYN-ACK with its own and acknowledges the client's, and the client sends ACK. Only then does data flow. It costs a full round trip, which is why connection reuse matters.
Read the lesson: TCP, UDP and ports: refused is not timed out →Refused is an immediate TCP reset: the host is reachable but nothing listens on that port, so check the app, its port and bind address. A timeout means the SYN got no answer: a firewall or security group dropped it, there is no route, or the host is down, so check the path.
Read the lesson: TCP, UDP and ports: refused is not timed out →Run ss -tlnp on the server and look at the local address. If it listens on 127.0.0.1 it accepts only local connections; it must bind to 0.0.0.0 or the server's IP. If it already does, check host and cloud firewalls next.
Read the lesson: TCP, UDP and ports: refused is not timed out →When speed and low overhead matter more than guaranteed delivery: DNS lookups, NTP, voice and video, and metrics like StatsD. UDP has no handshake or acknowledgements, so the application handles loss itself. QUIC and HTTP/3 add their own reliability on top of UDP.
Read the lesson: TCP, UDP and ports: refused is not timed out →The stub resolver checks /etc/hosts, then asks the recursive resolver from /etc/resolv.conf. On a cache miss, the resolver asks a root server for the .com servers, asks a .com server for example.com's name servers, and asks the authoritative server for the A record. It caches each answer for its TTL.
Read the lesson: DNS: how names become addresses →Well before the change, lower the record's TTL (for example to 60 seconds) and wait for the old TTL to expire. Change the record, keep the old server running until its traffic stops, then raise the TTL again. Old answers live in caches until their TTL runs out, which is all "propagation" is.
Read the lesson: DNS: how names become addresses →NXDOMAIN means the name doesn't exist. NOERROR with no answer means the name exists but has no record of the type asked. SERVFAIL means the resolver couldn't get an answer at all, often a broken delegation or a DNSSEC failure.
Read the lesson: DNS: how names become addresses →A CNAME can't coexist with other records for the same name, and the apex must hold SOA and NS records. Providers offer ALIAS records (Route 53) or CNAME flattening (Cloudflare), which resolve the target on the server and return A records.
Read the lesson: DNS: how names become addresses →dig bypasses /etc/hosts and talks to DNS directly, so an old /etc/hosts entry would win for the app; getent hosts shows what the app really sees. Application-level caching (the JVM caches lookups by default) or a different resolver in a container are the other usual causes.
Read the lesson: DNS: how names become addresses →Both come from the proxy, not your app. 502 Bad Gateway means it reached your app and got an invalid response or a reset, often a crashed app or wrong port. 504 Gateway Timeout means your app didn't answer in time, often a slow query or a blocked path.
Read the lesson: HTTP: read a request like a log →Use curl -w to print time_namelookup, time_connect, time_appconnect and time_starttransfer. Long DNS, connect or TLS phases point at the network or resolver; a long gap between the TLS handshake and the first byte is the server's own work, so look at the app and database.
Read the lesson: HTTP: read a request like a log →One IP address often serves many sites. The server or proxy picks which site to serve from the Host header, so a wrong Host gives the wrong site or a 404. For HTTPS the name is also sent earlier, in SNI, to pick the certificate.
Read the lesson: HTTP: read a request like a log →HTTP/2 uses binary frames and multiplexes many requests on one TCP connection, negotiated through ALPN during TLS. HTTP/3 keeps the same ideas over QUIC on UDP, removing TCP's handshake and head-of-line blocking. Methods, status codes and headers stay the same.
Read the lesson: HTTP: read a request like a log →Encryption so nobody on the path can read the traffic, integrity so nobody can change it unnoticed, and authentication through certificates so the client knows it's talking to the real server. Most production problems are with the authentication part.
Read the lesson: TLS and HTTPS: certificates without the mystery →The server is sending only the leaf certificate and not the intermediate. Browsers often have the intermediate cached and hide the problem; other clients don't fetch it. Configure the server to send the full chain.
Read the lesson: TLS and HTTPS: certificates without the mystery →Run openssl s_client -connect host:443 -servername host and pipe the output to openssl x509 -noout -dates -ext subjectAltName. Always pass -servername, because without SNI the server may return a different certificate.
Read the lesson: TLS and HTTPS: certificates without the mystery →Automate issuance and renewal (certbot, cert-manager or ACM) and monitor expiry independently, for example with the blackbox exporter's probe_ssl_earliest_cert_expiry and an alert at 14 days left. Monitoring catches renewals that silently fail.
Read the lesson: TLS and HTTPS: certificates without the mystery →In mutual TLS the client also presents a certificate, so the server can verify which client is calling, not just that traffic is encrypted. It's used between internal services, usually through a service mesh such as Istio or Linkerd that issues and rotates the certificates automatically.
Read the lesson: TLS and HTTPS: certificates without the mystery →Through the ACME protocol. In the HTTP-01 challenge it gives a token that you serve at /.well-known/acme-challenge/ on port 80 and fetches it over the internet; in DNS-01 you publish a TXT record, which also works for wildcards and private servers. Certificates last 90 days, so renewal must be automated.
Read the lesson: TLS and HTTPS: certificates without the mystery →The kernel looks up the destination in its route table. The most specific matching prefix wins; if no connected or more specific route matches, the default route is used. The result identifies an output interface and often a gateway. ip route get <address> shows the decision for one destination.
Source NAT rewrites the source address, and sometimes the source port, as a packet leaves a private network. Connection tracking stores the mapping. When the reply comes back, the NAT device reverses the translation so the packet reaches the private client. NAT is not itself an allow policy.
Read the lesson: Routing and NAT: finding the next hop →The routers did not return traceroute probe responses before their timeouts. They may rate-limit or suppress those messages while continuing to forward application traffic. I would compare a real TCP connection and captures at the endpoints before calling the route broken.
Read the lesson: Routing and NAT: finding the next hop →It is the next-hop router the host uses for destinations not covered by a more specific route. The gateway must be reachable on a local link. The host sends the frame to the gateway MAC, while the IP destination remains the remote host unless NAT changes it.
Read the lesson: Routing and NAT: finding the next hop →A stateful firewall tracks an allowed flow and permits its matching return packets. A stateless filter checks each packet independently, so inbound and outbound reply rules must both match. A path can cross both kinds of firewall, so the state of one does not apply to the other.
Read the lesson: Firewalls: allow only the traffic you need →Confirm the required management and service traffic has explicit allow rules, test the ruleset, and keep a console or out-of-band recovery path. A default-drop input chain can block the SSH session that applied it. Test policy changes in an isolated namespace first.
Read the lesson: Firewalls: allow only the traffic you need →A security group is stateful and attaches to network interfaces. A network ACL is stateless, applies at a subnet boundary, and evaluates numbered rules in order. Replies allowed by a security group are tracked, while a NACL needs matching inbound and outbound rules.
Read the lesson: Firewalls: allow only the traffic you need →After the routing decision classifies the packet as local, it traverses the input hook before delivery to the local socket. Forwarded traffic uses the forward hook instead. The rule path depends on the packet direction and whether the host is the destination or a router.
Read the lesson: Firewalls: allow only the traffic you need →A forward proxy acts for clients making outbound requests, while a reverse proxy acts for a service receiving inbound requests. The client usually knows about a forward proxy. The service operator configures the reverse proxy and its backend routing.
Read the lesson: Proxies and load balancing: one front door →Nginx accepts the client's connection, matches a server and location, then opens a separate connection to the configured upstream. It forwards the request and returns the upstream response. The proxy and upstream legs can fail independently, so test both.
Read the lesson: Proxies and load balancing: one front door →Choose layer 7 when routing depends on application details such as an HTTP host, path, or header. Choose layer 4 when transport-level connection distribution is enough or the protocol is not HTTP. Layer 7 awareness does not fix an unhealthy backend.
Read the lesson: Proxies and load balancing: one front door →A TCP check only proves that a port accepted a connection. The process may still be unable to serve requests because its dependencies are unhealthy or its application is not ready. Use a readiness endpoint that reflects the work the target must handle.
Read the lesson: Proxies and load balancing: one front door →Copy the public key into the account's authorized_keys file. Keep the matching private key on the client or in its local agent. The client proves it has the private key by signing; it does not send that private key to the server.
Read the lesson: SSH and remote access: reach servers safely →ProxyJump tells the SSH client to connect through a jump host before reaching the final destination. It avoids making the private host public and does not require copying the user's private key to the bastion. Keep host-key verification enabled for both hosts.
Read the lesson: SSH and remote access: reach servers safely →ssh -L 15432:db.internal:5432 bastion.midThe SSH client listens on local port 15432. Connections to it travel through the encrypted SSH session to the bastion, which opens a connection to db.internal on port 5432 from its own network. Database authentication and TLS are still required.
Read the lesson: SSH and remote access: reach servers safely →The user's key pair authenticates the client account; the public half is authorized by the server. The host key authenticates the server to the client and is recorded in known_hosts. Comparing a first-use fingerprint through a trusted channel helps prevent accepting an impostor.
Read the lesson: SSH and remote access: reach servers safely →It provides a separate view of interfaces, addresses, routes, firewall rules, and sockets. The processes still share the host kernel. A container runtime can connect the namespace to the host with virtual interfaces.
Read the lesson: Container networking: bridges, namespaces and Pods →A veth pair has two linked virtual Ethernet endpoints. One can be moved into a container network namespace; the host-side endpoint attaches to a bridge. The bridge switches frames between ports, and the host routes traffic that leaves the local bridge.
Read the lesson: Container networking: bridges, namespaces and Pods →A user-defined bridge provides an explicit network boundary and embedded DNS so attached containers can use names or aliases. It also avoids relying on the legacy default bridge behavior. Publish ports only when a host-side client needs access.
Read the lesson: Container networking: bridges, namespaces and Pods →A CNI plugin configures Pod network interfaces and cluster connectivity. A Service is a Kubernetes API object that gives clients a stable virtual address and routes to selected ready Pods. The two solve related but different parts of the network model.
Read the lesson: Container networking: bridges, namespaces and Pods →Check name resolution, route, TCP connection, TLS and HTTP response, then application logs and dependencies. Each step proves only that boundary. Stop at the first failure and gather evidence there instead of restarting unrelated services.
Read the lesson: Network troubleshooting: follow the packet →Capture a narrowly filtered request at the client and server interfaces using the same host, port, and time window. If the request leaves the client but does not arrive at the server, investigate the path between them. If it arrives but no reply leaves, inspect the server and its local firewall.
Read the lesson: Network troubleshooting: follow the packet →A host or middlebox actively rejected the TCP attempt, commonly because no process is listening on that address and port. Check the listener and bind address first. A reset alone does not prove which device sent it.
Read the lesson: Network troubleshooting: follow the packet →A reset is an explicit TCP response that closes or rejects a connection. A timeout means no matching answer arrived before the deadline. It often points to a silent filter or route problem, but packet captures are needed to identify the exact boundary.
Read the lesson: Network troubleshooting: follow the packet →