Traceroute Maker

Traceroute Maker is a variant of the Router Hop Generator. Unlike Router Hop Generator, which generated a fixed sequence, Traceroute Maker can produce arbitrary traceroute patterns.

The live demo features an example of what you could do with Traceroute Maker. Essentially, we encode the requested patterns into the bits of IPv6 addresses, so that there are a total of 190 million possible traceroutes.

Theoretically, the web app is not required, but it will assist in calculating the IP address of one possible traceroute within those 190 million.

The heart of Traceroute Maker is a function (IP6-ADDR, HOP-LIMIT) -> IP6-ADDR x {DROP, TTL-EXCEED, NET-UNREACH}. This function takes in the destination IP address of the incoming packet and its hop limit, then returns an IPv6 source address (which will appear as a line in the traceroute for the given hop limit) and a result (TTL-EXCEED continues the traceroute, NET-UNREACH stops it, and DROP ignores the packet altogether, causing stars [* * *] to appear in the traceroute).

The format of the IP address is as follows, with bit 0 at the end of the IP address:

  • Bits 0-4: Verse 1 specification
  • Bits 5-9: Verse 2
  • Bits 10-14: Verse 3
  • Bit 15: Odd parity for bits 0-14.
  • Bits 16-20: Verse 4
  • Bits 21-25: Verse 5
  • Bits 26-30: Verse 6
  • Bit 31: Even parity for bits 16-30.
  • Bits 32-39: "Class" of the traceroute. 0x10 = Skip to my Lou, 0x20 = If You're Happy, 0x50 = She'll be Coming 'round the Mountain. A pattern variant of Skip to my Lou may get 0x11 or 0x18, but a new song will have a different upper nibble.
  • Bits 40-127: Fixed prefix (2602:806:a003:40f:0:100::/88)

Bits 0-31 are XOR'd with the pattern 0x5a5aaa55 to mask out any patterns which may otherwise appear in the IP address.

Source code.