Solipsis: Python-powered Metaverse

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Fri May 13 19:28:57 EDT 2005


On Wed, 11 May 2005 22:48:31 -0400, rumours say that "Terry Reedy"
<tjreedy at udel.edu> might have written:

>>  and what if both computers
>> wanted to participate on the port 6000 fun?

>Recently, I had one family member use my purchased account to logon to and 
>play an online action game, which sends a constant stream of update info. 
>Then, curious what would happen, I logged on, from a different computer but 
>through the same router, with a temporary guest account.  Somewhat to my 
>surprise, it worked -- without touching the computer (XP) or router 
>settings.  And kept working the whole weekend.  So there is a way to tag 
>update packets so they can be reliably separated into two streams (and vice 
>versa).  Solipsis should be able to do the same.

In your case, it's the internal address that originated the connection--
so the router can distinguish the streams:

(int1, port1)->(ext_host, port0)
maps to (router_ext, port2)->(ext_host, port0)

(int2, port3)->(ext_host, port0)
maps to (router_ext, port4)->(ext_host, port0)

Every TCP/UDP packet includes srcip, srcport, dstip, dstport, so an
internal "dictionary" makes the translations to and fro (the router
changes the srcip, srcport whenever a packet passes through).  The
internal computer knows not that the router mangled the packets, and the
external computer knows nothing about the internal computer address.

However, if both of your internal computers listen to port 6000 for
example, there is no easy way for the router to know to which one it
should forward an *incoming* request for connection to port 6000-- all
it knows is that some external computer connected to its external
interface ip address at some specific port.  In this case, *typically*
you would map port (router_ext, 6000) to (int1, 6000) and (router_ext,
6001) to (int2, 6000).  The internal computers would both think that
some computer is doing a connect at their port 6000.
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list