Skip to content
Tech Interview Prep
Technical interview guide

OSI & TCP/IP Models

The layered models networking is reasoned about in, physical up to application, and where common protocols and problems live.

Read
45 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed
Relevant for
Network Engineer

Scope: Current IETF host, IPv4, IPv6, ARP, NDP, TCP, UDP, port, ICMP, PMTUD, TLS 1.3, QUIC, and Wireshark references reviewed 2026-09-04.

Curated: · Written: · Reviewed:

25 questions

MCQ-24How do Layer 2 switches and Layer 3 routers differ in their primary forwarding decisions and frame treatment when transmitting transit traffic across network boundaries?
MCQ-2Host A (10.0.1.5, MAC aa:aa) sends a packet to host B (10.0.2.9, MAC bb:bb), which sits on a different subnet. The packet is routed through R1 (10.0.1.1, MAC cc:cc), A's default gateway. When the frame finally arrives at B, which destination addresses does that frame carry?
MCQ-3Host A is configured 10.0.0.5/25 with default gateway 10.0.0.1. Its ARP cache contains only the gateway's entry. A sends a UDP datagram to 10.0.0.130. Which destination MAC address appears in the Ethernet frame A puts on the wire?
MCQ-18A service resolves `api.internal` to 10.2.3.4 through the corporate forwarding resolver, then its TCP connect to 10.2.3.4:8443 fails with ECONNREFUSED. What did the successful resolution establish?
MCQ-13A client calls connect() to a service on port 8080. tcpdump shows the client's SYN, then a reply from the server with the RST flag set and no payload, and connect() fails immediately with ECONNREFUSED. What does that RST indicate?
MCQ-1A request takes 883 ms end to end. Instrumentation shows DNS 3 ms, TCP connect 2 ms, TLS handshake 28 ms, and 850 ms between sending the HTTP request and receiving the first response byte; the server's handler logs 15 ms. Which conclusion does this layered breakdown support?
MCQ-14On a Linux host, two UDP sockets are bound to port 9000 with SO_REUSEADDR: process A to 0.0.0.0:9000 and process B to 192.168.1.5:9000. A datagram arrives on interface 192.168.1.5 with destination address 192.168.1.5 and destination port 9000. Which process receives the payload?
MCQ-15A Go service accepts connections on one listener bound to 10.0.2.7:443. Two clients behind the same NAT gateway, 203.0.113.9, open connections at the same moment; the NAT assigns them source ports 40001 and 40002. Both send a request and keep the connection open. The server's accept loop hands each new socket to a goroutine that reads the request and writes the response back on that same socket. What does the kernel use to keep the two connections' receive buffers and sequence numbers separate?
MCQ-4A /64 segment has 3,000 IPv6 hosts on one switch. A capture shows that when host A needs host B's link-layer address, A sends a multicast frame that only B's IP stack processes: the other 2,999 hosts' NICs discard it in hardware. On the same segment, A's IPv4 ARP request for B's MAC interrupts every host's IP stack. Which mechanism explains the IPv6 behaviour?
MCQ-6Two routers, R1 and R2, have misconfigured static routes for 203.0.113.0/24: R1 forwards the prefix to R2, and R2 forwards it back to R1, with no other path. A packet for 203.0.113.7 arrives at R1 with IP TTL = 8. Both routers decrement TTL by 1 on receipt and discard the packet when the result is 0. What happens to the packet?
MCQ-7A host sends a 1500-byte UDP datagram over IPv6. The path's smallest link MTU is 1400 bytes, and the router on that link drops the packet and returns ICMPv6 Packet Too Big (type 2) with MTU 1400. The datagram must still cross the path, and it will be fragmented rather than resized. Which component adds the IPv6 Fragment header?
MCQ-9A client opens a TCP connection to a server. The client's SYN carries ISN 4000 and MSS 1460; the server's SYN-ACK carries ISN 9000 and MSS 1200. The client sends the final ACK and then immediately writes 100 bytes of application data. What sequence number does that first data segment carry, and what is the largest segment the client may send?
MCQ-10Host A is sending a byte stream to Host B over TCP. B has received and acknowledged every byte through sequence number 5000. A then sends a 1000-byte segment with sequence number 6001; the segment carrying bytes 5001–6000 was lost in transit. B receives the 6001 segment intact and buffers it. What acknowledgment number does B put in its reply?
MCQ-25A team inserts a TCP-level proxy between a client and a server. The proxy does not parse TLS; it re-segments the byte stream, splitting a 1,200-byte TLS record across three TCP segments and merging the tail of one record with the header of the next. The TLS handshake and the subsequent application data both complete normally. What does this tell the team about where TLS sits in the stack?
MCQ-12A service sends variable-length binary records over one long-lived TCP connection. A record may contain any byte value, including 0x0A and 0x00, and may be up to 1 MiB. The receiver reads with recv() and must recover exactly one record per parse. Which framing should it implement?
MCQ-23A service on host A sends 12,000 TCP segments to host B. `tcpdump -i eth0 -v` on A flags every segment with an incorrect TCP checksum. A capture taken on B shows correct checksums for the same segments, B's kernel reports no checksum errors, and the payloads arrive intact. `ethtool -k eth0` on A reports `tx-checksumming: on`. What explains the capture on A?
MCQ-20A mobile client on a link dropping 2% of packets runs HTTP/3 over QUIC on a single connection. Two streams are active: stream 4 carries a 1.2 MB video segment in 1200-byte packets, and stream 8 carries a 900-byte API response in one packet. The packet holding stream 4's 40th frame is lost; stream 8's packet arrives intact. What does the client's application observe?
MCQ-11A TCP sender streams bulk data to a receiver over a 100 Mbit/s path with a 40 ms round-trip time. The receiver advertises a steady window of 64 KiB, the sender's congestion window has grown to 256 KiB, and no segment loss has been observed. What is capping the sender's throughput?
MCQ-5A fleet of 500 sensors sends one 200-byte UDP datagram per second to a collector; the firmware sends each reading exactly once and has no retransmission logic. Over a 10-minute window the collector expects 300,000 datagrams and receives 297,412. Of those, 1,204 carry a sequence number lower than one already seen from the same device, and 87 sequence numbers appear twice with byte-identical payloads. The collector's socket reports zero receive-queue drops, and the path MTU is 1,500 bytes. The collector must process each reading exactly once. Which change achieves that?
MCQ-16A fleet of 40,000 devices each hold one long-lived TCP connection to a backend through a NAT gateway. The gateway's TCP mapping idle timeout is 300 seconds and its connection table holds 1,000,000 entries. Each device sends a 1-byte keepalive every 600 seconds. Operators report that connections die about five minutes after the last application data. What is the cause?
MCQ-21A proxy that terminates the client's TCP connection sits between a client and a backend. The client→proxy path has a 40 ms RTT and no loss; the proxy→backend path has a 2 ms RTT. The client's retransmission timer is 1 s. One data segment carrying the request is dropped on the proxy→backend hop and is retransmitted by the proxy 200 ms later. What does the client's TCP stack do?
MCQ-19A payments service terminates TLS 1.3 and enables 0-RTT early data so returning clients skip a round trip; the team's p99 handshake budget depends on keeping session resumption. A test client resumes with a session ticket and sends POST /payments in early data. An on-path attacker replays the captured early-data flight 2 seconds later and the service records a second payment. The same POST sent after the handshake completes is never duplicated when replayed. What should the team change?
MCQ-8A TCP client behind an IPsec tunnel with an inner MTU of 1400 bytes has a local interface MTU of 1500 bytes. The tunnel router drops any packet larger than 1400 bytes and the ICMP fragmentation-needed messages it would send are filtered. The client completes the TCP handshake and a 200-byte API call, but a 4 KB JSON response stalls: tcpdump shows the client retransmitting the same 1500-byte segment while no ICMP arrives. What is the most likely explanation and fix?
MCQ-22App servers in 10.4.9.0/24 intermittently fail to open TLS connections to 10.4.2.11:8443. A capture on 10.4.9.31 shows SYN at t=0 (MSS 1460), SYN-ACK at t=0.0008 s (MSS 1460), ACK at t=0.0011 s, then a 1460-byte ClientHello at t=0.0015 s retransmitted at 0.2, 0.6, 1.4, 3.0, 6.2, 12.6 and 25.4 s, and a client RST at t=30.0 s. The same request from 10.4.8.31 completes in 12 ms. Both subnets reach the server through the same firewall pair; 10.4.9.0/24 is reached over an IPsec tunnel whose interface MTU is 1400, while 10.4.8.0/24 is on a 1500-byte path. What does the capture point to?
MCQ-17A team replaces its egress firewall with a default-deny policy that drops all ICMP in both directions. Within the hour: SSH to a bastion connects, then hangs as soon as a command returns more than about 1,400 bytes of output; `curl` to an internal HTTPS API completes the TLS handshake but stalls before the first response byte whenever the body exceeds about 1,400 bytes; `ping` to both hosts fails. The client subnet runs a 1,500-byte MTU and both destinations sit behind an IPsec tunnel with a 1,400-byte MTU. Which explanation accounts for the pattern?