refactor: sort IP registry files by range

This commit is contained in:
2026-07-22 19:29:13 +00:00
parent b38191f190
commit 052306bafe
7 changed files with 20 additions and 15 deletions
+15 -10
View File
@@ -5,21 +5,26 @@ This folder is the human-readable registry of IP knowledge collected by this rep
## Filename convention
```text
<registry>--<network-address-with-hyphens>--<prefix-length>.md
<zero-padded-network-address>--<zero-padded-prefix-length>--<registry-or-status>.md
```
Examples:
```text
iana--0-0-0-0--8.md
apnic--1-1-1-0--24.md
000-000-000-000--08--iana.md
001-000-000-000--16--placeholder.md
001-001-001-000--24--apnic.md
```
The parts mean:
- `registry`: authoritative number registry currently responsible for the record (`iana`, `afrinic`, `apnic`, `arin`, `lacnic`, or `ripe-ncc`);
- `network-address-with-hyphens`: canonical network address with dots replaced by hyphens;
- `prefix-length`: CIDR range number without `/`.
- `zero-padded-network-address`: canonical IPv4 network address, each octet padded to three digits and separated by hyphens;
- `zero-padded-prefix-length`: CIDR range number without `/`, padded to two digits;
- `registry-or-status`: authoritative number registry when the range has been researched (`iana`, `afrinic`, `apnic`, `arin`, `lacnic`, or `ripe-ncc`), otherwise `placeholder`.
A known top-level registry is not enough to put that registry in the suffix. If the exact range's holder, routing, and subdivision have not been investigated, use `placeholder`.
The zero padding is required because repository browsers sort filenames lexicographically: without it, `1-10...` would appear before `1-2...`.
IPv6 filenames use the same rule, with colons replaced by hyphens and compressed notation expanded to avoid ambiguous names.
@@ -27,10 +32,10 @@ IPv6 filenames use the same rule, with colons replaced by hyphens and compressed
| Range | Registry | Classification | Status | Known exact addresses | Record |
|---|---|---|---|---|---|
| `0.0.0.0/8` | IANA | Special-purpose | Researched | `0.0.0.0` | [record](iana--0-0-0-0--8.md) |
| `1.0.0.0/16` | APNIC | Pending subdivision/research | Placeholder | — | [record](apnic--1-0-0-0--16.md) |
| `1.1.0.0/24` | APNIC | Pending research | Placeholder | — | [record](apnic--1-1-0-0--24.md) |
| `1.1.1.0/24` | APNIC | Public unicast | Researched | `1.1.1.1` | [record](apnic--1-1-1-0--24.md) |
| `0.0.0.0/8` | IANA | Special-purpose | Researched | `0.0.0.0` | [record](000-000-000-000--08--iana.md) |
| `1.0.0.0/16` | APNIC | Pending subdivision/research | Placeholder | — | [record](001-000-000-000--16--placeholder.md) |
| `1.1.0.0/24` | APNIC | Pending research | Placeholder | — | [record](001-001-000-000--24--placeholder.md) |
| `1.1.1.0/24` | APNIC | Public unicast | Researched | `1.1.1.1` | [record](001-001-001-000--24--apnic.md) |
These four files now provide contiguous documented coverage from `0.0.0.0` through `1.1.1.255`. The two middle files are explicitly marked as placeholders and must not be interpreted as fully researched ownership records.