Skip to main content

3. prefixlen Files

3. prefixlen Files

prefixlen files are CSV files [RFC4180] in UTF-8 [RFC3629], excluding problematic code points described in [RFC9839]. Lines MUST be delimited by CRLF, blank lines MUST be ignored, and text from a '#' character to end of line MUST be treated as a comment and ignored.

Each non-ignored line has exactly three fields: prefix, end-site prefix length, and the number of end-sites within an end-site prefix length for networks using CGN [RFC6598] or proxies. All three fields MUST be present, so each non-comment line MUST contain exactly two commas. The first field MUST NOT be empty. If both the second and third fields are empty, the publisher does not disclose prefix length information.

2001:db8::/32,56,1
192.0.2.0/24,32,1

192.0.2.0/24,24,4000
192.0.2.0/24,26,1000

2001:db8::/32,120,
2001:db8:abcd::/48,64,

192.0.2.0/24,32,
192.0.2.0/28,,

The third field set to '1' signals absence of CGN or proxies, and it has the same meaning as leaving the third field empty in that scenario. Longest prefix matching has to be performed when parsing prefixlen files. If both the second and third fields are empty for a sub-prefix, prefix length information from covering prefixes MUST be discarded for that sub-prefix.

Multiple entries with exactly the same prefix MUST be considered an error, and consumers SHOULD log repeated entries. Publishers MUST ensure there is one and only one entry per prefix. Upon an erroneous entry, consumers MUST skip that entry, log the error, and continue processing the remaining entries.