Subnetter
1. What is it?
A tool to assist in design of segregate/segment/split/subnet networks.
2. Output
-
PTPrefers to "Peer-to-Peer" (e.g. RFC 3021). -
6rdrefers to "IPv6 Rapid Deployment", a derivation of 6to4 (RFC 5569, RFC 5969). -
LIRrefers to "Local Internet Registry" (ARIN). -
RIRrefers to "Regional Internet Registry" (ARIN). -
Unicastrefers to "Global Unicast" (RFC 1122, RFC 4291 § 2.5.4, RFC 4632). -
ILMrefers to "Interface-Local Multicast" (RFC 4291 § 2.7, RFC 7346).-
It will always be
falsefor IPv4 addresses.
-
-
LLMrefers to "Link-Local Multicast" (RFC 4291 § 2.7, RFC 7346).-
For IPv4 addresses, it will be
trueif it is in the224.0.0.0/4range (RFC 5735).
-
-
LLUrefers to "Link-Local Unicast" (RFC 4291 § 2.7, RFC 7346).-
For IPv4 addresses, it will be
trueif it is an APIPA (Automatic Private IP Addressing) address (RFC 3927) (in the169.254.0.0/16range).
-
-
FirstandLastrefer to the first and last "usable" ("host"/assignable) addresses in a subnet/network.-
Note that for IPv6, the first address (
x::) in a subnet may or may not be assignable/"usable". If it is assigned to a device, that device must be a router for anycast. See RFC 4291 § 2.6.1 for details. In the interest of convenience,subnetterwill report this address as not usable/addressable in ranges for this reason as it is technically not a "host" address. -
Note that for IPv6, some subnetting calculators erroneously report the last address for /64’s (e.g.
x:ffff:ffff:ffff:ffff/64) as usable. They are actually reserved in strictly RFC-compliant networks for EUI-64 reasons (per RFC 2526). For this reason, if and only if a prefix is a /64 exactly,subnetterwill usex:ffff:ffff:ffff:fffeas the last host address. -
There are additional restrictions for /64 subnets, but they fall earlier in the range. These are not explicitly excluded in the usable host range, nor are they excluded from the total host count.
-
-
Private networks (RFC 1918), ULA prefixes (RFC 4193), and documentation prefixes (RFC 3849, RFC 5737, RFC 9637) are treated as "normal" networks (in that it is allowed to subnet them).
-
Various other reserved IPv4 and IPv6 addresses/networks will print warnings with their corresponding RFC(s) (unless
-R/--allow-reservedis specified) if they are specified as/included in the initial prefix/network.
3. References
The table subcommand is inspired by iptab from Perl Net-IP.
Additional notes for certain contexts are primarily taken from the Wikipedia article on Classless Inter-Domain Routing (as of Jan 28, 2025).