Checking for Overlap
Lesson 36 of 46 in Coddy's IP Addressing and Subnetting course.
The deadliest planning mistake is overlap: two subnets that share addresses. Machines in the shared range become unreachable in ways that look random, and the tickets never say "overlap", they say "the printer disappears sometimes".
To check a pair, work out each subnet's range (network to broadcast) and see whether the ranges intersect. 10.0.0.0/25 covers 0-127; 10.0.0.64/26 covers 64-127. They collide across 64-127: overlap.
A correct plan reads like a ruler: each range starts exactly where the previous one ended, plus one.
Challenge
MediumThe file plan.txt holds three proposed subnets. Work out each one's range, find the two that overlap, and print them (in file order), one per line.
Expected output:
10.0.0.0/25
10.0.0.64/26Try it yourself
All lessons in IP Addressing and Subnetting
10Capstone - The Office
The Floor PlanSizing Each TeamCarving the BlockThe Router's ViewRecap - Ship the Plan8Planning Networks
Right-SizingVLSM Step by StepAllocation OrderChecking for OverlapRecap - Plan a NetworkPractice on your own: Terminal playground