renumbering and roaming
Daniel Reed
djr at narnia.n.ml.org
Mon May 18 21:49:41 UTC 1998
On Mon, 18 May 1998, Phillip Vandry wrote:
) > Anyone care to co-author an RFC suggesting a sensible global standard for
) > "local" mail relays, time servers, resolvers etc so that dial-in people can
) > roam without getting filtered, blocked etc?
) How about defining 192.x.y.port-number, where port-number is the port
) number of the service. 192.x.y.53 is the DNS server, etc..
)
) Nah, good idea, but too many useful services with port numbers > 255, so
) it doesn't work too well.
192.69.0.25:25 -> SMTP
192.69.0.53:53 -> DNS
192.69.0.80:80 -> HTTP
192.69.66.67:6667 -> IRC
etc.
Why not just 192.x.*.* and have the first two numbers in the port be
represented in the second to last quad, and the last two numbers in the
last quad?
Or, maybe more practically (to take care of those pesky 5 digit ports that
someone might use for some reason), you could just use the actual numeric
representation, ie:
25 -> 0x0019 -> 192.69.0.25 (0x00 is 0, 0x19 is 25)
80 -> 0x0050 -> 192.69.0.80 (0x00 is 0, 0x50 is 80)
6667 -> 0x1A0B -> 192.69.26.11 (0x1A is 26, 0x0B is 11)
54321 -> 0xD431 -> 192.69.212.49 (0xD4 is 212, 0x31 is 49)
etc. To reconstruct the original port from the host, just take the second
to last quad, multiple it by 256 (aka left bitshift it 8 places), and add
the last quad. 0*256 + 25 = 25; 0*256 + 80 = 80; 26*256 + 11 = 6667;
212*256 + 49 = 54321
--
Daniel Reed <n at ml.org> (ask me for my PGP key)
Man will occasionally stumble over the truth, but most times he will pick
himself up and carry on. -- Winston Churchill
More information about the NANOG
mailing list