[ih] Trceroute and the default UDP destination port

John Kristoff jtk at depaul.edu
Thu Sep 24 11:48:02 PDT 2015


In the original traceroute, an early copy of which I have shows this:

  u_short port = 32768 + 666;

That sum is 33434.  However, when the probes start they are invoked with
this:

  send_probe(++seq, ttl, &t1);

and in that routine there is:

  outudp->uh_dport = htons(port + seq);

seq was initialized to zero, but it becomes one before the first probe
is sent, which means the first destination port in the original
traceroute was actually 32768 + 666 + 1 or 33435.

Modern traceroute implementations, at least those found on UNIX-based
systems that use UDP probes by default and that I've looked at start
their probes with UDP destination port 33434.  You sometimes find 32768
+ 666 as part of the starting port's initialization, other times 33434
is just hard coded.  However, unlike the original traceroute, the port
is not incremented until after it is first used.

Now all this is perhaps in some small way a historic curiosity, perhaps
there is an explanation for this bit error as traceroute evolved, but it
does bring me to a question.

In the Van Jacobson's original code he explains that the UDP destination
port was "set to an unlikely value", but why the '+ 666'?  Is there any
algorithmic reason for this it or is it really just a silly artifact
that inspires jokes - "The founders were devil worshippers!" :-)

John



More information about the Internet-history mailing list