Computer Networks Medium technical 0 views 1 min read

Explain subnetting and CIDR notation.

Peer-reviewed by HireXTech Technical Panel Updated for 2025/2026 hiring Editorial standards
Practise this track
Interviewer Expectations for this Question
01
Core Competency

Assesses fundamental understanding of Computer Networks conventions, runtime behavior, and memory/performance considerations.

02
Evaluation Criteria

Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.

Comprehensive Model Answer Verified Solution

An IP address is split into a network part and a host part by the subnet mask, which can be written as a CIDR prefix. /24 means the first 24 bits are the network, leaving 8 host bits.

192.168.1.0/24
mask  255.255.255.0
network 192.168.1.0   broadcast 192.168.1.255
usable hosts 192.168.1.1 - 192.168.1.254  (254 hosts)

The number of addresses is 2^(32-prefix), and usable hosts are that minus the network and broadcast addresses for IPv4. Borrowing bits creates subnets; splitting a /24 into four /26 gives 62 usable hosts each.

Longest-prefix match means a router forwarding a packet picks the most specific route. CIDR replaced classful addressing and allows route aggregation, so many contiguous networks are advertised as a single summary route. Private ranges such as 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are not routed on the public Internet.

Candidate Response Strategy & Interview Tips

  1. Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
  2. Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
  3. Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
  4. Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.
Related Topics & Skills
Spotted an error or have an alternative solution?