diff --git a/src/lib/components/CIDRAllocator.svelte b/src/lib/components/CIDRAllocator.svelte new file mode 100644 index 0000000..f22344f --- /dev/null +++ b/src/lib/components/CIDRAllocator.svelte @@ -0,0 +1,1417 @@ + + +
Pack requested subnet sizes into pools using intelligent bin-packing algorithms
+{allocation.request}
+ {allocation.description}
+ {allocation.cidr}
+ in {allocation.pool}
+
+ ({allocation.size.toLocaleString()} addresses)
+
+ {pool.original}
+ {subnet.cidr}
+ {subnet.description}
+
+ {remaining.size.toLocaleString()} addresses
+
+
+ {ipToString(remaining.start)} - {ipToString(remaining.start + remaining.size - 1)}
+
+ Compare two lists of networks to identify changes for auditing
+{network}
+
+ {network}
+
+ {network}
+
+ Decompose CIDR blocks and ranges into uniform target prefix subnets
+{subnet}
+
+ The target prefix length may be too large for the input networks, or the input is empty.
+Discover all available address blocks within network pools
+{block}
+
+ All address space in the pools is allocated or there are no pools defined.
+Safely enumerate all IP addresses in CIDR blocks and ranges
+{result.networkInfo.network}
+ {result.networkInfo.broadcast}
+ {address}
+
+ {result.error}
+Generate safe and reliable regular expressions for IPv4 and IPv6 address validation
+/{result.pattern}/{result.flags}
+ {result.flags}
+
+ {#if result.flags.includes('i')}
+ Case insensitive
+ {/if}
+
+ const ipRegex = /{result.pattern}/{result.flags};
const isValid = ipRegex.test(ipAddress);
+ import re
pattern = r'{result.pattern}'
is_valid = bool(re.match(pattern, ip_address{result.flags ? ', re.IGNORECASE' : ''}))
+ $pattern = '/{result.pattern}/{result.flags}';
$isValid = preg_match($pattern, $ipAddress);
+ {testCase}
+ {/each}
+ {testCase}
+ {/each}
+ Validate IPv4 and IPv6 addresses with detailed error analysis and format checking
+{result.details.normalizedForm}
+ {result.details.compressedForm}
+ {result.details.embeddedIPv4}
+ %{result.details.zoneId}
+ + IP address validation ensures that a given string conforms to the correct format for IPv4 or IPv6 addresses. + This tool checks for proper syntax, valid ranges, and common formatting errors to help network administrators + and developers verify IP addresses before use in network configurations. +
+Translate between IPv4 and IPv6 addresses using NAT64 prefix mechanism
+64:ff9b::/96 is the standard prefix defined in RFC 6052 for NAT64 translation.
+ {result.originalAddress}
+ {result.translatedAddress}
+
+ {result.details.prefixUsed}
+ {result.details.ipv4Hex}
+ {result.error}
++ NAT64 is a stateless IP/ICMP translation mechanism that allows IPv6-only clients to communicate + with IPv4-only servers. It embeds IPv4 addresses within IPv6 addresses using a /96 prefix. +
+
+ RFC 6052 defines 64:ff9b::/96 as the well-known prefix for NAT64 translation.
+ This prefix is reserved for this purpose and should not be routed on the global Internet.
+
+ NAT64 addresses use 96 bits for the prefix and embed the 32-bit IPv4 address in the
+ remaining bits: Prefix::/96 + IPv4(32 bits)
+
+ Common in IPv6 transition scenarios, dual-stack networks, and environments where + IPv6-only clients need to access legacy IPv4 services through translation gateways. +
+Compute solicited-node multicast addresses from IPv6 unicast for Neighbor Discovery Protocol
+ff02::1:ffXX:XXXX where XX:XXXX are the last 24 bits of the unicast address.
+ {result.details.normalizedUnicast}
+
+ {result.solicitedNodeAddress}
+
+ {result.details.last24Bits}
+ {result.details.multicastPrefix}
+ {result.error}
++ Neighbor Discovery Protocol (NDP) is IPv6's equivalent to IPv4's ARP. It's used for address resolution, + router discovery, and duplicate address detection on local network segments. +
++ Instead of broadcasting to all nodes (like ARP), IPv6 uses solicited-node multicast to efficiently + target only nodes that might have the specific address, reducing network traffic. +
++ Multiple unicast addresses can map to the same solicited-node multicast address. This is acceptable + since nodes will ignore solicitations for addresses they don't own. +
++ Every IPv6 node automatically joins the solicited-node multicast group for each of its unicast + addresses, enabling it to receive neighbor solicitations. +
+Parse Teredo IPv6 addresses to extract server IPv4, flags, mapped port, and client IPv4
+2001:0000:SSSS:SSSS:FFFF:PPPP:CCCC:CCCC where components are encoded and obfuscated.
+ {result.details.fullAddress}
+ {result.components.prefix}
+ {result.details.addressGroups[2]}:{result.details.addressGroups[3]}
+ {result.details.addressGroups[4]}
+ {result.details.addressGroups[5]}
+ {result.details.addressGroups[6]}:{result.details.addressGroups[7]}
+ {result.components.serverIPv4}
+
+ {result.components.clientIPv4}
+
+ {result.components.clientPort}
+
+ {result.components.clientPortObfuscated}
+ {result.components.clientIPv4Obfuscated}
+ {result.error}
++ Teredo is an IPv6 transition technology that allows IPv6 connectivity for hosts located behind IPv4 NATs. + It tunnels IPv6 packets inside IPv4 UDP datagrams, enabling communication with the IPv6 Internet. +
++ The client IP and port are XOR'ed with known values to prevent some NAT devices from automatically + translating these embedded addresses, which would break the Teredo mechanism. +
++ The flags field indicates whether the client is behind a cone NAT (more permissive) or restricted NAT + (more restrictive), which affects how the tunnel operates and performs. +
++ Teredo was important during IPv6 transition but is less common today. Modern systems prefer native + IPv6 or other transition mechanisms like 6to4 or NAT64. +
+