Skip to main content
IP Range CalculatorPRO
Subnet Math & Set OperationsInstant Client-Side Tool

Subnet Containment Checker

Test whether one subnet contains another.

Subnet Containment Checker: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

Key Capabilities

  • •100% Client-Side: Zero telemetry or server latency.
  • •RFC Compliant: Exact 32-bit and 128-bit integer precision.
  • •Quick Copy: Instant access to CIDR, mask, and range bounds.
  • •Cross-Platform: Works on desktop, tablet, and mobile browsers.

How Subnet Containment Checker Works?

This tool works by comparing the start and end addresses of 2 CIDR blocks. Block A contains block B when A starts at or before B and ends at or after B.

  1. Enter subnet A

    Type the candidate parent, such as 10.8.0.0/14.

  2. Enter subnet B

    Type the candidate child, such as 10.10.32.0/19.

  3. Compute both ranges

    A spans 10.8.0.0 – 10.11.255.255. B spans 10.10.32.0 – 10.10.63.255.

  4. Compare bounds

    A start ≤ B start and A end ≥ B end → A contains B.

Subnet Containment Checker Formula

The formula is A ⊇ B when p_A ≤ p_B and (Network_B AND Mask_A) = Network_A.

Prefix rule

p_A ≤ p_B

A parent is never smaller than its child.

Mask rule

(N_B AND M_A) = N_A

B lies inside A.

Bounds rule

S_A ≤ S_B AND E_A ≥ E_B

Equivalent integer test.

Depth

p_B − p_A

Bits between parent and child.

Worked example: 10.8.0.0/14 and 10.10.32.0/19

p_A = 14 ≤ p_B = 19 ✓
10.10.32.0 AND 255.252.0.0 = 10.8.0.0 = N_A ✓
Result = A contains B (depth 5 bits, 1 of 32 /19 blocks)

Subnet Containment Checker Conversion Table

The table tests 10 pairs of CIDR blocks and shows the containment relationship of each pair.

Subnet ASubnet BRelationship
10.8.0.0/1410.10.32.0/19A contains B
10.0.0.0/810.255.0.0/16A contains B
10.0.0.0/1610.1.0.0/24No overlap
192.168.0.0/23192.168.1.128/25A contains B
192.168.1.0/24192.168.0.0/23B contains A
172.16.0.0/12172.32.0.0/16No overlap
203.0.113.0/24203.0.113.0/24Identical
10.0.0.0/2410.0.0.0/25A contains B
0.0.0.0/0198.51.100.0/24A contains B
192.0.2.64/26192.0.2.128/26No overlap

What is Subnet Containment Checker?

The Subnet Containment Checker is a tool that tests whether one CIDR block lies entirely inside another.

Containment defines the hierarchy of an address plan. A site /20 contains its VLAN /24s, and a regional /14 contains every site /20. The checker confirms each child sits inside the parent it is filed under.

The checker reports the direction of containment. 192.168.1.0/24 does not contain 192.168.0.0/23, but the /23 contains the /24.

What are the uses of Subnet Containment Checker?

There are 4 main uses of the Subnet Containment Checker, including hierarchy audits, route summary checks, and cloud subnet validation.

  • Auditing IPAM hierarchy

    Each child subnet must sit inside its recorded parent block.

  • Checking route summaries

    A summary route must contain every subnet it replaces.

  • Validating cloud subnets

    A cloud subnet must fit inside the VPC or VNet CIDR.

  • Reviewing firewall object nesting

    Nested address groups only make sense when children sit inside parents.