Sixty-five thousand ports, three filing locations, no published rulebook

The Internet's port registry is a 65,536-slot address book. Until August 2011, the rules for filling it in lived in three places: a request form on a website, a preamble above a data file, and the memory of whoever happened to be reviewing that week.

The third location was the problem. RFC 6335, published that August, “defines the procedures that the Internet Assigned Numbers Authority (IANA) uses when handling assignment and other requests related to the Service Name and Transport Protocol Port Number registry” — and admits, on the way, that the principles IANA's expert review team had been applying “had never been publicly documented”.

The motivation section reads like an inventory of a filing system that had quietly outgrown its owner. Anyone wanting to know how ports were assigned had to consult “three locations” — the request forms on the IANA website, an introductory section in the port registry file itself, and “two brief sections” of the IANA allocation guidelines. Nothing said which of the three was authoritative. The part that mattered most was the part written nowhere.

RFC 6335 does two things with that. It aggregates the scattered material “into a single reference”, and then it does the harder thing: it publishes the informal principles themselves, recording them “for historical purposes only”. A rule that lives in a reviewer's head is not a rule. It is a mood.

The three-tier split: System, User and Dynamic ports

The memo formalises the shape everyone now takes for granted: “System Ports, also known as the Well Known Ports, from 0-1023 (assigned by IANA)”, “User Ports, also known as the Registered Ports, from 1024-49151”, and “Dynamic Ports, also known as the Private or Ephemeral Ports, from 49152-65535 (never assigned)”.

Then comes the number that makes the whole design legible. At the time of writing, “approximately 76% of the TCP and UDP System Ports were assigned, and approximately 9% of the User Ports were assigned.” The precious range was three-quarters full. The range forty-seven times larger was nine-tenths empty.

That is what a registry looks like when the scarce good is prestige rather than space. Nobody queues for an ephemeral port. Everybody wants one under 1024, because a low number is the closest thing the protocol has to a good street address.

What IANA's old principles confessed

Section 7.1 is a small, honest confession. Under the previous regime: “TCP and UDP ports were simultaneously assigned when either was requested”; “Port numbers were the primary assignment; service names were informative only, and did not have a well-defined syntax”; and “Port numbers were conserved informally, and sometimes inconsistently (e.g., some services were assigned ranges of many port numbers even where not strictly necessary)”.

That last clause is the one to keep. The registry was never short of numbers. It was short of a rule about how many a single service should take — so generosity and stinginess alternated with whoever happened to be holding the pen.

The registry that grew outside the registry

The best story in the memo is about names. Service names began as “mnemonic identifiers for port numbers without a well-defined syntax, apart from the 14-character limit mentioned on the IANA web site” — and “even that length limit has not been consistently applied, and some assigned service names are 15 characters long”.

Then DNS SRV records arrived, and it became useful to register a service name with no port number at all. IANA had no procedure for that. So an “informal temporary service name registry outside of the control of IANA” appeared, holding “roughly 500 service names”.

Read that again. The official registry could not accept the request people were actually making, so the request went elsewhere and built its own registry. A registry that cannot serve a demand does not abolish it. It just loses it — and the loss stays invisible until somebody counts.

Why IANA treats port conservation as a rule, not a preference

The memo is blunt about why the space needs defending: “Extensions to support larger port number spaces would require changing many core protocols of the current Internet in a way that would not be backward compatible.” The port field is 16 bits because the TCP and UDP headers say so, and the headers are baked into silicon, firmware and decades of deployed code.

So the basic principle “is to conserve use of the port space where possible”, and applicants are expected to “participate in the traffic demultiplexing process where feasible”. That is a rare admission in an Internet document: the number is a limited resource, the limit is enforced by the shape of deployed software rather than by physics, and the registry is therefore a rationing scheme with a filing cabinet.

What RFC 6335 actually changed

RFC 6335 added no ports and moved no boundaries. It made the registry's decisions reproducible — a reviewer, an applicant and a future historian can now read the same rules, including the rules that grant IANA “flexibility beyond these principles” and state that decisions “are not required to be bound to these principles”.

Both halves matter. A procedure that hides its exceptions is a rumour. A procedure that publishes its own flexibility is something closer to law.

Lu Heng's Note “The Policy Mirror” states the registry layer's rule exactly: “A registry record describes reality. It does not create it.” Writing the rules down created no ports. It created something a port registry needs more than space — a reason a stranger can check.

That is the whole of institutional legitimacy at the registry layer, and it has nothing to do with the size of the database. The five hundred names that grew outside IANA are the proof. When the bookkeeping falls behind the network, the network does not wait. It simply builds a second book.