Practice: networks rapid-fire and subnetting drill
50 min · Intermediate
Need help? Ask a tutor on WhatsApp (opens in a new tab)Networking rounds reward speed and precision: short exact answers, quick subnetting and one well-structured long answer. Each drill below is timed, so you walk in knowing which of your answers are ready and which need one more revision.
Round 1: 20 rapid-fire questions (6 minutes)
A rapid-fire round is a set of one-line questions asked quickly, often at the start of a technical interview. The goal is a crisp, correct answer in under 15 seconds, not an essay.
Cover the answers, write yours on paper, then compare. Count one mark per fully correct answer.
Example 1 · Rapid-fire set: 20 questions
1. Layer of a switch? 11. DNS port and protocol?2. Layer of a router? 12. HTTPS port?3. PDU at the transport layer? 13. SSH port?4. Bits in IPv4 / IPv6? 14. MySQL port?5. Private range starting 172? 15. 401 vs 403?6. Usable hosts in a /24? 16. DHCP steps?7. TCP handshake? 17. What does ARP find?8. UDP header size? 18. Record for IPv6?9. Mask for /26? 19. Which proxy sits before servers?10. Loopback IPv4 address? 20. Attack using a botnet?1. Layer 2 (data link) 11. 53, UDP (TCP for large answers) 2. Layer 3 (network) 12. 443 3. Segment (TCP) / datagram (UDP) 13. 22 4. 32 / 128 14. 3306 5. 172.16.0.0 to 172.31.255.255 15. 401 not authenticated, 403 not allowed 6. 254 16. Discover, Offer, Request, Acknowledge 7. SYN, SYN-ACK, ACK 17. The MAC address for an IP on the LAN 8. 8 bytes 18. AAAA 9. 255.255.255.192 19. Reverse proxy 10. 127.0.0.1 20. DDoS
What this code does
- Each answer is one short fact. That is the right length for a rapid-fire round; add a reason only if the interviewer asks "why?".
- Questions 5, 7, 15 and 16 are the ones students most often get half right. If you missed any, reread the lesson that covers it.
How to answer:
- Answer with the fact first: "Layer 3, router." Add one clause of reason only if asked.
- If you do not know, say "I am not sure, my guess is..." and move on; do not freeze.
- Weak on a topic? Go back to that lesson of this module and redo its MCQs.
Round 2: subnetting numericals (10 minutes)
A subnetting numerical gives an address with a prefix and asks for the mask, network, broadcast, host range or host count. Use the block-size method: block = 256 minus the mask octet, find the block that holds the address, then read off the rest.
Work the five questions by hand first. Then run the checker program to verify your answers; it uses the same bit operations a router uses.
Q1 192.168.1.130/25 Q2 10.0.0.77/28 Q3 172.16.50.10/21Q4 Hosts in a /23? Q5 Prefix for 6 subnets of a /24 with 30 hosts each?Answers:Q1 network .128, broadcast .255, hosts .129-.254 (126)Q2 network 10.0.0.64, broadcast 10.0.0.79, hosts .65-.78 (14)Q3 mask 255.255.248.0, network 172.16.48.0, broadcast 172.16.55.255 (2046 hosts)Q4 2^9 - 2 = 510Q5 /27 (8 subnets, 30 hosts each)Example 2 · Subnetting answer checker
import ipaddress
def solve(label, cidr): net = ipaddress.ip_interface(cidr).network print(f"{label} {cidr}: mask {net.netmask}, network {net.network_address}, " f"broadcast {net.broadcast_address}, hosts {net.num_addresses - 2}")
solve("Q1", "192.168.1.130/25")solve("Q2", "10.0.0.77/28")solve("Q3", "172.16.50.10/21")print("Q4 /23 hosts:", 2 ** 9 - 2)
bits = (6 - 1).bit_length() # smallest number of bits that can count 6 subnetsprefix = 24 + bitsprint(f"Q5 6 subnets -> borrow {bits} bits -> /{prefix} with {2 ** (32 - prefix) - 2} hosts each")Q1 192.168.1.130/25: mask 255.255.255.128, network 192.168.1.128, broadcast 192.168.1.255, hosts 126 Q2 10.0.0.77/28: mask 255.255.255.240, network 10.0.0.64, broadcast 10.0.0.79, hosts 14 Q3 172.16.50.10/21: mask 255.255.248.0, network 172.16.48.0, broadcast 172.16.55.255, hosts 2046 Q4 /23 hosts: 510 Q5 6 subnets -> borrow 3 bits -> /27 with 30 hosts each
What this code does
- The program prints the same numbers as the hand answers in Round 2, so you can test any extra question you make up by adding a
solveline. - Q5 checks both conditions: 3 borrowed bits give 8 ≥ 6 subnets, and a /27 still has 30 hosts, exactly what was needed.
Round 3: the URL journey in two minutes
The two-minute URL answer is a structured spoken answer with eight beats: parse, cache, DNS, TCP, TLS, HTTP request, server and render. End with an offer to go deeper into any step.
Say it aloud with a timer: under 90 seconds is too thin, over 150 seconds loses the interviewer.
Example 3 · A two-minute URL journey answer
Question: "What happens when you type https://www.flipkart.com and press Enter?"Beats to cover: parse, cache, DNS, TCP, TLS, request, server, render."First the browser parses the URL: scheme https, host www.flipkart.com, port 443. It checks its own cache and the OS cache for the IP. If it is not there, the OS asks the DNS resolver, which goes to a root server, the .com TLD server and Flipkart's authoritative server, gets the A record and caches it for its TTL. The browser then opens a TCP connection to that IP on port 443 with the three-way handshake, and runs the TLS handshake: the server sends its certificate, the browser checks the name, dates and CA, and both agree on session keys. Now it sends an encrypted GET request with headers such as Host and cookies. On the server side a load balancer passes it to an app server, which may read from a cache or database and returns 200 OK with HTML. The browser parses the HTML, fetches CSS, JavaScript and images, often over the same HTTP/2 connection, builds the DOM and CSSOM, lays out and paints the page. I can go deeper into DNS, TLS or rendering if you like."
What this code does
- All eight beats appear in order, each in one or two sentences, with the concrete names interviewers listen for: root, TLD, authoritative, port 443, certificate, 200 OK, DOM.
- The closing line hands control back to the interviewer, who will usually pick one beat to explore. That is where the follow-ups from the DNS lesson come in.
Close with an offer: "I can go deeper into any step."
Order of execution
Order the eight beats
Put the beats of the two-minute answer in order. The first beat covers the URL and the caches.
Round 4: fix the wrong answers, then score yourself
A self-scoring sheet gives marks for each round and a total out of 40. Below 28, revise the weakest lesson and retake the drill after two days.
Interviewers sometimes state something wrong on purpose to see whether you correct it politely. Fixing wrong answers trains you to spot the exact error and give the correct line.
Example 4 · Five wrong model answers, fixed
1. "A switch is a layer 3 device that routes by IP."2. "UDP is reliable but faster than TCP."3. "HTTPS encrypts data with the certificate."4. "DNS uses TCP port 80."5. "NAT is a type of firewall that encrypts traffic."1. A basic switch is layer 2 and forwards frames by MAC address; routers route by IP. 2. UDP is not reliable: no ACKs, retransmission or ordering. It has lower delay. 3. The certificate proves the server's identity; data is encrypted with session keys agreed in the TLS handshake. 4. DNS uses port 53, normally over UDP, and TCP for large answers. 5. NAT translates private addresses to a public one; it does not encrypt and is not a firewall, though it blocks unrequested inbound traffic as a side effect.
What this code does
- Each fix names the exact error and replaces it with the right fact, without a lecture. That is how to correct an interviewer politely.
- Wrong statements like these are common traps because they are half true: switches can do layer 3 (layer 3 switches), and NAT does block some traffic.
Example 5 · Self-scoring sheet
rounds = {"Rapid fire": (16, 20), "Subnetting": (6, 10), "URL journey": (4, 5), "Fix answers": (3, 5)}
for name, (got, out_of) in rounds.items(): print(f"{name:<12} {got:>2} / {out_of:>2} ({100 * got / out_of:.0f}%)")
total = sum(got for got, _ in rounds.values())maximum = sum(out_of for _, out_of in rounds.values())weakest = min(rounds, key=lambda name: rounds[name][0] / rounds[name][1])print(f"Total: {total} / {maximum}", "-> ready" if total >= 28 else "-> revise and retake")print("Revise first:", weakest)Rapid fire 16 / 20 (80%) Subnetting 6 / 10 (60%) URL journey 4 / 5 (80%) Fix answers 3 / 5 (60%) Total: 29 / 40 -> ready Revise first: Subnetting
What this code does
- Replace the sample marks with yours. The program totals the rounds, compares with the pass mark of 28 out of 40 and names the weakest round by percentage.
- Retake the drill two days later with fresh subnetting numbers; tracking the total over three attempts shows real progress.
After all rounds, fill in the sheet and compare your total with the 28-mark line.
Marks per round:
- Round 1: 20 marks (1 per question).
- Round 2: 10 marks (2 per subnetting question).
- Round 3: 5 marks (all eight beats in order, under 2 minutes, closing offer).
- Round 4: 5 marks (1 per correctly fixed statement).
Find the bug
Correct the interviewer
Each note has one wrong line. Tap it, then check the polite correction.
Round 1 statements.
Round 1 of 3What's next
You finished the preview of Computer Networks
Python Programming has 21 sections, 110 modules and 609 lessons. An account opens every lesson and saves your progress.
Next step
Check your understanding
12 quick questions