diff --git a/src/lib/components/CIDRDiff.svelte b/src/lib/components/CIDRDiff.svelte new file mode 100644 index 0000000..d37b56b --- /dev/null +++ b/src/lib/components/CIDRDiff.svelte @@ -0,0 +1,846 @@ + + +
Compute A - B where A and B are sets of IP addresses, CIDR blocks, or ranges. Shows minimal non-overlapping results.
+{cidr}
+
+ {cidr}
+
+ The difference A - B resulted in an empty set. Set B completely contains or covers Set A.
++ Set operations allow you to combine, subtract, and analyze IP address ranges mathematically. + The difference operation (A - B) returns all addresses in set A that are NOT in set B. +
+ +192.168.1.0/24 (256 addresses)192.168.1.128/25 (128 addresses)
+ 192.168.1.0/25 (128 addresses)2001:db8::/48 (entire /48 block)2001:db8:1::/64 (single /64 subnet)
+ 10.0.0.0/16 (65,536 addresses)10.0.10.0/24, 10.0.20.50-10.0.20.100
+ + When subtracting ranges that don't align to CIDR boundaries, the result may + require multiple smaller CIDR blocks to represent exactly. +
+
+ Overlapping ranges in the same set are automatically merged before processing.
+ 10.0.0.0/24 + 10.0.0.128/25 = 10.0.0.0/24
+
+ IPv4 and IPv6 addresses are processed separately. You cannot subtract + IPv6 ranges from IPv4 ranges (and vice versa). +
+
+ If set B completely contains set A, the result is empty. For example:
+ 192.168.1.0/25 - 192.168.1.0/24 = ∅
+
+ Generates the most efficient CIDR representation with the fewest blocks. + Uses variable prefix lengths to exactly cover the result ranges. +
++ Forces results to align to specific prefix boundaries. Useful for + organizational policies or routing requirements. +
++ The overlay visualization shows how set operations work spatially across the address space: +
+
+