Least privilege · 3 min read
Do these two subnets overlap? A 30-second check
Two subnets that overlap even slightly cause problems that are painful to trace - a route that steals traffic, an ACL line that shadows another, an address that gets assigned twice. Checking is quick once you compare the right thing.
Compare the ranges, not the strings
Convert each CIDR to its first and last address. Two blocks overlap if one range starts before the other ends and vice versa. If the smaller block sits entirely inside the larger, one contains the other. If neither is true, they are disjoint. Comparing the printed prefixes by eye is where mistakes creep in - compare the numeric ranges.
Where overlaps bite
- →Routing: longest-prefix match sends traffic to the more specific route, which may not be the one you intended.
- →ACLs and firewall rules: an overlapping permit above a deny can silently shadow it.
- →IPAM: two overlapping allocations are an address conflict waiting to surface.
IP-in-subnet & overlap checker
Instantly test membership and overlap between blocks.
Practise this on today’s Daily Ops Drill — a free network task every day.
Open the app →Free tools for this
More from the blog