[ih] History of the TCP/UDP port space

Mike Padlipsky the.map at alum.mit.edu
Mon Jan 23 22:53:11 PST 2006


At 03:11 PM 1/23/2006, Bob Braden wrote:
>Joe,
>
>I think you are confusing ARPAnet NCP port assignments with TCP/IP
>port assignments.

it's worse than that.

without prejudice to my views on the subject 'history''s accuracy, or 
even comprehensibility, my first reaction to the message this one was 
responding to was 'what?  we didn't have ports when rfc 33 would have 
been written; i'm not even sure we had sockets yet.'

so i looked at what purports to be a transcription of rfc 33 
according to the first googhit on 'rfc index' and immediately noticed 
that it had a 1973 [sic: 3, as in three] publication date, which is 
absurd.  [but enough other 2-digit rfcs refer to it that i'll take 
the 3 as a typo for 0.]  sure enough, we had sockets, not ports.

the date typo red herring aside, a little skimming [and some 
firefox-finding] made it clear that rfc 33's use of 'port' was 
rhetorical, not technical.  that is, it couches everything in terms 
of sockets at the beginning, and uses the term a number of times, 
then goes on to some meant-to-be useful abstractions about ports 
later in the document, or perhaps was sneakily trying to get the name 
changed but that definitely didn't take if it was the 
intent.  'sockets' was the term of art for years.  [it might be the 
case that 'port' appeared often enough in the later part of the 
document, which was presumably led to by a search on something like 
'rfc ports', that 'socket' didn't get noticed up at the top, i 
suppose.]  it's also worth noting that rfc 33 predated the final form 
of the arpanet host-host protocol, although it was apparently a 
fairly major step on the path to the ah-hp.

i'm utterly disinclined to dig out the references, especially when i 
know from personal experience that some references aren't available 
in the rfc archives, but my memory's pretty clear on the following: 
the original arpanet host-host protocol [often miscalled ncp, which 
was really the term supposed to be used for the combination of the 
host-host and host-imp protocol interpreters in given hosts] used 
pairs of simplex sockets for processes to communicate over/through, 
and the underheralded 'initial connection protocol' used 'well-known 
sockets' to allow a user process to get the number [probably the even 
number, but who cares] of the base socket of the even-odd pair it 
would be able to use to 'talk' to the desired server process [telnet 
= 3, ftp = 23 sounds faintly familiar but is almost certainly 
wrong].  well-known sockets were the first thousand or so.  the rest 
of the socket world could be used freely by pairs of processes for 
whatever purpose they 'wanted' [provided, of course, they knew what 
numbers to use ... which was what the initial connection protocol 
achieved for telnet, ftp, and some others i can't be bothered to try 
to remember].

the real point is that when tcp came along, duplex communication 
paths seemed more sensible, and they were called ports [i suspect 
after starting out being called sockets as well, but i wasn't going 
to the tcp design meetings because i wasn't implementing a tcp 
interpreter, so can't be sure].  the similarities to good old ah-hp 
socket pairs were pretty striking, tho ... and, of course, telnet and 
ftp user processes then went off to well-known ports instead of 
well-known sockets [but since as well as being duplex ports also 
didn't have to be unique on both ends the initial connection protocol 
became pretty much moot].

to end on a charming anecnote, what's left of my memory's hazy [and 
i'm too lazy to refresh it] on the exact 'shape' of socket 
numbers/identifiers, but i do clearly recall -- and a quick look back 
at rfc 33 confirms, even tho i'm pretty sure the 'shape' it specifies 
isn't what eventually was settled on -- that they used to have a 
final 8-bit field called 'aen', for 'another eight-bit number',  and 
good old ed [or edwin, as he prefers] meyer, who was my officemate at 
project mac at the time, suggested that the field should be called 
'pin' rather than 'aen', since pins and sockets went 
together.  sadly, it doesn't seem to've made it into the literature, 
and i'm not at all sure that he even proposed it in public, but i'm 
pretty sure the source code for the multics host-host protocol 
interpreter went along with the joke [especially since he wrote the 
initial implementation of it, and his group leader was -- and still 
is -- inordinately fond of puns].


cheers, map

[whose shoulder problems caused him to break down some time ago and 
create a 'signature' file to apologize for the lack of his formerly 
customary e-volubility -- and who's been employing shiftless typing 
for a long time now to spare his wristsnfingers, in case you didn't 
know ... and who's further broken down and done 
http://www.lafn.org/~ba213/mapstuff.html , rather grudgingly]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://elists.isoc.org/pipermail/internet-history/attachments/20060123/6ce0e903/attachment.htm>


More information about the Internet-history mailing list