Interview Q&A · questions with model answers

Networking Interview Questions

Part of the study plan for: Site Reliability Engineer (SRE) · Cloud Engineer · DevOps Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked What happens, at the network level, when you type a URL into a browser and press Enter?

    The browser resolves the host name with DNS, opens a TCP connection (or QUIC over UDP for HTTP/3) to the server's IP and port 443, performs a TLS handshake that verifies the certificate, sends an…

  2. Most asked How does DNS resolution work, and what does a record's TTL control?

    A stub resolver asks a recursive resolver, which (if not cached) queries a root server, then the TLD server, then the domain's authoritative server, and caches the answer for the record's TTL. The…

  3. Most asked How does NAT work, and what are its limits?

    Source NAT rewrites a private source address and port to a public address and port, records the mapping, and reverses it for replies. Its limits: hosts behind it can't receive unsolicited inbound…

  4. Most asked A service is unreachable. How do you troubleshoot it systematically?

    Work up the layers from the client: does DNS resolve to the expected address; is there a route; does a TCP connection open (timeout suggests filtering, 'connection refused' suggests nothing…

  5. Most asked Explain the OSI and TCP/IP models. Why do engineers still talk about 'layer 4' and 'layer 7'?

    The TCP/IP model has four layers (link, internet, transport, application); the seven-layer OSI model is mostly used as vocabulary. 'Layer 4' means transport (TCP/UDP ports) and 'layer 7' means…

  6. Most asked Walk through the TCP three-way handshake and connection teardown. What is TIME_WAIT and why can it cause problems?

    The client sends SYN, the server replies SYN-ACK and the client sends ACK; both sides then agree on initial sequence numbers. To close, each side sends FIN and acknowledges the other's FIN. The side…

  7. Most asked How do private subnets reach AWS services like S3 without going over the internet?

    Use VPC endpoints: gateway endpoints (free, route-table based) for S3 and DynamoDB, and interface endpoints (PrivateLink, an ENI with a private IP plus private DNS) for most other services. Azure…

  8. How does a router choose a route when several routes match a destination?

    Longest-prefix match: the most specific matching route wins, so 10.1.2.0/24 beats 10.1.0.0/16, which beats the default route 0.0.0.0/0.

  9. What happens if two networks you need to connect have overlapping CIDRs, and what can you do?

    They can't be peered or routed to each other normally. Options: expose specific services with PrivateLink (or Private Link / Private Service Connect), translate addresses with a private NAT gateway…

  10. CNAME, A and alias records: why can't the zone apex be a CNAME, and how do cloud DNS services work around it?

    A CNAME makes a name an alias for another name and can't coexist with other records. The apex (example.com) must have NS and SOA records, so it can't be a CNAME. Route 53 alias records, Azure DNS…

  11. How does DNS work inside a VPC, and how do you resolve names between the cloud and on-premises?

    Each VPC has a provider resolver (AWS at the VPC base +2, Azure at 168.63.129.16, Google Cloud at the metadata server) that answers private hosted zones, cloud service names and internet names. For…

Was this page helpful?

Report a mistake